From a5e396a04e0ec7e85a61b69e0836c245af96fd39 Mon Sep 17 00:00:00 2001 From: Marcin Kajor <98948394+markaj-nordic@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:13:16 +0200 Subject: [PATCH 001/159] [door-lock] extend the OnFabricRemoved delegate with custom callback (#27965) Signed-off-by: Marcin Kajor --- .../door-lock-server/door-lock-server.cpp | 12 +++++++++--- .../door-lock-server/door-lock-server.h | 17 ++++++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 407afc0af5f001..ad201e78cf7d2f 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -1353,12 +1353,13 @@ bool DoorLockServer::OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIn ChipLogProgress(Zcl, "[OnFabricRemoved] Handling a fabric removal from the door lock server [endpointId=%d,fabricIndex=%d]", endpointId, fabricIndex); + bool status{ true }; // Iterate over all the users and clean up the deleted fabric if (!clearFabricFromUsers(endpointId, fabricIndex)) { ChipLogError(Zcl, "[OnFabricRemoved] Unable to cleanup fabric from users - internal error [endpointId=%d,fabricIndex=%d]", endpointId, fabricIndex); - return false; + status = false; } // Iterate over all the credentials and clean up the fabrics @@ -1367,10 +1368,15 @@ bool DoorLockServer::OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIn ChipLogError(Zcl, "[OnFabricRemoved] Unable to cleanup fabric from credentials - internal error [endpointId=%d,fabricIndex=%d]", endpointId, fabricIndex); - return false; + status = false; } - return true; + if (mOnFabricRemovedCustomCallback) + { + mOnFabricRemovedCustomCallback(endpointId, fabricIndex); + } + + return status; } /********************************************************** diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index 72492843bb1b44..212c374077298f 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -93,7 +93,8 @@ class DoorLockServer public: static DoorLockServer & Instance(); - using Feature = chip::app::Clusters::DoorLock::Feature; + using Feature = chip::app::Clusters::DoorLock::Feature; + using OnFabricRemovedCustomCallback = void (*)(chip::EndpointId endpointId, chip::FabricIndex fabricIndex); void InitServer(chip::EndpointId endpointId); @@ -202,6 +203,18 @@ class DoorLockServer inline bool SupportsUnbolt(chip::EndpointId endpointId) { return GetFeatures(endpointId).Has(Feature::kUnbolt); } + /** + * @brief Allows the application to register a custom callback which will be called after the default DoorLock + * OnFabricRemoved implementation. At that point the door lock cluster has done any + * spec-required clearing of state for fabric removal. + * + * @param callback callback to be registered + */ + inline void SetOnFabricRemovedCustomCallback(OnFabricRemovedCustomCallback callback) + { + mOnFabricRemovedCustomCallback = callback; + } + bool OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIndex fabricIndex); static void DoorLockOnAutoRelockCallback(chip::System::Layer *, void * callbackContext); @@ -580,6 +593,8 @@ class DoorLockServer std::array mEndpointCtx; + OnFabricRemovedCustomCallback mOnFabricRemovedCustomCallback{ nullptr }; + static DoorLockServer instance; }; From cdec02bdc7bd169ccc43c388673fda6875c7b725 Mon Sep 17 00:00:00 2001 From: Tobiasgraf <4622393+tobiasgraf@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:56:36 +0200 Subject: [PATCH 002/159] Adding `resource-monitoring-instances.cpp` to all-clusters-app on non-linux platforms (#28205) * Adding `resource-monitoring-instances.cpp` to all-clusters-app on non-linux platforms * Add missing VerifyOrDie() * Apply Restyled Patch --- .../all-clusters-common/src/resource-monitoring-instances.cpp | 1 + examples/all-clusters-app/ameba/chip_main.cmake | 1 + examples/all-clusters-app/asr/BUILD.gn | 1 + examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn | 1 + examples/all-clusters-app/cc13x4_26x4/BUILD.gn | 1 + examples/all-clusters-app/infineon/psoc6/BUILD.gn | 1 + examples/all-clusters-app/mbed/CMakeLists.txt | 1 + examples/all-clusters-app/nrfconnect/CMakeLists.txt | 1 + examples/all-clusters-app/nxp/mw320/BUILD.gn | 1 + examples/all-clusters-app/openiotsdk/CMakeLists.txt | 1 + examples/all-clusters-app/telink/CMakeLists.txt | 1 + examples/all-clusters-app/tizen/BUILD.gn | 1 + 12 files changed, 12 insertions(+) diff --git a/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp b/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp index 891a7e85450b48..de7b46d26d1c1a 100644 --- a/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp @@ -100,6 +100,7 @@ void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId } void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) { + VerifyOrDie(gHepaFilterInstance == nullptr); gHepaFilterInstance = new HepaFilterMonitoringInstance(endpoint, static_cast(gHepaFilterFeatureMap.to_ulong()), DegradationDirectionEnum::kDown, true); gHepaFilterInstance->Init(); diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index a9d5fad68d4ebf..77bea5ccfe132f 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -155,6 +155,7 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index 9cbee21ac1d0b0..f4c34a8a1295f9 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -73,6 +73,7 @@ asr_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index e0b44485a753a2..722a795847065b 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -78,6 +78,7 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index e1e2fc683206b7..16124248efca82 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -78,6 +78,7 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index 6febaf08afdb50..ce4870f67939ef 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -109,6 +109,7 @@ psoc6_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 9c6fc1167dd49c..ae5e0ab543b215 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -61,6 +61,7 @@ target_sources(${APP_TARGET} PRIVATE ${MBED_COMMON}/util/DFUManager.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp ${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 diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index d1d1770d7b33ff..6fb66644ad1f50 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -63,6 +63,7 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index 03ef9b9441b92a..ca5bd637508727 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -76,6 +76,7 @@ mw320_executable("shell_mw320") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index bae84c46cd65cb..fb50580dbb6ed7 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -55,6 +55,7 @@ target_sources(${APP_TARGET} ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp ) diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 71664db1938c35..723e47008c8ac5 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -77,6 +77,7 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp ${TELINK_COMMON}/common/src/AppTaskCommon.cpp ${TELINK_COMMON}/util/src/LEDWidget.cpp diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 4883363fa79917..484732400b64f1 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -26,6 +26,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", From 689aa877b0265cc4466f8b0ec06b1ddb7a4ed4bf Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 24 Jul 2023 15:36:30 +0200 Subject: [PATCH 003/159] [CI] Automate Test_TC_IDM_1_2.yaml (#28071) * [chiptool.py] Allow '*' to be used as a top level endpoint value * [matter_yamltests] Add saveResponseAs step level keyword to save the whole response * [matter_yamltests] Add an optional definitions parameters for the methods of pseudo clusters * [matter_yamltests] Add WildcardResponseExtractorCluster * [CI] Automate Test_TC_IDM_1_2.yaml --- .../matter_chip_tool_adapter/encoder.py | 2 + .../matter_yamltests/parser.py | 5 + .../pseudo_clusters/pseudo_clusters.py | 9 +- .../matter_yamltests/runner.py | 2 +- .../matter_yamltests/yaml_loader.py | 1 + scripts/tests/chiptest/__init__.py | 1 + .../wildcard_response_extractor_cluster.py | 128 ++++++ .../suites/certification/Test_TC_IDM_1_2.yaml | 384 ++++++++++++++++++ 8 files changed, 529 insertions(+), 3 deletions(-) create mode 100644 scripts/tests/yaml/extensions/wildcard_response_extractor_cluster.py create mode 100644 src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml 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 8340289c0e2852..2c02811f865845 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 @@ -309,6 +309,8 @@ def __maybe_add_endpoint(self, rv, request): endpoint_argument_name = 'endpoint-id-ignored-for-group-commands' endpoint_argument_value = request.endpoint + if endpoint_argument_value == '*': + endpoint_argument_value = 0xFFFF if (request.is_attribute and not request.command == "writeAttribute") or request.is_event or (request.command in _ANY_COMMANDS_LIST and not request.command == "WriteById"): endpoint_argument_name = 'endpoint-ids' diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser.py b/scripts/py_matter_yamltests/matter_yamltests/parser.py index 82b798a85156a4..07090679fd9dbb 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser.py @@ -208,6 +208,7 @@ def __init__(self, test: dict, config: dict, definitions: SpecDefinitions, pics_ self.wait_for = _value_or_none(test, 'wait') self.event_number = _value_or_none(test, 'eventNumber') self.run_if = _value_or_none(test, 'runIf') + self.save_response_as = _value_or_none(test, 'saveResponseAs') self.is_attribute = self.__is_attribute_command() self.is_event = self.__is_event_command() @@ -695,6 +696,9 @@ def post_process_response(self, received_responses): if not isinstance(received_responses, list): received_responses = [received_responses] + if self._test.save_response_as: + self._runtime_config_variable_storage[self._test.save_response_as] = received_responses + if self.wait_for is not None: self._response_cluster_wait_validation(received_responses, result) return result @@ -1112,6 +1116,7 @@ def __init__(self, test_file: str, parser_config: TestParserConfig = TestParserC tests ) self.timeout = config['timeout'] + self.definitions = parser_config.definitions def __apply_config_override(self, config, config_override): for key, value in config_override.items(): diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py index e194615cdea11c..7ab24f086442a9 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import inspect from typing import List from .clusters.commissioner_commands import CommissionerCommands @@ -33,12 +34,16 @@ def supports(self, request) -> bool: def add(self, cluster: PseudoCluster): self.clusters.append(cluster) - async def execute(self, request): + async def execute(self, request, definitions=None): status = {'error': 'FAILURE'} command = self.__get_command(request) if command: - status = await command(request) + if 'definitions' in inspect.signature(command).parameters: + status = await command(request, definitions) + else: + status = await command(request) + # If the command does not returns an error, it is considered a success. if status is None: status = {} diff --git a/scripts/py_matter_yamltests/matter_yamltests/runner.py b/scripts/py_matter_yamltests/matter_yamltests/runner.py index 08de8d758e84fd..c819eea79d9a56 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/runner.py @@ -186,7 +186,7 @@ async def _run(self, parser: TestParser, config: TestRunnerConfig): start = time.time() if config.pseudo_clusters.supports(request): - responses, logs = await config.pseudo_clusters.execute(request) + responses, logs = await config.pseudo_clusters.execute(request, parser.definitions) else: encoded_request = config.adapter.encode(request) encoded_response = await self.execute(encoded_request) diff --git a/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py b/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py index 50a9217ee18b1a..ecdc7af209acbe 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py +++ b/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py @@ -103,6 +103,7 @@ def __check_test_step(self, config: dict, content): 'PICS': str, 'arguments': dict, 'response': (dict, list, str), # Can be a variable + 'saveResponseAs': str, 'minInterval': int, 'maxInterval': int, 'timeout': int, diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 87c308c60030f6..26aed1ddc34138 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -148,6 +148,7 @@ def _GetInDevelopmentTests() -> Set[str]: "Test_TC_SMCO_2_4.yaml", # chip-repl does not support timeout (07/20/2023) "Test_TC_SMCO_2_5.yaml", # chip-repl does not support timeout (07/20/2023) "Test_TC_SMCO_2_6.yaml", # chip-repl does not support timeout (07/20/2023) + "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) } diff --git a/scripts/tests/yaml/extensions/wildcard_response_extractor_cluster.py b/scripts/tests/yaml/extensions/wildcard_response_extractor_cluster.py new file mode 100644 index 00000000000000..a0e34cc148d8ac --- /dev/null +++ b/scripts/tests/yaml/extensions/wildcard_response_extractor_cluster.py @@ -0,0 +1,128 @@ +# +# 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. + + +from matter_yamltests.pseudo_clusters.pseudo_cluster import PseudoCluster + +_VALUE_ARGUMENT_NAME = 'Value' +_CLUSTERS_ARGUMENT_NAME = 'Clusters' + + +class wildcard_response_extractor_cluster(PseudoCluster): + name = 'WildcardResponseExtractorCluster' + + async def GetDefaultEndPointForClusters(self, request, definitions): + entries = self.__get_argument(request, _VALUE_ARGUMENT_NAME) + clusters = self.__get_argument(request, _CLUSTERS_ARGUMENT_NAME) + if entries is None or clusters is None: + return {'error': 'INVALID_ARGUMENT'} + + results = {} + + for cluster in clusters: + cluster_id = definitions.get_cluster_id_by_name(cluster) + results[cluster] = None + + for entry in entries: + server_list = entry.get('value') + if cluster_id in server_list: + results[cluster] = entry.get('endpoint') + break + + return {'value': results} + + async def GetUnsupportedCluster(self, request): + entries = self.__get_argument(request, _VALUE_ARGUMENT_NAME) + if entries is None: + return {'error': 'INVALID_ARGUMENT'} + + cluster_ids = [] + for entry in entries: + server_list = entry.get('value') + for cluster_id in server_list: + if cluster_id not in cluster_ids: + cluster_ids.append(cluster_id) + + unsupported_cluster = None + for cluster_code in range(0xFFFFFFFF): + if cluster_code not in cluster_ids: + unsupported_cluster = f'{cluster_code:#0{10}x}' + break + + return {'value': {'UnsupportedCluster': unsupported_cluster}} + + async def GetUnsupportedCommand(self, request): + entries = self.__get_argument(request, _VALUE_ARGUMENT_NAME) + if entries is None: + return {'error': 'INVALID_ARGUMENT'} + + command_ids = [] + for entry in entries: + commands_list = entry.get('value') + for command_id in commands_list: + if command_id not in command_ids: + command_ids.append(command_id) + + unsupported_command = None + for command_code in range(0xFFFFFFFF): + if command_code not in command_ids: + unsupported_command = f'{command_code:#0{10}x}' + break + + return {'value': {'UnsupportedCommand': unsupported_command}} + + async def GetUnsupportedEndPoint(self, request): + entries = self.__get_argument(request, _VALUE_ARGUMENT_NAME) + if entries is None: + return {'error': 'INVALID_ARGUMENT'} + + endpoint_ids = [] + for entry in entries: + parts_list = entry.get('value') + for endpoint_id in parts_list: + if endpoint_id not in endpoint_ids: + endpoint_ids.append(endpoint_id) + + # Add the endpoint id of the response if needed. + endpoint_id = entry.get('endpoint') + if endpoint_id not in endpoint_ids: + endpoint_ids.append(endpoint_id) + + unsupported_endpoint = None + for endpoint_code in range(0xFFFF): + if endpoint_code not in endpoint_ids: + unsupported_endpoint = endpoint_code + break + + return {'value': {'UnsupportedEndPoint': unsupported_endpoint}} + + def __get_argument(self, request, argument_name): + arguments = request.arguments.get('values') + if arguments is None: + return None + + if not type(arguments) is list: + return None + + for argument in arguments: + name = argument.get('name') + value = argument.get('value') + if name is None or value is None: + return None + + if name == argument_name: + return value + + return None diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml new file mode 100644 index 00000000000000..ff7e3d0a241322 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml @@ -0,0 +1,384 @@ +# Copyright (c) 2021-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. + +name: 3.1.2. [TC-IDM-1.2] Invoke Response Action from DUT to TH - [{DUT_Server}] + +PICS: + - MCORE.IDM.S + +config: + nodeId: 0x12344321 + InvokeRequestMessage.Cluster: 0x00000006 # OnOff + InvokeRequestMessage.Command: 0x00000000 # Off + InvokeRequestMessage.EndPoint: 1 + InvokeRequestMessage.Payload: {} + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + #### Test Setup + + - label: "Get the list of available endpoints on the device" + cluster: "Descriptor" + command: "readAttribute" + attribute: "PartsList" + endpoint: 0 + saveResponseAs: AvailableDeviceEndPoints + + - label: + "Get an unsupported endpoint id from the list of available device + endpoints" + cluster: WildcardResponseExtractorCluster + command: GetUnsupportedEndPoint + arguments: + values: + - name: Value + value: AvailableDeviceEndPoints + response: + values: + - name: UnsupportedEndPoint + saveAs: PIXIT.IDM.UnsupportedEndPoint + + - label: "Get the list of available clusters on the device (all endpoints)" + cluster: "Descriptor" + command: "readAttribute" + attribute: "ServerList" + endpoint: "*" + saveResponseAs: AvailableDeviceClusters + + - label: + "Extract the endpoint values for the AccessControl, + GeneralCommissioning, AdministratorCommissioning and + OperationalCredentials cluster" + cluster: WildcardResponseExtractorCluster + command: GetDefaultEndPointForClusters + arguments: + values: + - name: Value + value: AvailableDeviceClusters + - name: Clusters + value: + [ + "AccessControl", + "GeneralCommissioning", + "AdministratorCommissioning", + "OperationalCredentials", + ] + response: + values: + - name: AccessControl + saveAs: PIXIT.Cluster.AccessControl.EndPoint + - name: GeneralCommissioning + saveAs: PIXIT.Cluster.GeneralCommissioning.EndPoint + - name: AdministratorCommissioning + saveAs: PIXIT.Cluster.AdministratorCommissioning.EndPoint + - name: OperationalCredentials + saveAs: PIXIT.Cluster.OperationalCredentials.EndPoint + + - label: + "Get an unsupported cluster id from the list of available device + clusters" + cluster: WildcardResponseExtractorCluster + command: GetUnsupportedCluster + arguments: + values: + - name: Value + value: AvailableDeviceClusters + response: + values: + - name: UnsupportedCluster + saveAs: PIXIT.IDM.UnsupportedCluster + + - label: + "Get the list of available cluster commands on the device (all + endpoints)" + cluster: "AnyCommands" + command: "ReadById" + endpoint: "*" + arguments: + values: + - name: "ClusterId" + value: "*" + - name: "AttributeId" + value: 0x0000FFF9 + saveResponseAs: AvailableDeviceCommands + + - label: + "Get an unsupported command id from the list of available device + commands" + cluster: WildcardResponseExtractorCluster + command: GetUnsupportedCommand + arguments: + values: + - name: Value + value: AvailableDeviceCommands + response: + values: + - name: UnsupportedCommand + saveAs: PIXIT.IDM.UnsupportedCommand + + - label: "Read the fabric index from the alpha fabric" + cluster: "Operational Credentials" + command: "readAttribute" + endpoint: PIXIT.Cluster.OperationalCredentials.EndPoint + attribute: "CurrentFabricIndex" + response: + saveAs: alphaIndex + + - label: "Read the commissioner node ID from the alpha fabric" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: commissionerNodeIdAlpha + + ##### Test Implementation + + - label: + "TH sends the Invoke Request Message to the DUT with the path that + indicates a specific endpoint that is unsupported." + cluster: "AnyCommands" + command: "CommandById" + endpoint: PIXIT.IDM.UnsupportedEndPoint + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_ENDPOINT + + - label: + "TH sends the Invoke Request Message to the DUT with the path that + indicates a specific cluster that is unsupported." + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: PIXIT.IDM.UnsupportedCluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_CLUSTER + + - label: + "TH sends the Invoke Request Message to the DUT with the path that + indicates a specific command that is unsupported." + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: PIXIT.IDM.UnsupportedCommand + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_COMMAND + + - label: + "Setup the TH such that it should not have the privilege for the + cluster in the path." + cluster: "AccessControl" + command: "writeAttribute" + attribute: "ACL" + endpoint: PIXIT.Cluster.AccessControl.EndPoint + arguments: + value: + [ + { + "fabricIndex": alphaIndex, + "Privilege": 5, + "AuthMode": 2, + "Subjects": [commissionerNodeIdAlpha], + "Targets": + [ + { + "Cluster": 31, + "Endpoint": 0, + "DeviceType": null, + }, + ], + }, + ] + + - label: + "TH sends the Invoke Request Message to the DUT with a valid + CommandDataIB" + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_ACCESS + + - label: + "TH sends the Invoke Request Message to the DUT with a valid and + fabric-scoped CommandDataIB" + cluster: "General Commissioning" + command: "CommissioningComplete" + endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint + response: + error: UNSUPPORTED_ACCESS + + - label: + "Setup the TH such that it should have the privilege for the cluster + in the path." + cluster: "AccessControl" + command: "writeAttribute" + endpoint: PIXIT.Cluster.AccessControl.EndPoint + attribute: "ACL" + arguments: + value: + [ + { + "fabricIndex": alphaIndex, + "Privilege": 5, + "AuthMode": 2, + "Subjects": [commissionerNodeIdAlpha], + "Targets": null, + }, + ] + + - label: + "(OPTIONAL) TH sends the Invoke Request Message to the DUT with the + command which requires a data response to be sent back." + cluster: "General Commissioning" + command: "ArmFailSafe" + endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint + arguments: + values: + - name: "ExpiryLengthSeconds" + value: 1000 + - name: "Breadcrumb" + value: 1 + response: + values: + - name: "ErrorCode" + value: 0 + + - label: + "TH sends the Invoke Request Message to the DUT with a valid + CommandDataIB and SuppressResponse set to True" + disabled: true + verification: | + Out of Scope for V1.0 + https://github.com/project-chip/connectedhomeip/issues/8043 + cluster: InvokeRequestMessage.Cluster + command: InvokeRequestMessage.Command + endpoint: InvokeRequestMessage.EndPoint + arguments: + values: + - name: "Payload" + value: PIXIT.InvokeRequestMessage.Payload + + - label: + "Setup the TH such that it should not have the privilege for the + cluster in the path." + cluster: "AccessControl" + command: "writeAttribute" + attribute: "ACL" + endpoint: PIXIT.Cluster.AccessControl.EndPoint + arguments: + value: + [ + { + "fabricIndex": alphaIndex, + "Privilege": 5, + "AuthMode": 2, + "Subjects": [commissionerNodeIdAlpha], + "Targets": + [ + { + "Cluster": 31, + "Endpoint": 0, + "DeviceType": null, + }, + ], + }, + ] + + - label: + "TH sends a Invoke Request Message to the DUT with the TimedRequest + set as TRUE.(There should be no previous Timed Invoke action.)" + cluster: "AnyCommands" + command: "CommandById" + endpoint: InvokeRequestMessage.EndPoint + timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "ClusterId" + value: InvokeRequestMessage.Cluster + - name: "CommandId" + value: InvokeRequestMessage.Command + - name: "Payload" + value: InvokeRequestMessage.Payload + response: + error: UNSUPPORTED_ACCESS + + - label: + "Setup the TH such that it should have the privilege for the cluster + in the path." + cluster: "AccessControl" + command: "writeAttribute" + endpoint: PIXIT.Cluster.AccessControl.EndPoint + attribute: "ACL" + arguments: + value: + [ + { + "fabricIndex": alphaIndex, + "Privilege": 5, + "AuthMode": 2, + "Subjects": [commissionerNodeIdAlpha], + "Targets": null, + }, + ] + + - label: + "TH sends Invoke Request Message to the DUT with the command in the + path that requires a Timed Invoke transaction to invoke and this + action is not part of a Timed Invoke transaction" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + endpoint: PIXIT.Cluster.AdministratorCommissioning.EndPoint + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + response: + error: NEEDS_TIMED_INTERACTION From 4c50c15ae9f6be8312602128c5d2e5092ce71c58 Mon Sep 17 00:00:00 2001 From: EricZijian_Siter Date: Mon, 24 Jul 2023 21:36:38 +0800 Subject: [PATCH 004/159] Revert "Delay processing test event in Smoke CO Alarm (#28044)" (#28191) This reverts commit 435aa960aecfdc9507534fac1e8e95502dfb5d9f. Co-authored-by: Hare --- .../silabs/include/SmokeCoAlarmManager.h | 2 - .../silabs/src/SmokeCoAlarmManager.cpp | 160 ++++++------------ 2 files changed, 48 insertions(+), 114 deletions(-) diff --git a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h index c7a5b877f6b821..be1b38a8bb5e3a 100644 --- a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h +++ b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h @@ -108,7 +108,6 @@ class SmokeCoAlarmManager int mExpressedStateMask = 1; bool mEndSelfTesting; - uint64_t mEventTrigger; void CancelTimer(void); void StartTimer(uint32_t aTimeoutMs); @@ -116,7 +115,6 @@ class SmokeCoAlarmManager static void TimerEventHandler(TimerHandle_t xTimer); static void SelfTestingEventHandler(AppEvent * aEvent); static void EndSelfTestingEventHandler(AppEvent * aEvent); - static void TriggerEventHandler(AppEvent * aEvent); static SmokeCoAlarmManager sAlarm; }; diff --git a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp index c006e92ad013ce..3fd076689d4e14 100644 --- a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp @@ -99,7 +99,6 @@ CHIP_ERROR SmokeCoAlarmManager::Init() chip::DeviceLayer::PlatformMgr().UnlockChipStack(); mEndSelfTesting = false; - mEventTrigger = 0; return CHIP_NO_ERROR; } @@ -142,16 +141,10 @@ void SmokeCoAlarmManager::TimerEventHandler(TimerHandle_t xTimer) AppEvent event; event.Type = AppEvent::kEventType_Timer; event.TimerEvent.Context = alarm; - if (alarm->mEndSelfTesting) { event.Handler = EndSelfTestingEventHandler; } - else if (alarm->mEventTrigger != 0) - { - event.Handler = TriggerEventHandler; - } - AppTask::GetAppTask().PostEvent(&event); } @@ -187,90 +180,102 @@ void SmokeCoAlarmManager::EndSelfTestingEventHandler(AppEvent * aEvent) chip::DeviceLayer::PlatformMgr().UnlockChipStack(); } -void SmokeCoAlarmManager::TriggerEventHandler(AppEvent * aEvent) +bool SmokeCoAlarmManager::OnSelfTesting() { - uint64_t eventTrigger = AlarmMgr().mEventTrigger; - AlarmMgr().mEventTrigger = 0; + AppEvent event; + event.Handler = SelfTestingEventHandler; + AppTask::GetAppTask().PostEvent(&event); - chip::DeviceLayer::PlatformMgr().LockChipStack(); + return true; +} + +bool SmokeCoAlarmManager::ManualSelfTesting() +{ + bool success = false; + + if ((mExpressedStateMask & 0b110010110) == 0) + { + chip::DeviceLayer::PlatformMgr().LockChipStack(); + success = AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kTesting, true); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + if (success) + { + success = OnSelfTesting(); + } + } + + return success; +} + +bool SmokeCoAlarmManager::OnEventTriggerHandle(uint64_t eventTrigger) +{ + bool isValidCommand = true; switch (eventTrigger) { case kTriggeredEvent_WarningSmokeAlarm: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, true); break; case kTriggeredEvent_CriticalSmokeAlarm: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, true); break; case kTriggeredEvent_SmokeAlarmClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, false); break; case kTriggeredEvent_WarningCOAlarm: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, true); break; case kTriggeredEvent_CriticalCOAlarm: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, true); break; case kTriggeredEvent_COAlarmClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, false); break; case kTriggeredEvent_WarningBatteryAlert: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, true); break; case kTriggeredEvent_CriticalBatteryAlert: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, true); break; case kTriggeredEvent_BatteryAlertClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, false); break; case kTriggeredEvent_HardwareFaultAlert: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kHardwareFault, true); break; case kTriggeredEvent_HardwareFaultAlertClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kHardwareFault, false); break; case kTriggeredEvent_EndofServiceAlert: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kEndOfService, true); break; case kTriggeredEvent_EndofServiceAlertClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kEndOfService, false); break; @@ -283,26 +288,22 @@ void SmokeCoAlarmManager::TriggerEventHandler(AppEvent * aEvent) break; case kTriggeredEvent_InterconnectSmokeAlarm: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectSmoke, true); break; case kTriggeredEvent_InterconnectSmokeAlarmClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectSmoke, false); break; case kTriggeredEvent_InterconnectCOAlarm: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectCO, true); break; case kTriggeredEvent_InterconnectCOAlarmClear: - VerifyOrReturn(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), - chip::DeviceLayer::PlatformMgr().UnlockChipStack()); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), true); AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectCO, false); break; @@ -329,74 +330,9 @@ void SmokeCoAlarmManager::TriggerEventHandler(AppEvent * aEvent) case kTriggeredEvent_SensitivityLevelClear: SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kStandard); break; - } - - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); -} - -bool SmokeCoAlarmManager::OnSelfTesting() -{ - AppEvent event; - event.Handler = SelfTestingEventHandler; - AppTask::GetAppTask().PostEvent(&event); - - return true; -} - -bool SmokeCoAlarmManager::ManualSelfTesting() -{ - bool success = false; - - if ((mExpressedStateMask & 0b110010110) == 0) - { - chip::DeviceLayer::PlatformMgr().LockChipStack(); - success = AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kTesting, true); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - if (success) - { - success = OnSelfTesting(); - } - } - - return success; -} - -bool SmokeCoAlarmManager::OnEventTriggerHandle(uint64_t eventTrigger) -{ - bool isValidCommand = false; - switch (eventTrigger) - { - case kTriggeredEvent_WarningSmokeAlarm: - case kTriggeredEvent_CriticalSmokeAlarm: - case kTriggeredEvent_SmokeAlarmClear: - case kTriggeredEvent_WarningCOAlarm: - case kTriggeredEvent_CriticalCOAlarm: - case kTriggeredEvent_COAlarmClear: - case kTriggeredEvent_WarningBatteryAlert: - case kTriggeredEvent_CriticalBatteryAlert: - case kTriggeredEvent_BatteryAlertClear: - case kTriggeredEvent_HardwareFaultAlert: - case kTriggeredEvent_HardwareFaultAlertClear: - case kTriggeredEvent_EndofServiceAlert: - case kTriggeredEvent_EndofServiceAlertClear: - case kTriggeredEvent_DeviceMute: - case kTriggeredEvent_DeviceMuteClear: - case kTriggeredEvent_InterconnectSmokeAlarm: - case kTriggeredEvent_InterconnectSmokeAlarmClear: - case kTriggeredEvent_InterconnectCOAlarm: - case kTriggeredEvent_InterconnectCOAlarmClear: - case kTriggeredEvent_ContaminationStateHigh: - case kTriggeredEvent_ContaminationStateLow: - case kTriggeredEvent_ContaminationStateClear: - case kTriggeredEvent_SensitivityLevelHigh: - case kTriggeredEvent_SensitivityLevelLow: - case kTriggeredEvent_SensitivityLevelClear: - isValidCommand = true; - AlarmMgr().mEventTrigger = eventTrigger; - AlarmMgr().StartTimer(5000); - break; + default: + isValidCommand = false; } return isValidCommand; From b7f1a6d344214a1b14ffffc27db65f6052bcb6ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:41:21 +0000 Subject: [PATCH 005/159] Bump third_party/pigweed/repo from `2157b49` to `f4d0b35` (#28204) Bumps [third_party/pigweed/repo](https://github.com/google/pigweed) from `2157b49` to `f4d0b35`. - [Commits](https://github.com/google/pigweed/compare/2157b49553b7aac671b352b8972df44b511364af...f4d0b3563c09d945478267fcff619a959cd3e9f6) --- updated-dependencies: - dependency-name: third_party/pigweed/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/pigweed/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 2157b49553b7aa..f4d0b3563c09d9 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 2157b49553b7aac671b352b8972df44b511364af +Subproject commit f4d0b3563c09d945478267fcff619a959cd3e9f6 From 06c0b75e0c52fc3c410e031c49bb58d9d0ac072d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:42:29 +0000 Subject: [PATCH 006/159] Bump third_party/cirque/repo from `262ea77` to `1b37570` (#28203) Bumps [third_party/cirque/repo](https://github.com/openweave/cirque) from `262ea77` to `1b37570`. - [Commits](https://github.com/openweave/cirque/compare/262ea7724667229f0d21d6a1c1e96d90415f0906...1b375703af5dc9e00684a04c332a83b40a4c9dd8) --- updated-dependencies: - dependency-name: third_party/cirque/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/cirque/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/cirque/repo b/third_party/cirque/repo index 262ea772466722..1b375703af5dc9 160000 --- a/third_party/cirque/repo +++ b/third_party/cirque/repo @@ -1 +1 @@ -Subproject commit 262ea7724667229f0d21d6a1c1e96d90415f0906 +Subproject commit 1b375703af5dc9e00684a04c332a83b40a4c9dd8 From 5c6b539d0e6077a1a9abba6f07bc5d69c68baa38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:42:39 -0400 Subject: [PATCH 007/159] Bump third_party/pybind11/repo from `8de7772` to `8b03ffa` (#28202) Bumps [third_party/pybind11/repo](https://github.com/pybind/pybind11) from `8de7772` to `8b03ffa`. - [Release notes](https://github.com/pybind/pybind11/releases) - [Commits](https://github.com/pybind/pybind11/compare/8de7772cc72daca8e947b79b83fea46214931604...8b03ffa7c06cd9c8a38297b1c8923695d1ff1b07) --- updated-dependencies: - dependency-name: third_party/pybind11/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/pybind11/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/pybind11/repo b/third_party/pybind11/repo index 8de7772cc72dac..8b03ffa7c06cd9 160000 --- a/third_party/pybind11/repo +++ b/third_party/pybind11/repo @@ -1 +1 @@ -Subproject commit 8de7772cc72daca8e947b79b83fea46214931604 +Subproject commit 8b03ffa7c06cd9c8a38297b1c8923695d1ff1b07 From 3c253bbe312bd439d992743860ebeeb04b624f63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:43:30 +0000 Subject: [PATCH 008/159] Bump third_party/imgui/repo from `85395b7` to `1109de3` (#28201) Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `85395b7` to `1109de3`. - [Release notes](https://github.com/ocornut/imgui/releases) - [Commits](https://github.com/ocornut/imgui/compare/85395b76b08111961aa6e0ff026fd5152d48aa15...1109de38277fd2d14d4dca4c1cb8d4a2c4ff0f95) --- updated-dependencies: - dependency-name: third_party/imgui/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/imgui/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 85395b76b08111..1109de38277fd2 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 85395b76b08111961aa6e0ff026fd5152d48aa15 +Subproject commit 1109de38277fd2d14d4dca4c1cb8d4a2c4ff0f95 From 3df57b778a12c310e56cebe0d0a1ccff66a853d4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 09:49:02 -0400 Subject: [PATCH 009/159] Start switching platforms to C++17 (linux, mac) (#28170) * Switch linux, mac, android to C++17 by default * Update build/config/compiler/compiler.gni Co-authored-by: Boris Zbarsky * Restyled by gn --------- Co-authored-by: Andrei Litvin Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io --- build/config/compiler/compiler.gni | 3 ++- examples/all-clusters-app/linux/args.gni | 3 --- examples/all-clusters-minimal-app/linux/args.gni | 3 --- examples/bridge-app/linux/args.gni | 3 --- examples/chef/linux/with_pw_rpc.gni | 2 -- examples/contact-sensor-app/linux/args.gni | 3 --- examples/lighting-app/linux/args.gni | 3 --- examples/lighting-app/linux/with_pw_rpc.gni | 2 -- examples/lock-app/linux/args.gni | 3 --- examples/log-source-app/linux/args.gni | 3 --- examples/ota-provider-app/linux/args.gni | 3 --- examples/ota-requestor-app/linux/args.gni | 3 --- examples/persistent-storage/linux/args.gni | 3 --- examples/placeholder/linux/args.gni | 3 --- examples/thermostat/linux/args.gni | 3 --- examples/tv-app/linux/args.gni | 3 --- examples/tv-casting-app/linux/args.gni | 3 --- src/tracing/tracing_args.gni | 5 +---- 18 files changed, 3 insertions(+), 51 deletions(-) diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 5610b832b3ac16..12a93863be8ce0 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -43,7 +43,8 @@ declare_args() { c_standard = "gnu11" # C++ standard level (value for -std flag). - if (current_os == "android") { + if (current_os == "linux" || current_os == "mac" || current_os == "ios" || + current_os == "android") { cpp_standard = "gnu++17" } else { cpp_standard = "gnu++14" diff --git a/examples/all-clusters-app/linux/args.gni b/examples/all-clusters-app/linux/args.gni index 38e844a7016951..c4c9a18cec9cf5 100644 --- a/examples/all-clusters-app/linux/args.gni +++ b/examples/all-clusters-app/linux/args.gni @@ -27,6 +27,3 @@ chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true matter_log_json_payload_decode_full = true matter_log_json_payload_hex = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/all-clusters-minimal-app/linux/args.gni b/examples/all-clusters-minimal-app/linux/args.gni index a87d4da8fd9320..8b332edc7e2b06 100644 --- a/examples/all-clusters-minimal-app/linux/args.gni +++ b/examples/all-clusters-minimal-app/linux/args.gni @@ -25,6 +25,3 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/bridge-app/linux/args.gni b/examples/bridge-app/linux/args.gni index ba90537f6ea0b7..5b3e2965d4c77b 100644 --- a/examples/bridge-app/linux/args.gni +++ b/examples/bridge-app/linux/args.gni @@ -25,6 +25,3 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/chef/linux/with_pw_rpc.gni b/examples/chef/linux/with_pw_rpc.gni index 82ffc618f90078..0f1ab1ea89c121 100644 --- a/examples/chef/linux/with_pw_rpc.gni +++ b/examples/chef/linux/with_pw_rpc.gni @@ -21,8 +21,6 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -cpp_standard = "gnu++17" - 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" diff --git a/examples/contact-sensor-app/linux/args.gni b/examples/contact-sensor-app/linux/args.gni index a94078f1c1c071..f8fea8ea9e2e09 100644 --- a/examples/contact-sensor-app/linux/args.gni +++ b/examples/contact-sensor-app/linux/args.gni @@ -26,6 +26,3 @@ chip_project_config_include_dirs = [ "${chip_root}/examples/contact-sensor-app/linux/include" ] chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/lighting-app/linux/args.gni b/examples/lighting-app/linux/args.gni index 03e65b9c89f3e3..d07e8c87cdb15c 100644 --- a/examples/lighting-app/linux/args.gni +++ b/examples/lighting-app/linux/args.gni @@ -27,6 +27,3 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/lighting-app/linux/with_pw_rpc.gni b/examples/lighting-app/linux/with_pw_rpc.gni index 82ffc618f90078..0f1ab1ea89c121 100644 --- a/examples/lighting-app/linux/with_pw_rpc.gni +++ b/examples/lighting-app/linux/with_pw_rpc.gni @@ -21,8 +21,6 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -cpp_standard = "gnu++17" - 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" diff --git a/examples/lock-app/linux/args.gni b/examples/lock-app/linux/args.gni index db4d2e8c274da4..0d7bc33826b704 100644 --- a/examples/lock-app/linux/args.gni +++ b/examples/lock-app/linux/args.gni @@ -24,6 +24,3 @@ chip_project_config_include_dirs = [ "${chip_root}/examples/lock-app/linux/include" ] chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/log-source-app/linux/args.gni b/examples/log-source-app/linux/args.gni index 5c36fb0cb40b6f..7882354c242127 100644 --- a/examples/log-source-app/linux/args.gni +++ b/examples/log-source-app/linux/args.gni @@ -17,6 +17,3 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/ota-provider-app/linux/args.gni b/examples/ota-provider-app/linux/args.gni index 442c2ba4d43edc..8b4e77541610e6 100644 --- a/examples/ota-provider-app/linux/args.gni +++ b/examples/ota-provider-app/linux/args.gni @@ -24,6 +24,3 @@ chip_project_config_include_dirs = [ "${chip_root}/examples/ota-provider-app/linux/include" ] chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/ota-requestor-app/linux/args.gni b/examples/ota-requestor-app/linux/args.gni index ee072aeca2defc..f149ba204b1ea0 100644 --- a/examples/ota-requestor-app/linux/args.gni +++ b/examples/ota-requestor-app/linux/args.gni @@ -26,6 +26,3 @@ chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] chip_enable_ota_requestor = true matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/persistent-storage/linux/args.gni b/examples/persistent-storage/linux/args.gni index 7ee4af9262fd15..001edb60de8cdb 100644 --- a/examples/persistent-storage/linux/args.gni +++ b/examples/persistent-storage/linux/args.gni @@ -16,6 +16,3 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/placeholder/linux/args.gni b/examples/placeholder/linux/args.gni index 7a3a063a488116..ae1dbad6452207 100644 --- a/examples/placeholder/linux/args.gni +++ b/examples/placeholder/linux/args.gni @@ -23,6 +23,3 @@ chip_project_config_include_dirs = [ "${chip_root}/examples/placeholder/linux/include" ] chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/thermostat/linux/args.gni b/examples/thermostat/linux/args.gni index 9de55497298118..edb7411256d831 100644 --- a/examples/thermostat/linux/args.gni +++ b/examples/thermostat/linux/args.gni @@ -16,6 +16,3 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/tv-app/linux/args.gni b/examples/tv-app/linux/args.gni index 5193be22ff4cbb..aa476d37b80c30 100644 --- a/examples/tv-app/linux/args.gni +++ b/examples/tv-app/linux/args.gni @@ -31,6 +31,3 @@ chip_enable_additional_data_advertising = true chip_enable_rotating_device_id = true matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/examples/tv-casting-app/linux/args.gni b/examples/tv-casting-app/linux/args.gni index 0fb9de6aafe83f..03ba28645f8940 100644 --- a/examples/tv-casting-app/linux/args.gni +++ b/examples/tv-casting-app/linux/args.gni @@ -33,6 +33,3 @@ chip_enable_rotating_device_id = true chip_max_discovered_ip_addresses = 20 matter_enable_tracing_support = true - -# Perfetto requires C++17 -cpp_standard = "gnu++17" diff --git a/src/tracing/tracing_args.gni b/src/tracing/tracing_args.gni index e62a4e21410955..7c27f9ecaba39a 100644 --- a/src/tracing/tracing_args.gni +++ b/src/tracing/tracing_args.gni @@ -43,10 +43,7 @@ declare_args() { # since tracing is very noisy, we generally expect it to be explicitly # set up. # - # TODO: cpp_standard check is not ideal, it should be >= 17, - # however for now this is what we use in compilations - if ((current_os == "linux" || current_os == "android") && - cpp_standard == "gnu++17") { + if (current_os == "linux" || current_os == "android") { matter_trace_config = "${chip_root}/src/tracing/perfetto:perfetto_tracing" } else { matter_trace_config = "${chip_root}/src/tracing/none" From 484dcd8a131e7d78560f88be4ba654bf1df926fc Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Mon, 24 Jul 2023 21:49:29 +0800 Subject: [PATCH 010/159] =?UTF-8?q?Add=20Matter=201.2=20device=20type:=20R?= =?UTF-8?q?efrigerator/Laundry=20Washer/Temperature=20C=E2=80=A6=20(#28190?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add Matter 1.2 device type: Refrigerator/Laundry Washer/Temperature Controlled Cabinet * missing laundry washer controls in Laundry Washer defination * remove identify cluster in Temperature Controlled Cabinet defination --- .../zcl/data-model/chip/matter-devices.xml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 6432ad809fb1be..3c923129fb9f12 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1960,6 +1960,48 @@ limitations under the License. + + MA-refrigerator + CHIP + Matter Refrigerator + 0x0103 + 0x0070 + + + + + + + + + MA-laundry-washer + CHIP + Matter Laundry Washer + 0x0103 + 0x0073 + + + + + + + + + + + + MA-temperature-controlled-cabinet + CHIP + Matter Temperature Controlled Cabinet + 0x0103 + 0x0071 + + + + + + + MA-all-clusters-app CHIP From 100eab354de6b09ba36fff198fbd130468c5b8aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:25:17 +0200 Subject: [PATCH 011/159] [ci] Fix bloat-check after ghapi update to 1.0.4 (#28209) per_page argument was passed as a positional argument to list_artifacts_for_repo action, which stopped working after a new argument has been added to the action in ghapi 1.0.4. --- scripts/tools/memory/memdf/util/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/memory/memdf/util/github.py b/scripts/tools/memory/memdf/util/github.py index 53c59316507466..5312c1702a5829 100644 --- a/scripts/tools/memory/memdf/util/github.py +++ b/scripts/tools/memory/memdf/util/github.py @@ -130,7 +130,7 @@ def get_artifacts(self, page_limit: int = -1, per_page: int = -1): page = 0 for i in ghapi.all.paged( self.ghapi.actions.list_artifacts_for_repo, - per_page): + per_page=per_page): if not i.artifacts: break for a in i.artifacts: From a4dd8474bf5e7f0482a815de7cb4f019375d2d45 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 10:30:32 -0400 Subject: [PATCH 012/159] Add some `const` to TLVReader get methods (#28167) * Move some TLV reader get methods to const (integers and bools) * Move floating point getters to const * minor change to kick CI --------- Co-authored-by: Andrei Litvin --- src/lib/core/TLVReader.cpp | 22 +++++++++++----------- src/lib/core/TLVReader.h | 23 +++++++++++------------ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/lib/core/TLVReader.cpp b/src/lib/core/TLVReader.cpp index f03fc1b3cdac27..95d7f7c880fef3 100644 --- a/src/lib/core/TLVReader.cpp +++ b/src/lib/core/TLVReader.cpp @@ -117,7 +117,7 @@ uint32_t TLVReader::GetLength() const return 0; } -CHIP_ERROR TLVReader::Get(bool & v) +CHIP_ERROR TLVReader::Get(bool & v) const { TLVElementType elemType = ElementType(); if (elemType == TLVElementType::BooleanFalse) @@ -129,7 +129,7 @@ CHIP_ERROR TLVReader::Get(bool & v) return CHIP_NO_ERROR; } -CHIP_ERROR TLVReader::Get(int8_t & v) +CHIP_ERROR TLVReader::Get(int8_t & v) const { int64_t v64 = 0; CHIP_ERROR err = Get(v64); @@ -141,7 +141,7 @@ CHIP_ERROR TLVReader::Get(int8_t & v) return err; } -CHIP_ERROR TLVReader::Get(int16_t & v) +CHIP_ERROR TLVReader::Get(int16_t & v) const { int64_t v64 = 0; CHIP_ERROR err = Get(v64); @@ -153,7 +153,7 @@ CHIP_ERROR TLVReader::Get(int16_t & v) return err; } -CHIP_ERROR TLVReader::Get(int32_t & v) +CHIP_ERROR TLVReader::Get(int32_t & v) const { int64_t v64 = 0; CHIP_ERROR err = Get(v64); @@ -165,7 +165,7 @@ CHIP_ERROR TLVReader::Get(int32_t & v) return err; } -CHIP_ERROR TLVReader::Get(int64_t & v) +CHIP_ERROR TLVReader::Get(int64_t & v) const { // Internal callers of this method depend on it not modifying "v" on failure. switch (ElementType()) @@ -189,7 +189,7 @@ CHIP_ERROR TLVReader::Get(int64_t & v) return CHIP_NO_ERROR; } -CHIP_ERROR TLVReader::Get(uint8_t & v) +CHIP_ERROR TLVReader::Get(uint8_t & v) const { uint64_t v64 = 0; CHIP_ERROR err = Get(v64); @@ -201,7 +201,7 @@ CHIP_ERROR TLVReader::Get(uint8_t & v) return err; } -CHIP_ERROR TLVReader::Get(uint16_t & v) +CHIP_ERROR TLVReader::Get(uint16_t & v) const { uint64_t v64 = 0; CHIP_ERROR err = Get(v64); @@ -213,7 +213,7 @@ CHIP_ERROR TLVReader::Get(uint16_t & v) return err; } -CHIP_ERROR TLVReader::Get(uint32_t & v) +CHIP_ERROR TLVReader::Get(uint32_t & v) const { uint64_t v64 = 0; CHIP_ERROR err = Get(v64); @@ -225,7 +225,7 @@ CHIP_ERROR TLVReader::Get(uint32_t & v) return err; } -CHIP_ERROR TLVReader::Get(uint64_t & v) +CHIP_ERROR TLVReader::Get(uint64_t & v) const { // Internal callers of this method depend on it not modifying "v" on failure. switch (ElementType()) @@ -256,7 +256,7 @@ float BitCastToFloat(const uint64_t elemLenOrVal) // between float and double wherever possible, because these conversions are // relatively expensive on platforms that use soft-float instruction sets. -CHIP_ERROR TLVReader::Get(float & v) +CHIP_ERROR TLVReader::Get(float & v) const { switch (ElementType()) { @@ -270,7 +270,7 @@ CHIP_ERROR TLVReader::Get(float & v) return CHIP_NO_ERROR; } -CHIP_ERROR TLVReader::Get(double & v) +CHIP_ERROR TLVReader::Get(double & v) const { switch (ElementType()) { diff --git a/src/lib/core/TLVReader.h b/src/lib/core/TLVReader.h index 29f5812039187b..69aed99f3eabac 100644 --- a/src/lib/core/TLVReader.h +++ b/src/lib/core/TLVReader.h @@ -31,7 +31,6 @@ #include #include "TLVCommon.h" - #include "TLVWriter.h" /** @@ -283,7 +282,7 @@ class DLL_EXPORT TLVReader * @retval #CHIP_ERROR_WRONG_TLV_TYPE If the current element is not a TLV boolean type, or the * reader is not positioned on an element. */ - CHIP_ERROR Get(bool & v); + CHIP_ERROR Get(bool & v) const; /** * Get the value of the current element as an 8-bit signed integer. @@ -298,7 +297,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(int8_t & v); + CHIP_ERROR Get(int8_t & v) const; /** * Get the value of the current element as a 16-bit signed integer. @@ -313,7 +312,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(int16_t & v); + CHIP_ERROR Get(int16_t & v) const; /** * Get the value of the current element as a 32-bit signed integer. @@ -328,7 +327,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(int32_t & v); + CHIP_ERROR Get(int32_t & v) const; /** * Get the value of the current element as a 64-bit signed integer. @@ -343,7 +342,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(int64_t & v); + CHIP_ERROR Get(int64_t & v) const; /** * Get the value of the current element as an 8-bit unsigned integer. @@ -359,7 +358,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(uint8_t & v); + CHIP_ERROR Get(uint8_t & v) const; /** * Get the value of the current element as a 16-bit unsigned integer. @@ -375,7 +374,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(uint16_t & v); + CHIP_ERROR Get(uint16_t & v) const; /** * Get the value of the current element as a 32-bit unsigned integer. @@ -391,7 +390,7 @@ class DLL_EXPORT TLVReader unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(uint32_t & v); + CHIP_ERROR Get(uint32_t & v) const; /** * Get the value of the current element as a 64-bit unsigned integer. @@ -405,7 +404,7 @@ class DLL_EXPORT TLVReader * unsigned), or the reader is not positioned on an element. * */ - CHIP_ERROR Get(uint64_t & v); + CHIP_ERROR Get(uint64_t & v) const; /** * Get the value of the current element as a double-precision floating point number. @@ -417,7 +416,7 @@ class DLL_EXPORT TLVReader * the reader is not positioned on an element. * */ - CHIP_ERROR Get(double & v); + CHIP_ERROR Get(double & v) const; /** * Get the value of the current element as a single-precision floating point number. @@ -429,7 +428,7 @@ class DLL_EXPORT TLVReader * the reader is not positioned on an element. * */ - CHIP_ERROR Get(float & v); + CHIP_ERROR Get(float & v) const; /** * Get the value of the current element as a ByteSpan From b1b324e0115d4a020789e7c2dd09c92778a3ac42 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 10:32:11 -0400 Subject: [PATCH 013/159] Switch repl tests to use human-readable decodes (#28171) Co-authored-by: Andrei Litvin --- .github/workflows/tests.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0a7c5d6addb91a..99f7055113d2ec 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -438,22 +438,22 @@ jobs: - name: Run Tests run: | 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 --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - 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_decode 1" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_DeviceBasicComposition.py" --script-args "--storage-path admin_storage.json --manual-code 10054912339"' - 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_decode 1" --script "src/python_testing/TC_SC_3_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_DA_1_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' - 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_decode 1 --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_TestEventTrigger.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' - 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_decode 1" --script "src/python_testing/TC_ACE_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_ACE_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --int-arg PIXIT.ACE.APPENDPOINT:1 PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff PIXIT.ACE.APPATTRIBUTE:OnOff"' - 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_decode 1" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_DA_1_2.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"' - 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_decode 1" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_DA_1_5.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"' - 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_decode 1" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_FAN_3_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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_decode 1" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_DeviceBasicComposition.py" --script-args "--storage-path admin_storage.json --manual-code 10054912339"' + 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:log" --script "src/python_testing/TC_SC_3_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_DA_1_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' + 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:log --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_TestEventTrigger.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' + 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:log" --script "src/python_testing/TC_ACE_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_ACE_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --int-arg PIXIT.ACE.APPENDPOINT:1 PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff PIXIT.ACE.APPATTRIBUTE:OnOff"' + 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:log" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_DA_1_2.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"' + 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:log" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_DA_1_5.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"' + 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:log" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_FAN_3_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + 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:log" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py"' - name: Uploading core files uses: actions/upload-artifact@v3 From 0e0fd72befb24759347c43c5eca2d88fc03d89d1 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 10:35:58 -0400 Subject: [PATCH 014/159] Make TLVReader getter const for ByteSpan and CharSpan (#28169) * Move some TLV reader get methods to const (integers and bools) * Move floating point getters to const * Make use of new newly const support in protocol decoder printers * Restyled by clang-format * Another minor simplification --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- src/lib/core/TLVReader.cpp | 41 +++++++++++------------------ src/lib/core/TLVReader.h | 13 +++++---- src/lib/format/protocol_decoder.cpp | 4 +-- 3 files changed, 23 insertions(+), 35 deletions(-) diff --git a/src/lib/core/TLVReader.cpp b/src/lib/core/TLVReader.cpp index 95d7f7c880fef3..c44d0947d87d1c 100644 --- a/src/lib/core/TLVReader.cpp +++ b/src/lib/core/TLVReader.cpp @@ -290,7 +290,7 @@ CHIP_ERROR TLVReader::Get(double & v) const return CHIP_NO_ERROR; } -CHIP_ERROR TLVReader::Get(ByteSpan & v) +CHIP_ERROR TLVReader::Get(ByteSpan & v) const { const uint8_t * val; ReturnErrorOnFailure(GetDataPtr(val)); @@ -304,7 +304,7 @@ constexpr int kUnicodeInformationSeparator1 = 0x1F; constexpr size_t kMaxLocalizedStringIdentifierLen = 2 * sizeof(LocalizedStringIdentifier); } // namespace -CHIP_ERROR TLVReader::Get(CharSpan & v) +CHIP_ERROR TLVReader::Get(CharSpan & v) const { if (!TLVTypeIsUTF8String(ElementType())) { @@ -460,12 +460,9 @@ CHIP_ERROR TLVReader::DupString(char *& buf) return err; } -CHIP_ERROR TLVReader::GetDataPtr(const uint8_t *& data) +CHIP_ERROR TLVReader::GetDataPtr(const uint8_t *& data) const { - CHIP_ERROR err; - - if (!TLVTypeIsString(ElementType())) - return CHIP_ERROR_WRONG_TLV_TYPE; + VerifyOrReturnError(TLVTypeIsString(ElementType()), CHIP_ERROR_WRONG_TLV_TYPE); if (GetLength() == 0) { @@ -473,19 +470,12 @@ CHIP_ERROR TLVReader::GetDataPtr(const uint8_t *& data) return CHIP_NO_ERROR; } - err = EnsureData(CHIP_ERROR_TLV_UNDERRUN); - if (err != CHIP_NO_ERROR) - return err; - uint32_t remainingLen = static_cast(mBufEnd - mReadPoint); // Verify that the entirety of the data is available in the buffer. // Note that this may not be possible if the reader is reading from a chain of buffers. - if (remainingLen < static_cast(mElemLenOrVal)) - return CHIP_ERROR_TLV_UNDERRUN; - + VerifyOrReturnError(remainingLen >= static_cast(mElemLenOrVal), CHIP_ERROR_TLV_UNDERRUN); data = mReadPoint; - return CHIP_NO_ERROR; } @@ -576,20 +566,19 @@ CHIP_ERROR TLVReader::VerifyEndOfContainer() CHIP_ERROR TLVReader::Next() { - CHIP_ERROR err; - TLVElementType elemType = ElementType(); + ReturnErrorOnFailure(Skip()); + ReturnErrorOnFailure(ReadElement()); - err = Skip(); - if (err != CHIP_NO_ERROR) - return err; + TLVElementType elemType = ElementType(); - err = ReadElement(); - if (err != CHIP_NO_ERROR) - return err; + VerifyOrReturnError(elemType != TLVElementType::EndOfContainer, CHIP_END_OF_TLV); - elemType = ElementType(); - if (elemType == TLVElementType::EndOfContainer) - return CHIP_END_OF_TLV; + // Ensure that GetDataPtr calls can be called immediately after Next, so + // that `Get(ByteSpan&)` does not need to advance buffers and just works + if (TLVTypeIsString(elemType) && (GetLength() != 0)) + { + ReturnErrorOnFailure(EnsureData(CHIP_ERROR_TLV_UNDERRUN)); + } return CHIP_NO_ERROR; } diff --git a/src/lib/core/TLVReader.h b/src/lib/core/TLVReader.h index 69aed99f3eabac..caf56332762e79 100644 --- a/src/lib/core/TLVReader.h +++ b/src/lib/core/TLVReader.h @@ -440,7 +440,7 @@ class DLL_EXPORT TLVReader * the reader is not positioned on an element. * */ - CHIP_ERROR Get(ByteSpan & v); + CHIP_ERROR Get(ByteSpan & v) const; /** * Get the value of the current element as a FixedByteSpan @@ -453,7 +453,7 @@ class DLL_EXPORT TLVReader * */ template - CHIP_ERROR Get(FixedByteSpan & v) + CHIP_ERROR Get(FixedByteSpan & v) const { const uint8_t * val; ReturnErrorOnFailure(GetDataPtr(val)); @@ -472,7 +472,7 @@ class DLL_EXPORT TLVReader * the reader is not positioned on an element. * */ - CHIP_ERROR Get(CharSpan & v); + CHIP_ERROR Get(CharSpan & v) const; /** * Get the Localized String Identifier contained in the current element.. @@ -634,9 +634,8 @@ class DLL_EXPORT TLVReader * Get a pointer to the initial encoded byte of a TLV byte or UTF8 string element. * * This method returns a direct pointer to the encoded string value within the underlying input buffer - * if a non-zero length string payload is present. To succeed, the method requires that the entirety of the - * string value be present in a single buffer. Otherwise the method returns #CHIP_ERROR_TLV_UNDERRUN. - * This makes the method of limited use when reading data from multiple discontiguous buffers. + * as fetched by `Next`. To succeed, the method requires that the entirety of the + * string value be present in a single buffer. * * If no string data is present (i.e the length is zero), data shall be updated to point to null. * @@ -653,7 +652,7 @@ class DLL_EXPORT TLVReader * TLVBackingStore. * */ - CHIP_ERROR GetDataPtr(const uint8_t *& data); + CHIP_ERROR GetDataPtr(const uint8_t *& data) const; /** * Prepares a TLVReader object for reading the members of TLV container element. diff --git a/src/lib/format/protocol_decoder.cpp b/src/lib/format/protocol_decoder.cpp index 4752dfaee9c8b4..5f787a9982b286 100644 --- a/src/lib/format/protocol_decoder.cpp +++ b/src/lib/format/protocol_decoder.cpp @@ -45,7 +45,7 @@ class ByTag const Tag mTag; }; -CHIP_ERROR FormatCurrentValue(TLVReader & reader, chip::StringBuilderBase & out) +CHIP_ERROR FormatCurrentValue(const TLVReader & reader, chip::StringBuilderBase & out) { switch (reader.GetType()) { @@ -105,7 +105,7 @@ CHIP_ERROR FormatCurrentValue(TLVReader & reader, chip::StringBuilderBase & out) } // Returns a null terminated string containing the current reader value -void PrettyPrintCurrentValue(TLVReader & reader, chip::StringBuilderBase & out, PayloadDecoderBase::DecodePosition & position) +void PrettyPrintCurrentValue(const TLVReader & reader, chip::StringBuilderBase & out, PayloadDecoderBase::DecodePosition & position) { CHIP_ERROR err = FormatCurrentValue(reader, out); From 126eadc3c3b9c4ed0c53bf4b5aadd1d9a0823261 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:13:59 +0000 Subject: [PATCH 015/159] Bump third_party/ot-br-posix/repo from `5417069` to `8a6c5a0` (#28199) Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `5417069` to `8a6c5a0`. - [Release notes](https://github.com/openthread/ot-br-posix/releases) - [Commits](https://github.com/openthread/ot-br-posix/compare/54170696d122bd4901fe0917417bfafe85c36041...8a6c5a03a2eec6e71cfed0fe35451841ca24bb4e) --- updated-dependencies: - dependency-name: third_party/ot-br-posix/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/ot-br-posix/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/ot-br-posix/repo b/third_party/ot-br-posix/repo index 54170696d122bd..8a6c5a03a2eec6 160000 --- a/third_party/ot-br-posix/repo +++ b/third_party/ot-br-posix/repo @@ -1 +1 @@ -Subproject commit 54170696d122bd4901fe0917417bfafe85c36041 +Subproject commit 8a6c5a03a2eec6e71cfed0fe35451841ca24bb4e From d328c30ffb91b1703ddd09e5a060fd3cd2e47b5b Mon Sep 17 00:00:00 2001 From: fengdx4 <131833628+fengdx4@users.noreply.github.com> Date: Mon, 24 Jul 2023 23:18:02 +0800 Subject: [PATCH 016/159] Feature/dishwasher alarm impl (#27748) * init disdwasher alarm * add dishwasher alarm zap * format file * Restyled by whitespace * Restyled by clang-format * init disdwasher alarm * add dishwasher alarm zap * format file * Restyled by whitespace * Restyled by clang-format * modify dishwasheralarm Supported * revert * Restyled by clang-format * modify dishwasher alarm * modify dishwasher alarm latch support * add all cluster zap * modify dishwasher alarm latch support * modify all cluster zap * Restyled by whitespace * Restyled by clang-format * Add TestDishwasherAlarm * Modify dishwasher cluster definition in all-cluster-app * add dishwasher alarm cluster * Restyled by whitespace and Tab * Optimize the dishwasher alarm cluster * Optimize the alarm dishwasher alarm server * Using namespace to optimize the head file * Add dishwasher alarm cluster delegate * optimize TestDishwasherAlarm * init DishwasherAlarmServer instance in all-cluster-app * Move the dishwasher alarm plugin server init * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-yaml * optimize the note for dishwasher alarm server and delegate * optimize the note in ciTest * rename and note the function. * use static to modify variable * Fix some bug not match with dishwasher alarm cluster's spec * modify the init value of attribute in dishwasher alarm cluster in all-cluster-app * optimize the TestDishwasherAlarm * take off prefix of variable chip:: * Optimize SetStateByLatch api * fix CI build error * optimize document of function in dishwasher alarm cluster * modify with review advice * Optimize StateStateValue and ResetStateValue function * fix SetStateValue function error * Restyled by whitespace * Restyled by clang-format * fix zap error * modify the State attribute in Dishwasher alarm in zap * fix CI build error * Remove function. * Update src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp Co-authored-by: Boris Zbarsky * Update src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h Co-authored-by: Boris Zbarsky * Update src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h Co-authored-by: Boris Zbarsky * Update src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp Co-authored-by: Boris Zbarsky * Updates per review * Update src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h Co-authored-by: Boris Zbarsky * fix TestScript error in TestDishwasherAlarm * zap regen all * fix the document * Restyled by whitespace * Restyled by gn --------- Co-authored-by: Restyled.io Co-authored-by: mideayanghui Co-authored-by: Rob Bultman Co-authored-by: Boris Zbarsky --- .../all-clusters-app.matter | 55 ++ .../all-clusters-common/all-clusters-app.zap | 239 ++++++ .../src/dishwasher-alarm-stub.cpp | 142 ++++ .../esp32/main/CMakeLists.txt | 1 + examples/all-clusters-app/linux/BUILD.gn | 1 + .../all-clusters-app/linux/main-common.cpp | 7 + src/app/chip_data_model.gni | 6 + .../dishwasher-alarm-delegate.h | 69 ++ .../dishwasher-alarm-server.cpp | 398 ++++++++++ .../dishwasher-alarm-server.h | 89 +++ src/app/tests/suites/TestDishwasherAlarm.yaml | 190 +++++ src/app/tests/suites/ciTests.json | 3 +- src/app/util/util.cpp | 1 + .../chip-tool/zap-generated/test/Commands.h | 344 +++++++++ .../zap-generated/test/Commands.h | 713 ++++++++++++++++++ 15 files changed, 2257 insertions(+), 1 deletion(-) create mode 100644 examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp create mode 100644 src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h create mode 100644 src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp create mode 100644 src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h create mode 100644 src/app/tests/suites/TestDishwasherAlarm.yaml 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 9381838d79410e..32c8d1fe1b3c0a 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 @@ -2919,6 +2919,47 @@ server cluster SmokeCoAlarm = 92 { command SelfTestRequest(): DefaultSuccess = 0; } +/** Attributes and commands for configuring the Dishwasher alarm. */ +server cluster DishwasherAlarm = 93 { + bitmap AlarmMap : BITMAP32 { + kInflowError = 0x1; + kDrainError = 0x2; + kDoorError = 0x4; + kTempTooLow = 0x8; + kTempTooHigh = 0x10; + kWaterLevelError = 0x20; + } + + info event Notify = 0 { + AlarmMap active = 0; + AlarmMap inactive = 1; + AlarmMap state = 2; + AlarmMap mask = 3; + } + + readonly attribute AlarmMap mask = 0; + readonly attribute AlarmMap latch = 1; + readonly attribute AlarmMap state = 2; + readonly attribute AlarmMap supported = 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 ResetRequest { + AlarmMap alarms = 0; + } + + request struct ModifyEnabledAlarmsRequest { + AlarmMap mask = 0; + } + + command Reset(ResetRequest): DefaultSuccess = 0; + command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1; +} + /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ server cluster OperationalState = 96 { enum ErrorStateEnum : ENUM8 { @@ -6676,6 +6717,20 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster DishwasherAlarm { + emits event Notify; + ram attribute mask default = 1; + ram attribute latch default = 1; + ram attribute state default = 0; + ram attribute supported default = 15; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + server cluster OperationalState { emits event OperationalError; emits event OperationCompletion; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 9e7e08f0f57a3e..365337854727ed 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -15739,6 +15739,245 @@ } ] }, + { + "name": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Reset", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ModifyEnabledAlarms", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "15", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "1", + "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": "Notify", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, { "name": "Operational State", "code": 96, 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 new file mode 100644 index 00000000000000..58d393752c8bfd --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp @@ -0,0 +1,142 @@ +/* + * + * 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. + * 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. + */ +#include +#include +#include + +using namespace chip; + +namespace chip { +namespace app { +namespace Clusters { +namespace DishwasherAlarm { + +class DishwasherAlarmDelegate : public Delegate +{ +public: + /** + * @brief + * A notification that the Mask attribute will be changed. When this happens, some previously suppressed + * alarms may need to be enabled, and previously enabled alarms may need to be suppressed. + * @param[in] mask The new value of the Mask attribute. + * @return The cluster will do this update if ModifyEnabledAlarmsCallback() returns true. + * The cluster will not do this update if ModifyEnabledAlarmsCallback() returns false. + */ + bool ModifyEnabledAlarmsCallback(const BitMask mask) override; + + /** + * @brief + * A notification that resets active alarms (if possible) + * @param[in] alarms The value of reset alarms + * @return The cluster will reset active alarms if ResetAlarmsCallback() returns true. + * The cluster will not reset active alarms if ResetAlarmsCallback() returns false. + */ + bool ResetAlarmsCallback(const BitMask alarms) override; + + ~DishwasherAlarmDelegate() = default; +}; + +bool DishwasherAlarmDelegate::ModifyEnabledAlarmsCallback(const BitMask mask) +{ + // placeholder implementation + return true; +} + +bool DishwasherAlarmDelegate::ResetAlarmsCallback(const BitMask alarms) +{ + // placeholder implementation + return true; +} + +} // namespace DishwasherAlarm +} // namespace Clusters +} // namespace app +} // namespace chip + +/* + * An example to present device's endpointId + */ +static constexpr EndpointId kDemoEndpointId = 1; + +void MatterDishwasherAlarmServerInit() +{ + using namespace app::Clusters; + using namespace app::Clusters::DishwasherAlarm; + + static DishwasherAlarm::DishwasherAlarmDelegate delegate; + DishwasherAlarm::SetDefaultDelegate(kDemoEndpointId, &delegate); + + // Set Supported attribute = 0x2F = 47 + // Bit Name Value + // 0 InflowError 1 + // 1 DrainError 1 + // 2 DoorError 1 + // 3 TempTooLow 1 + // 4 TempTooHigh 0 + // 5 WaterLevelError 1 + BitMask supported; + supported.SetField(AlarmMap::kInflowError, 1); + supported.SetField(AlarmMap::kDrainError, 1); + supported.SetField(AlarmMap::kDoorError, 1); + supported.SetField(AlarmMap::kTempTooLow, 1); + supported.SetField(AlarmMap::kWaterLevelError, 1); + DishwasherAlarmServer::Instance().SetSupportedValue(kDemoEndpointId, supported); + + // Set Mask attribute = 0x2F = 47 + // Bit Name Value + // 0 InflowError 1 + // 1 DrainError 1 + // 2 DoorError 1 + // 3 TempTooLow 1 + // 4 TempTooHigh 0 + // 5 WaterLevelError 1 + BitMask mask; + mask.SetField(AlarmMap::kInflowError, 1); + mask.SetField(AlarmMap::kDrainError, 1); + mask.SetField(AlarmMap::kDoorError, 1); + mask.SetField(AlarmMap::kTempTooLow, 1); + mask.SetField(AlarmMap::kWaterLevelError, 1); + DishwasherAlarmServer::Instance().SetMaskValue(kDemoEndpointId, mask); + + // Set Latch attribute = 0x03 + // Bit Name Value + // 0 InflowError 1 + // 1 DrainError 1 + // 2 DoorError 0 + // 3 TempTooLow 0 + // 4 TempTooHigh 0 + // 5 WaterLevelError 0 + BitMask latch; + latch.SetField(AlarmMap::kInflowError, 1); + latch.SetField(AlarmMap::kDrainError, 1); + DishwasherAlarmServer::Instance().SetLatchValue(kDemoEndpointId, latch); + + // Set State attribute = 0x07 + // Bit Name Value + // 0 InflowError 1 + // 1 DrainError 1 + // 2 DoorError 1 + // 3 TempTooLow 0 + // 4 TempTooHigh 0 + // 5 WaterLevelError 0 + BitMask state; + state.SetField(AlarmMap::kInflowError, 1); + state.SetField(AlarmMap::kDrainError, 1); + state.SetField(AlarmMap::kDoorError, 1); + DishwasherAlarmServer::Instance().SetStateValue(kDemoEndpointId, state); +} diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 90ba706cfa8556..14015338230788 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -95,6 +95,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/resource-monitoring-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/temperature-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/dishwasher-alarm-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src" ) diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index bdaf4945e3ae4f..72cd65ba55bc9e 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -23,6 +23,7 @@ source_set("chip-all-clusters-common") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 7894a781a6f278..0ebeff439e9dc2 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -61,6 +61,9 @@ app::Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSup #ifdef EMBER_AF_PLUGIN_OPERATIONAL_STATE_SERVER extern void MatterOperationalStateServerInit(); #endif +#ifdef EMBER_AF_PLUGIN_DISHWASHER_ALARM_SERVER +extern void MatterDishwasherAlarmServerInit(); +#endif void OnIdentifyStart(::Identify *) { @@ -181,6 +184,10 @@ void ApplicationInit() #ifdef EMBER_AF_PLUGIN_OPERATIONAL_STATE_SERVER MatterOperationalStateServerInit(); #endif + +#ifdef EMBER_AF_PLUGIN_DISHWASHER_ALARM_SERVER + MatterDishwasherAlarmServerInit(); +#endif app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); } diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 8eae0fcf8c0c6c..1724d1048a304c 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -270,6 +270,12 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/${cluster}.h", "${_app_root}/clusters/${cluster}/operational-state-delegate.h", ] + } else if (cluster == "dishwasher-alarm-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/${cluster}.h", + "${_app_root}/clusters/${cluster}/dishwasher-alarm-delegate.h", + ] } else if (cluster == "icd-management-server") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h new file mode 100644 index 00000000000000..5f4e77242a49e7 --- /dev/null +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h @@ -0,0 +1,69 @@ +/* + * + * 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. + * 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 +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace DishwasherAlarm { + +/** @brief + * Defines methods for implementing application-specific logic for the DishwasherAlarm Cluster. + */ +class Delegate +{ +public: + /** + * @brief + * A notification that the Mask attribute will be changed. When this happens, some previously suppressed + * alarms may need to be enabled, and previously enabled alarms may need to be suppressed. + * @param[in] mask The new value of the Mask attribute. + * @return The cluster will do this update if ModifyEnabledAlarmsCallback() returns true. + * the cluster will not do this update if ModifyEnabledAlarmsCallback() returns false. + */ + virtual bool ModifyEnabledAlarmsCallback(const BitMask mask) = 0; + + /** + * @brief + * A notification that resets active alarms (if possible) + * @param[in] alarms The value of reset alarms + * @return The cluster will reset active alarms if ResetAlarmsCallback() returns true. + * The cluster will not reset active alarms if ResetAlarmsCallback() returns false. + */ + virtual bool ResetAlarmsCallback(const BitMask alarms) = 0; + + Delegate(EndpointId endpoint) : mEndpoint(endpoint) {} + + Delegate() = default; + + virtual ~Delegate() = default; + +protected: + EndpointId mEndpoint = 0; +}; + +} // namespace DishwasherAlarm +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp new file mode 100644 index 00000000000000..c0d167f2993ec6 --- /dev/null +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp @@ -0,0 +1,398 @@ +/** + * + * 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. + * + */ +#include "dishwasher-alarm-server.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DishwasherAlarm; +using namespace chip::app::Clusters::DishwasherAlarm::Attributes; +using namespace chip::DeviceLayer; +using chip::Protocols::InteractionModel::Status; +using namespace std; + +static constexpr size_t kDishwasherAlarmDelegateTableSize = + EMBER_AF_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; + +static_assert(kDishwasherAlarmDelegateTableSize <= kEmberInvalidEndpointIndex, "Dishwasher Alarm Delegate table size error"); + +namespace chip { +namespace app { +namespace Clusters { +namespace DishwasherAlarm { + +Delegate * gDelegateTable[kDishwasherAlarmDelegateTableSize] = { nullptr }; + +Delegate * GetDelegate(EndpointId endpoint) +{ + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, DishwasherAlarm::Id, + EMBER_AF_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT); + return (ep >= kDishwasherAlarmDelegateTableSize ? nullptr : gDelegateTable[ep]); +} + +void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate) +{ + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, DishwasherAlarm::Id, + EMBER_AF_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT); + // if endpoint is found + if (ep < kDishwasherAlarmDelegateTableSize) + { + gDelegateTable[ep] = delegate; + } +} + +} // namespace DishwasherAlarm +} // namespace Clusters +} // namespace app +} // namespace chip + +DishwasherAlarmServer DishwasherAlarmServer::instance; + +DishwasherAlarmServer & DishwasherAlarmServer::Instance() +{ + return instance; +} + +EmberAfStatus DishwasherAlarmServer::GetMaskValue(EndpointId endpoint, BitMask * mask) +{ + EmberAfStatus status = Attributes::Mask::Get(endpoint, mask); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: reading mask, err:0x%x", status); + return status; + } + return status; +} + +EmberAfStatus DishwasherAlarmServer::GetLatchValue(EndpointId endpoint, BitMask * latch) +{ + if (!HasResetFeature(endpoint)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm feature: Unsupport Latch attribute"); + return EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; + } + + EmberAfStatus status = Attributes::Latch::Get(endpoint, latch); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: reading latch, err:0x%x", status); + return status; + } + return status; +} + +EmberAfStatus DishwasherAlarmServer::GetStateValue(EndpointId endpoint, BitMask * state) +{ + EmberAfStatus status = Attributes::State::Get(endpoint, state); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: get state, err:0x%x", status); + return status; + } + return status; +} + +EmberAfStatus DishwasherAlarmServer::GetSupportedValue(EndpointId endpoint, BitMask * supported) +{ + EmberAfStatus status = Attributes::Supported::Get(endpoint, supported); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: reading supported, err:0x%x", status); + } + return status; +} + +EmberAfStatus DishwasherAlarmServer::SetSupportedValue(EndpointId endpoint, const BitMask supported) +{ + EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; + ; + if ((status = Attributes::Supported::Set(endpoint, supported)) != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: writing supported, err:0x%x", status); + return status; + } + // Whenever there is change in Supported attribute, Latch should change accordingly (if possible). + BitMask latch; + if (GetLatchValue(endpoint, &latch) == EMBER_ZCL_STATUS_SUCCESS && !supported.HasAll(latch)) + { + latch = latch & supported; + status = SetLatchValue(endpoint, latch); + } + + // Whenever there is change in Supported attribute, Mask, State should change accordingly. + BitMask mask; + if ((status = GetMaskValue(endpoint, &mask)) != EMBER_ZCL_STATUS_SUCCESS) + { + return status; + } + + if (!supported.HasAll(mask)) + { + mask = supported & mask; + status = SetMaskValue(endpoint, mask); + } + return status; +} + +EmberAfStatus DishwasherAlarmServer::SetMaskValue(EndpointId endpoint, const BitMask mask) +{ + BitMask supported; + if (GetSupportedValue(endpoint, &supported) || !supported.HasAll(mask)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: Mask is not supported"); + return EMBER_ZCL_STATUS_FAILURE; + } + + EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; + if ((status = Attributes::Mask::Set(endpoint, mask)) != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: writing mask, err:0x%x", status); + return status; + } + + // Whenever there is change in Mask, State should change accordingly. + BitMask state; + status = GetStateValue(endpoint, &state); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + return status; + } + + if (!mask.HasAll(state)) + { + state = mask & state; + status = SetStateValue(endpoint, state, true); + } + return status; +} + +EmberAfStatus DishwasherAlarmServer::SetLatchValue(EndpointId endpoint, const BitMask latch) +{ + if (!HasResetFeature(endpoint)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm feature: Unsupport Latch attribute"); + return EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; + } + + BitMask supported; + if (GetSupportedValue(endpoint, &supported) || !supported.HasAll(latch)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: Latch is not supported"); + return EMBER_ZCL_STATUS_FAILURE; + } + + EmberAfStatus status = Attributes::Latch::Set(endpoint, latch); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: writing latch, err:0x%x", status); + return status; + } + + return status; +} + +EmberAfStatus DishwasherAlarmServer::SetStateValue(EndpointId endpoint, const BitMask newState, bool ignoreLatchState) +{ + BitMask supported; + BitMask finalNewState; + finalNewState.Set(newState); + + if (GetSupportedValue(endpoint, &supported) || !supported.HasAll(finalNewState)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: Alarm is not supported"); + return EMBER_ZCL_STATUS_FAILURE; + } + + BitMask mask; + if (GetMaskValue(endpoint, &mask) || !mask.HasAll(finalNewState)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: Alarm is suppressed"); + return EMBER_ZCL_STATUS_FAILURE; + } + + EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; + BitMask currentState; + status = Attributes::State::Get(endpoint, ¤tState); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: reading state, err:0x%x", status); + return status; + } + + BitMask latch; + if (!ignoreLatchState && (GetLatchValue(endpoint, &latch) == EMBER_ZCL_STATUS_SUCCESS)) + { + // Restore bits that have their Latch bit set. + auto bitsToKeep = latch & currentState; + finalNewState.Set(bitsToKeep); + } + + // Store the new value of the State attribute. + status = Attributes::State::Set(endpoint, finalNewState); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: writing state, err:0x%x", status); + return status; + } + + // Generate Notify event. + BitMask becameActive; + becameActive.Set(finalNewState).Clear(currentState); + BitMask becameInactive; + becameInactive.Set(currentState).Clear(finalNewState); + + SendNotifyEvent(endpoint, becameActive, becameInactive, finalNewState, mask); + return status; +} + +EmberAfStatus DishwasherAlarmServer::ResetLatchedAlarms(EndpointId endpoint, const BitMask alarms) +{ + BitMask supported; + if (GetSupportedValue(endpoint, &supported) || !supported.HasAll(alarms)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm: ERR: Alarm is not supported"); + return EMBER_ZCL_STATUS_FAILURE; + } + + BitMask state; + if (GetStateValue(endpoint, &state) != EMBER_ZCL_STATUS_SUCCESS) + { + return EMBER_ZCL_STATUS_FAILURE; + } + + state.Clear(alarms); + return SetStateValue(endpoint, state, true); +} + +bool DishwasherAlarmServer::HasResetFeature(EndpointId endpoint) +{ + uint32_t featureMap = 0; + if (Attributes::FeatureMap::Get(endpoint, &featureMap) != EMBER_ZCL_STATUS_SUCCESS) + { + return false; + } + + if (featureMap & 1) + { + return true; + } + return false; +} + +void DishwasherAlarmServer::SendNotifyEvent(EndpointId endpointId, BitMask becameActive, BitMask becameInactive, + BitMask newState, BitMask mask) +{ + Events::Notify::Type event{ .active = becameActive, .inactive = becameInactive, .state = newState, .mask = mask }; + EventNumber eventNumber; + CHIP_ERROR error = LogEvent(event, endpointId, eventNumber); + if (CHIP_NO_ERROR != error) + { + ChipLogError(Zcl, "[Notify] Unable to send notify event: %s [endpointId=%d]", error.AsString(), endpointId); + } +} + +static Status ModifyEnabledHandler(const app::ConcreteCommandPath & commandPath, const BitMask mask) +{ + EndpointId endpoint = commandPath.mEndpointId; + BitMask supported; + + if (DishwasherAlarmServer::Instance().GetSupportedValue(endpoint, &supported) != EMBER_ZCL_STATUS_SUCCESS) + { + return Status::Failure; + } + + // receives this command with a Mask that includes bits that are set for alarms which are not supported + if (!supported.HasAll(mask)) + { + return Status::InvalidCommand; + } + + // A server that is unable to enable a currently suppressed alarm, + // or is unable to suppress a currently enabled alarm SHALL respond + // with a status code of FAILURE + Delegate * delegate = DishwasherAlarm::GetDelegate(endpoint); + if (delegate && !(delegate->ModifyEnabledAlarmsCallback(mask))) + { + ChipLogProgress(Zcl, "Unable to modify enabled alarms"); + return Status::Failure; + } + // The cluster will do this update if delegate.ModifyEnabledAlarmsCallback() returns true. + if (DishwasherAlarmServer::Instance().SetMaskValue(endpoint, mask) != EMBER_ZCL_STATUS_SUCCESS) + { + return Status::Failure; + } + return Status::Success; +} + +static Status ResetHandler(const app::ConcreteCommandPath & commandPath, const BitMask alarms) +{ + EndpointId endpoint = commandPath.mEndpointId; + + if (!DishwasherAlarmServer::Instance().HasResetFeature(endpoint)) + { + ChipLogProgress(Zcl, "Dishwasher Alarm feature: Unsupport Reset Command"); + return app::ToInteractionModelStatus(EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); + } + + // A server that is unable to reset alarms SHALL respond with a status code of FAILURE + Delegate * delegate = DishwasherAlarm::GetDelegate(endpoint); + if (delegate && !(delegate->ResetAlarmsCallback(alarms))) + { + ChipLogProgress(Zcl, "Unable to reset alarms"); + return Status::Failure; + } + + // The cluster will do this update if delegate.ResetAlarmsCallback() returns true. + if (DishwasherAlarmServer::Instance().ResetLatchedAlarms(endpoint, alarms) != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "reset alarms fail"); + return Status::Failure; + } + return Status::Success; +} + +bool emberAfDishwasherAlarmClusterResetCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, + const Commands::Reset::DecodableType & commandData) +{ + auto & alarms = commandData.alarms; + + Status status = ResetHandler(commandPath, alarms); + commandObj->AddStatus(commandPath, status); + + return true; +} + +bool emberAfDishwasherAlarmClusterModifyEnabledAlarmsCallback(app::CommandHandler * commandObj, + const app::ConcreteCommandPath & commandPath, + const Commands::ModifyEnabledAlarms::DecodableType & commandData) +{ + auto & mask = commandData.mask; + Status status = ModifyEnabledHandler(commandPath, mask); + commandObj->AddStatus(commandPath, status); + + return true; +} diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h new file mode 100644 index 00000000000000..d03662f29333fd --- /dev/null +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.h @@ -0,0 +1,89 @@ +/* + * + * 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 "dishwasher-alarm-delegate.h" +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace DishwasherAlarm { + +class DishwasherAlarmServer +{ +public: + static DishwasherAlarmServer & Instance(); + + EmberAfStatus GetMaskValue(EndpointId endpoint, BitMask * mask); + EmberAfStatus GetStateValue(EndpointId endpoint, BitMask * state); + EmberAfStatus GetLatchValue(EndpointId endpoint, BitMask * latch); + EmberAfStatus GetSupportedValue(EndpointId endpoint, BitMask * suppported); + + // Whenever there is change on Mask we should change State accordingly. + EmberAfStatus SetMaskValue(EndpointId endpoint, const BitMask mask); + EmberAfStatus SetLatchValue(EndpointId endpoint, const BitMask latch); + // A change in supported value will result in a corresponding change in mask and state. + EmberAfStatus SetSupportedValue(EndpointId endpoint, const BitMask supported); + + /** + * @brief Set the value of the State attribute + * This method sets the State attribute to the value in newState, if allowed by the Mask + * and Supported attributes. When the State attribute changes, a Notify event will be + * generated. + * @param[in] endpoint The endpoint corresponding to the Dishwasher Alarm cluster. + * @param[in] newState The desired new value for the State attribute. + * @param[in] ignoreLatchState If false, the Latch attribute will be honored and the + * method will not reset any bits in the State attribute which have their + * associated Latch bit set. If true, the Latch attribute is ignored and the value of + * the State attribute will be set to the value of the newState parameter while + * honoring the Mask and Supported attributes. + * The default value for the ignoreLatchState parameter is false. + */ + EmberAfStatus SetStateValue(EndpointId endpoint, const BitMask newState, bool ignoreLatchState = false); + + /** + * @brief Reset the value of latched alarms in the State attribute. + * When the State attribute changes a Notify event is generated. + * @param[in] endpoint The endpoint corresponding to the Dishwasher Alarm cluster. + * @param[in] alarms Each bit set to a 1 in this parameter corresponds to a bit in the + * State attribute will SHALL be reset to false. + */ + EmberAfStatus ResetLatchedAlarms(EndpointId endpoint, const BitMask alarms); + + // check whether the Alarm featureMap has enabled Reset feature. + bool HasResetFeature(EndpointId endpoint); + +private: + static DishwasherAlarmServer instance; + + void SendNotifyEvent(EndpointId endpointId, BitMask becameActive, BitMask becameInactive, + BitMask newState, BitMask mask); +}; + +void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate); + +} // namespace DishwasherAlarm +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/tests/suites/TestDishwasherAlarm.yaml b/src/app/tests/suites/TestDishwasherAlarm.yaml new file mode 100644 index 00000000000000..94af3329610e73 --- /dev/null +++ b/src/app/tests/suites/TestDishwasherAlarm.yaml @@ -0,0 +1,190 @@ +# 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. + +name: Dishwasher Alarm Tests + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Alarm" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + #Init + #Support 10 1111 (47) (0x2F) + #Mask 10 1111 (47) (0x2F) + #Latch 00 0011 (3) (0x03) + #State 00 0111 (7) (0x07) + #FeatureMap 1 + - label: "Read Supported Attribute" + command: "readAttribute" + attribute: "Supported" + response: + value: 47 + + - label: "Read Mask Attribute" + command: "readAttribute" + attribute: "Mask" + response: + value: 47 + + - label: "Read Latch Attribute" + command: "readAttribute" + attribute: "Latch" + response: + value: 3 + + - label: "Read State Attribute" + command: "readAttribute" + attribute: "State" + response: + value: 7 + + - label: "Read feature map Attribute" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + #After Modify Enabled Alarm (Valid) + #Support 10 1111 (47) (0x2F) + #Mask 10 1001 (41) (0x29) + #Latch 00 0011 (3) (0x03) + #State 00 0001 (1) (0x01) + - label: "Modify enabled alarms Command" + command: "ModifyEnabledAlarms" + arguments: + values: + - name: "Mask" + value: 41 + + - label: "Read Mask Attribute" + command: "readAttribute" + attribute: "Mask" + response: + value: 41 + + - label: "Read Latch Attribute" + command: "readAttribute" + attribute: "Latch" + response: + value: 3 + + - label: "Read State Attribute" + command: "readAttribute" + attribute: "State" + response: + value: 1 + + #After Modify Enabled Alarm (Invalid, set for unknown alarms) + #Support 10 1111 (47) (0x2F) + #Mask 110 1001 (105) (0x69) + #Latch 00 0011 (3) (0x03) + #State 00 0001 (1) (0x01) + - label: "Modify enabled alarms Command" + command: "ModifyEnabledAlarms" + arguments: + values: + - name: "Mask" + value: 105 + response: + error: INVALID_COMMAND + + - label: "Read Mask Attribute" + command: "readAttribute" + attribute: "Mask" + response: + value: 41 + + - label: "Read Latch Attribute" + command: "readAttribute" + attribute: "Latch" + response: + value: 3 + + - label: "Read State Attribute" + command: "readAttribute" + attribute: "State" + response: + value: 1 + + #After Modify Enabled Alarm (Invalid, set for alarms which are not supported) + #Support 10 1111 (47) (0x2F) + #Mask 11 1011 (59) (0x3B) + #Latch 00 0011 (3) (0x03) + #State 00 0001 (1) (0x01) + - label: "Modify enabled alarms Command" + command: "ModifyEnabledAlarms" + arguments: + values: + - name: "Mask" + value: 59 + response: + error: INVALID_COMMAND + + - label: "Read Mask Attribute" + command: "readAttribute" + attribute: "Mask" + response: + value: 41 + + - label: "Read Latch Attribute" + command: "readAttribute" + attribute: "Latch" + response: + value: 3 + + - label: "Read State Attribute" + command: "readAttribute" + attribute: "State" + response: + value: 1 + + #After Reset alarms bit 0 + #Support 10 1111 (47) (0x2F) + #Mask 10 1001 (41) (0x29) + #Latch 00 0011 (3) (0x03) + #State 00 0000 (0) (0x00) + - label: "Reset Command" + command: "Reset" + arguments: + values: + - name: "Alarms" + value: 1 + + - label: "Read Mask Attribute" + command: "readAttribute" + attribute: "Mask" + response: + value: 41 + + - label: "Read Latch Attribute" + command: "readAttribute" + attribute: "Latch" + response: + value: 3 + + - label: "Read State Attribute" + command: "readAttribute" + attribute: "State" + response: + value: 0 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index fbb8340a50c75b..377dd568b2aea0 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -270,7 +270,8 @@ "TestCommissionerNodeId", "TestTimeSynchronization", "TestOperationalState", - "TestRVCOperationalState" + "TestRVCOperationalState", + "TestDishwasherAlarm" ], "MultiAdmin": ["TestMultiAdmin"], "SoftwareDiagnostics": ["Test_TC_DGSW_1_1"], diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 116ed030cd751c..dd2085a2a827cb 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -156,6 +156,7 @@ void MatterLaundryWasherModePluginServerInitCallback() {} void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallback() {} void MatterOperationalStatePluginServerInitCallback() {} void MatterRvcOperationalStatePluginServerInitCallback() {} +void MatterDishwasherAlarmPluginServerInitCallback() {} // **************************************** // Print out information about each cluster // **************************************** diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 2ede95292b00a3..ce0c3be66f3523 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -299,6 +299,7 @@ class TestList : public Command printf("TestTimeSynchronization\n"); printf("TestOperationalState\n"); printf("TestRVCOperationalState\n"); + printf("TestDishwasherAlarm\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_1_1\n"); printf("TestSubscribe_OnOff\n"); @@ -96813,6 +96814,348 @@ class TestRVCOperationalStateSuite : public TestCommand } }; +class TestDishwasherAlarmSuite : public TestCommand +{ +public: + TestDishwasherAlarmSuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("TestDishwasherAlarm", 22, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~TestDishwasherAlarmSuite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("supported", value, 47UL)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("mask", value, 47UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("latch", value, 3UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("state", value, 7UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("mask", value, 41UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("latch", value, 3UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("state", value, 1UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("mask", value, 41UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("latch", value, 3UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("state", value, 1UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("mask", value, 41UL)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("latch", value, 3UL)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("state", value, 1UL)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("mask", value, 41UL)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("latch", value, 3UL)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("state", value, 0UL)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read Supported Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Supported::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read Mask Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read Latch Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read State Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Read feature map Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Modify enabled alarms Command"); + ListFreer listFreer; + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type value; + value.mask = static_cast>(41UL); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, + DishwasherAlarm::Commands::ModifyEnabledAlarms::Id, value, chip::NullOptional + + ); + } + case 7: { + LogStep(7, "Read Mask Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Read Latch Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Read State Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Modify enabled alarms Command"); + ListFreer listFreer; + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type value; + value.mask = static_cast>(105UL); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, + DishwasherAlarm::Commands::ModifyEnabledAlarms::Id, value, chip::NullOptional + + ); + } + case 11: { + LogStep(11, "Read Mask Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "Read Latch Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, + chip::NullOptional); + } + case 13: { + LogStep(13, "Read State Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, "Modify enabled alarms Command"); + ListFreer listFreer; + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type value; + value.mask = static_cast>(59UL); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, + DishwasherAlarm::Commands::ModifyEnabledAlarms::Id, value, chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Read Mask Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "Read Latch Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Read State Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, + chip::NullOptional); + } + case 18: { + LogStep(18, "Reset Command"); + ListFreer listFreer; + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type value; + value.alarms = static_cast>(1UL); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Commands::Reset::Id, value, + chip::NullOptional + + ); + } + case 19: { + LogStep(19, "Read Mask Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, + chip::NullOptional); + } + case 20: { + LogStep(20, "Read Latch Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "Read State Attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class TestMultiAdminSuite : public TestCommand { public: @@ -144580,6 +144923,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 2dc568d1ef81d4..3d69b11871f7b8 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -266,6 +266,7 @@ class TestList : public Command { printf("TestTimeSynchronization\n"); printf("TestOperationalState\n"); printf("TestRVCOperationalState\n"); + printf("TestDishwasherAlarm\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_1_1\n"); printf("TestSubscribe_OnOff\n"); @@ -143027,6 +143028,717 @@ class TestRVCOperationalState : public TestCommandBridge { } }; +class TestDishwasherAlarm : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestDishwasherAlarm() + : TestCommandBridge("TestDishwasherAlarm") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~TestDishwasherAlarm() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestDishwasherAlarm\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestDishwasherAlarm\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read Supported Attribute\n"); + err = TestReadSupportedAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read Mask Attribute\n"); + err = TestReadMaskAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read Latch Attribute\n"); + err = TestReadLatchAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read State Attribute\n"); + err = TestReadStateAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read feature map Attribute\n"); + err = TestReadFeatureMapAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Modify enabled alarms Command\n"); + err = TestModifyEnabledAlarmsCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read Mask Attribute\n"); + err = TestReadMaskAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read Latch Attribute\n"); + err = TestReadLatchAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read State Attribute\n"); + err = TestReadStateAttribute_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Modify enabled alarms Command\n"); + err = TestModifyEnabledAlarmsCommand_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read Mask Attribute\n"); + err = TestReadMaskAttribute_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read Latch Attribute\n"); + err = TestReadLatchAttribute_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read State Attribute\n"); + err = TestReadStateAttribute_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Modify enabled alarms Command\n"); + err = TestModifyEnabledAlarmsCommand_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read Mask Attribute\n"); + err = TestReadMaskAttribute_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read Latch Attribute\n"); + err = TestReadLatchAttribute_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Read State Attribute\n"); + err = TestReadStateAttribute_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reset Command\n"); + err = TestResetCommand_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read Mask Attribute\n"); + err = TestReadMaskAttribute_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read Latch Attribute\n"); + err = TestReadLatchAttribute_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read State Attribute\n"); + err = TestReadStateAttribute_21(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 22; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadSupportedAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Supported Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Supported", actualValue, 47UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadMaskAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Mask Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Mask", actualValue, 47UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadLatchAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Latch Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Latch", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadStateAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read State Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("State", actualValue, 7UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadFeatureMapAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read feature map Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestModifyEnabledAlarmsCommand_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + params.mask = [NSNumber numberWithUnsignedInt:41UL]; + [cluster modifyEnabledAlarmsWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Modify enabled alarms Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadMaskAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Mask Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Mask", actualValue, 41UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadLatchAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Latch Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Latch", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadStateAttribute_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read State Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("State", actualValue, 1UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestModifyEnabledAlarmsCommand_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + params.mask = [NSNumber numberWithUnsignedInt:105UL]; + [cluster + modifyEnabledAlarmsWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Modify enabled alarms Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadMaskAttribute_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Mask Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Mask", actualValue, 41UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadLatchAttribute_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Latch Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Latch", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadStateAttribute_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read State Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("State", actualValue, 1UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestModifyEnabledAlarmsCommand_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + params.mask = [NSNumber numberWithUnsignedInt:59UL]; + [cluster + modifyEnabledAlarmsWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Modify enabled alarms Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadMaskAttribute_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Mask Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Mask", actualValue, 41UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadLatchAttribute_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Latch Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Latch", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadStateAttribute_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read State Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("State", actualValue, 1UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestResetCommand_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + params.alarms = [NSNumber numberWithUnsignedInt:1UL]; + [cluster resetWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Reset Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadMaskAttribute_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Mask Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Mask", actualValue, 41UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadLatchAttribute_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Latch Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Latch", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadStateAttribute_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read State Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("State", actualValue, 0UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class TestMultiAdmin : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -173739,6 +174451,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), From 70f42f2519862e692cf59d12a30ff6a0723cb335 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 14:37:04 -0400 Subject: [PATCH 017/159] Add another clean-output since CI seems to run out of space on builds (#28226) --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66403d723e3101..14ced0ab7474a8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -201,6 +201,8 @@ jobs: --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/' \ check \ " + - name: Clean output + run: rm -rf ./out - name: Build using build_examples.py run: | ./scripts/run_in_build_env.sh \ From f3c498fb624d1596bd6d49b9c98fb36b20473cb0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 24 Jul 2023 15:37:19 -0400 Subject: [PATCH 018/159] Revert "Cancel incomplete BLE connection when CloseAllBleConnections() is called (#27304)" (#28143) This reverts commit ad5403e8e537612c2d2f903895642445d45d1e08. There are two issues: * https://github.com/project-chip/connectedhomeip/issues/27607 which has had no response for weeks. * https://github.com/project-chip/connectedhomeip/issues/28139 which breaks commissioning on Mac, and would break it on Linux if it implemented BLE connection cancellation. We need to sort out why CHIPDeviceController is canceling BLE connections when starting PASE over BLE (!). --- src/ble/BleLayer.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/ble/BleLayer.cpp b/src/ble/BleLayer.cpp index 57a8ca8dc0fdff..9109924ccd3754 100644 --- a/src/ble/BleLayer.cpp +++ b/src/ble/BleLayer.cpp @@ -308,13 +308,6 @@ void BleLayer::Shutdown() void BleLayer::CloseAllBleConnections() { - // Cancel any ongoing attempt to establish new BLE connection - CHIP_ERROR err = CancelBleIncompleteConnection(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Ble, "CancelBleIncompleteConnection() failed, err = %" CHIP_ERROR_FORMAT, err.Format()); - } - // Close and free all BLE end points. for (size_t i = 0; i < BLE_LAYER_NUM_BLE_ENDPOINTS; i++) { From 4850de6020f4a05ba2b05505745583abab667114 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 24 Jul 2023 15:37:33 -0400 Subject: [PATCH 019/159] Add Constants.h to the secure_channel sources. (#28219) This causes gn to correctly notice the circular dependencies between secure_channel and messaging and secure_channel and transport, which are inherent in the spec. Annotate those circular dependencies. --- src/protocols/secure_channel/BUILD.gn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/protocols/secure_channel/BUILD.gn b/src/protocols/secure_channel/BUILD.gn index 4f9bfb6be7257f..8cf46f9d334a1f 100644 --- a/src/protocols/secure_channel/BUILD.gn +++ b/src/protocols/secure_channel/BUILD.gn @@ -10,6 +10,7 @@ static_library("secure_channel") { "CASEServer.h", "CASESession.cpp", "CASESession.h", + "Constants.h", "DefaultSessionResumptionStorage.cpp", "DefaultSessionResumptionStorage.h", "PASESession.cpp", @@ -38,5 +39,18 @@ static_library("secure_channel") { "${chip_root}/src/system", "${chip_root}/src/tracing", "${chip_root}/src/tracing:macros", + "${chip_root}/src/transport", + ] + + # secure channel requires messaging so it can send messages (e.g. for + # CASE/PASE handshakes). messaging requires secure channel so that it can do + # things like send standalone acks, which are a secure channel concept. + # + # secure channel requires transport so it can deal with sessions. transport + # requires secure channel so it can detect control messages, which are a + # secure channel concept. + allow_circular_includes_from = [ + "${chip_root}/src/messaging", + "${chip_root}/src/transport", ] } From fe4c679ace3eb134d7365d3bd0fe6c2fad6ece87 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 17:16:24 -0400 Subject: [PATCH 020/159] Add support for `--trace-to` for python and use it in repl tests (#28179) * Start adding tracing start/stop functions * Add raii-like support for tracing * Add raii-like support for tracing * Fix compile logic * Switch linux, mac, android to C++17 by default * Start outputting trace data * Upload traces that are gathered * Fix names * Allow placeholders in script args too * Allow from-string tracing * Do not newline-separate restyle path otherwise only the first argument is processed * Restyle * Add some additional types * Minor python fixes * Import ctypes * Things run now * Add trace bits to our tests * Undo restyle-diff change * Fix some typos in naming * Add perfetto for darwin too * mobile-device-test.py does not suppor trace-to yet * Make mobile device test also be able to trace. Mobile device test seems super slow * Restyled by autopep8 * Restyled by isort --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- .github/workflows/tests.yaml | 44 +++--- .gitmodules | 2 +- scripts/tests/run_python_test.py | 8 +- src/controller/python/BUILD.gn | 11 ++ src/controller/python/chip/native/__init__.py | 8 +- .../python/chip/tracing/TracingSetup.cpp | 104 +++++++++++++++ .../python/chip/tracing/__init__.py | 125 ++++++++++++++++++ .../test/test_scripts/mobile-device-test.py | 15 ++- src/python_testing/matter_testing_support.py | 70 +++++----- 9 files changed, 331 insertions(+), 56 deletions(-) create mode 100644 src/controller/python/chip/tracing/TracingSetup.cpp create mode 100644 src/controller/python/chip/tracing/__init__.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 99f7055113d2ec..c462203ae6cd0d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -437,24 +437,25 @@ jobs: " - name: Run Tests run: | - 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 --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - 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:log" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_DeviceBasicComposition.py" --script-args "--storage-path admin_storage.json --manual-code 10054912339"' - 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:log" --script "src/python_testing/TC_SC_3_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_DA_1_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' - 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:log --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_TestEventTrigger.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' - 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:log" --script "src/python_testing/TC_ACE_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_ACE_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --int-arg PIXIT.ACE.APPENDPOINT:1 PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff PIXIT.ACE.APPATTRIBUTE:OnOff"' - 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:log" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_DA_1_2.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"' - 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:log" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_DA_1_5.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"' - 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:log" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_FAN_3_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - 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:log" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py"' + mkdir -p out/trace_data + 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 "--trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout --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"' + 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 --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_SC_3_6.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_DA_1_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true --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_TestEventTrigger.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true --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_ACE_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_ACE_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --int-arg PIXIT.ACE.APPENDPOINT:1 PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff PIXIT.ACE.APPATTRIBUTE:OnOff --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_ACE_1_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-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_CGEN_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-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_DA_1_2.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_TIMESYNC_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_DA_1_5.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_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"' + 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_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" --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 --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"' - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} @@ -524,6 +525,13 @@ jobs: path: /cores/ # Cores are big; don't hold on to them too long. retention-days: 5 + - name: Uploading traces on failure + uses: actions/upload-artifact@v3 + if: ${{ failure() && !env.ACT }} + with: + name: trace-data-python-repl + path: out/trace_data/ + retention-days: 5 - name: Uploading diagnostic logs uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} diff --git a/.gitmodules b/.gitmodules index 990cb20f276572..15082161f151d6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -307,7 +307,7 @@ path = third_party/perfetto/repo url = https://github.com/google/perfetto.git branch = master - platforms = linux,android + platforms = linux,android,darwin [submodule "third_party/asr/components"] path = third_party/asr/components url = https://github.com/asriot/asriot_components.git diff --git a/scripts/tests/run_python_test.py b/scripts/tests/run_python_test.py index c607a5d07cf40f..33931accb909f9 100755 --- a/scripts/tests/run_python_test.py +++ b/scripts/tests/run_python_test.py @@ -17,6 +17,7 @@ import datetime import logging import os +import os.path import queue import re import shlex @@ -72,7 +73,7 @@ def DumpProgramOutputToQueue(thread_list: typing.List[threading.Thread], tag: st @click.option("--factoryreset", is_flag=True, help='Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests.') @click.option("--app-args", type=str, default='', - help='The extra arguments passed to the device.') + help='The extra arguments passed to the device. Can use placholders like {SCRIPT_BASE_NAME}') @click.option("--script", type=click.Path(exists=True), default=os.path.join(DEFAULT_CHIP_ROOT, 'src', 'controller', @@ -81,10 +82,13 @@ def DumpProgramOutputToQueue(thread_list: typing.List[threading.Thread], tag: st 'test_scripts', 'mobile-device-test.py'), help='Test script to use.') @click.option("--script-args", type=str, default='', - help='Path to the test script to use, omit to use the default test script (mobile-device-test.py).') + help='Script arguments, can use placeholders like {SCRIPT_BASE_NAME}.') @click.option("--script-gdb", is_flag=True, help='Run script through gdb') def main(app: str, factoryreset: bool, app_args: str, script: str, script_args: str, script_gdb: bool): + app_args = app_args.replace('{SCRIPT_BASE_NAME}', os.path.splitext(os.path.basename(script))[0]) + script_args = script_args.replace('{SCRIPT_BASE_NAME}', os.path.splitext(os.path.basename(script))[0]) + if factoryreset: # Remove native app config retcode = subprocess.call("rm -rf /tmp/chip* /tmp/repl*", shell=True) diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index c76c64c65d7df4..375a65cf7becbc 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -78,6 +78,7 @@ shared_library("ChipDeviceCtrl") { "chip/internal/CommissionerImpl.cpp", "chip/logging/LoggingRedirect.cpp", "chip/native/PyChipError.cpp", + "chip/tracing/TracingSetup.cpp", "chip/utils/DeviceProxyUtils.cpp", ] defines += [ "CHIP_CONFIG_MAX_GROUPS_PER_FABRIC=50" ] @@ -120,8 +121,16 @@ shared_library("ChipDeviceCtrl") { public_deps += [ "${chip_root}/src/controller/data_model", "${chip_root}/src/credentials:file_attestation_trust_store", + "${chip_root}/src/tracing/json", + "${chip_root}/src/tracing/perfetto", + "${chip_root}/src/tracing/perfetto:file_output", "${chip_root}/third_party/jsoncpp", ] + + deps = [ + "${chip_root}/src/tracing/perfetto:event_storage", + "${chip_root}/src/tracing/perfetto:simple_initialization", + ] } else { public_deps += [ "$chip_data_model" ] } @@ -238,6 +247,7 @@ chip_python_wheel_action("chip-core") { "chip/setup_payload/__init__.py", "chip/setup_payload/setup_payload.py", "chip/storage/__init__.py", + "chip/tracing/__init__.py", "chip/utils/CommissioningBuildingBlocks.py", "chip/utils/__init__.py", "chip/yaml/__init__.py", @@ -292,6 +302,7 @@ chip_python_wheel_action("chip-core") { "chip.clusters", "chip.setup_payload", "chip.storage", + "chip.tracing", ] if (!chip_controller) { diff --git a/src/controller/python/chip/native/__init__.py b/src/controller/python/chip/native/__init__.py index 26e394e61fca6a..7801129c948532 100644 --- a/src/controller/python/chip/native/__init__.py +++ b/src/controller/python/chip/native/__init__.py @@ -197,5 +197,9 @@ def Init(bluetoothAdapter: int = None): _GetLibraryHandle(False).pychip_CommonStackInit(ctypes.c_char_p(params)) -def GetLibraryHandle(): - return _GetLibraryHandle(True) +class HandleFlags(enum.Flag): + REQUIRE_INITIALIZATION = enum.auto() + + +def GetLibraryHandle(flags=HandleFlags.REQUIRE_INITIALIZATION): + return _GetLibraryHandle(HandleFlags.REQUIRE_INITIALIZATION in flags) diff --git a/src/controller/python/chip/tracing/TracingSetup.cpp b/src/controller/python/chip/tracing/TracingSetup.cpp new file mode 100644 index 00000000000000..d09a655b74c633 --- /dev/null +++ b/src/controller/python/chip/tracing/TracingSetup.cpp @@ -0,0 +1,104 @@ +/* + * + * 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. + * 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. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace { + +using chip::DeviceLayer::PlatformMgr; + +class ScopedStackLock +{ +public: + ScopedStackLock() { PlatformMgr().LockChipStack(); } + + ~ScopedStackLock() { PlatformMgr().UnlockChipStack(); } +}; + +chip::Tracing::Json::JsonBackend gJsonBackend; + +chip::Tracing::Perfetto::FileTraceOutput gPerfettoFileOutput; +chip::Tracing::Perfetto::PerfettoBackend gPerfettoBackend; + +} // namespace + +extern "C" void pychip_tracing_start_json_log(const char * file_name) +{ + + ScopedStackLock lock; + + gJsonBackend.CloseFile(); // just in case, ensure no file output + chip::Tracing::Register(gJsonBackend); +} + +extern "C" PyChipError pychip_tracing_start_json_file(const char * file_name) +{ + ScopedStackLock lock; + + CHIP_ERROR err = gJsonBackend.OpenFile(file_name); + if (err != CHIP_NO_ERROR) + { + return ToPyChipError(err); + } + chip::Tracing::Register(gJsonBackend); + return ToPyChipError(CHIP_NO_ERROR); +} + +extern "C" void pychip_tracing_start_perfetto_system() +{ + ScopedStackLock lock; + + chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + chip::Tracing::Register(gPerfettoBackend); +} + +extern "C" PyChipError pychip_tracing_start_perfetto_file(const char * file_name) +{ + ScopedStackLock lock; + + chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + + CHIP_ERROR err = gPerfettoFileOutput.Open(file_name); + if (err != CHIP_NO_ERROR) + { + return ToPyChipError(err); + } + chip::Tracing::Register(gPerfettoBackend); + + return ToPyChipError(CHIP_NO_ERROR); +} + +extern "C" void pychip_tracing_stop() +{ + ScopedStackLock lock; + + chip::Tracing::Perfetto::FlushEventTrackingStorage(); + gPerfettoFileOutput.Close(); + chip::Tracing::Unregister(gPerfettoBackend); + chip::Tracing::Unregister(gJsonBackend); +} diff --git a/src/controller/python/chip/tracing/__init__.py b/src/controller/python/chip/tracing/__init__.py new file mode 100644 index 00000000000000..fc6ee35f3b1bb9 --- /dev/null +++ b/src/controller/python/chip/tracing/__init__.py @@ -0,0 +1,125 @@ +# +# 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. +# + +import ctypes +from enum import Enum, auto +from typing import Optional + +import chip.native +from chip.native import PyChipError + + +def _GetTracingLibraryHandle() -> ctypes.CDLL: + """ Get the native library handle with tracing methods initialized. + + Retreives the CHIP native library handle and attaches signatures to + native methods. + """ + + # Getting a handle without requiring init, as tracing methods + # do not require chip stack startup + handle = chip.native.GetLibraryHandle(chip.native.HandleFlags(0)) + + # Uses one of the type decorators as an indicator for everything being + # initialized. + if not handle.pychip_tracing_start_json_file.argtypes: + setter = chip.native.NativeLibraryHandleMethodArguments(handle) + + setter.Set('pychip_tracing_start_json_log', None, []) + setter.Set('pychip_tracing_start_json_file', PyChipError, [ctypes.c_char_p]) + + setter.Set('pychip_tracing_start_perfetto_system', None, []) + setter.Set('pychip_tracing_start_perfetto_file', PyChipError, [ctypes.c_char_p]) + + setter.Set('pychip_tracing_stop', None, []) + + return handle + + +class TraceType(Enum): + JSON = auto() + PERFETTO = auto() + + +def StartTracingTo(trace_type: TraceType, file_name: Optional[str] = None): + """ + Initiate tracing to the specified destination. + + Note that only one active trace can exist of a given type (i.e. cannot trace both + to files and logs/system). + """ + handle = _GetTracingLibraryHandle() + + if trace_type == TraceType.JSON: + if file_name is None: + handle.pychip_tracing_start_json_log() + else: + handle.pychip_tracing_start_json_file(file_name.encode('utf-8')).raise_on_error() + elif trace_type == TraceType.PERFETTO: + if file_name is None: + handle.pychip_tracing_start_perfetto_system() + else: + handle.pychip_tracing_start_perfetto_file(file_name.encode('utf-8')).raise_on_error() + else: + raise ValueError("unknown trace type") + + +def StopTracing(): + """ + Make sure tracing is stopped. + + MUST be called before application exits. + """ + _GetTracingLibraryHandle().pychip_tracing_stop() + + +class TracingContext: + """Allows scoped enter/exit for tracing, like: + + with TracingContext() as tracing: + tracing.Start(TraceType.JSON) + # ... + + """ + + def Start(self, trace_type: TraceType, file_name: Optional[str] = None): + StartTracingTo(trace_type, file_name) + + def StartFromString(self, destination: str): + """ + Convert a human string to a perfetto start. + + Supports json:log, json:path, perfetto, perfetto:path + """ + if destination == 'perfetto': + self.Start(TraceType.PERFETTO) + elif destination == 'json:log': + self.Start(TraceType.JSON) + elif destination.startswith("json:"): + self.Start(TraceType.JSON, destination[5:]) + elif destination.startswith("perfetto:"): + self.Start(TraceType.PERFETTO, destination[9:]) + else: + raise ValueError("Invalid trace-to destination: %r", destination) + + def __init__(self): + pass + + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + StopTracing() diff --git a/src/controller/python/test/test_scripts/mobile-device-test.py b/src/controller/python/test/test_scripts/mobile-device-test.py index 09f13ccb444843..87e0a9acb6569b 100755 --- a/src/controller/python/test/test_scripts/mobile-device-test.py +++ b/src/controller/python/test/test_scripts/mobile-device-test.py @@ -27,6 +27,7 @@ import click import coloredlogs from base import BaseTestHelper, FailIfNot, SetTestSet, TestFail, TestTimeout, logger +from chip.tracing import TracingContext from cluster_objects import ClusterObjectTests from network_commissioning import NetworkCommissioningTests @@ -246,8 +247,12 @@ def do_tests(controller_nodeid, device_nodeid, address, timeout, discriminator, default='', type=str, help="Path that contains valid and trusted PAA Root Certificates.") +@click.option('--trace-to', + multiple=True, + default=[], + help="Trace location") def run(controller_nodeid, device_nodeid, address, timeout, discriminator, setup_pin, enable_test, disable_test, log_level, - log_format, print_test_list, paa_trust_store_path): + log_format, print_test_list, paa_trust_store_path, trace_to): coloredlogs.install(level=log_level, fmt=log_format, logger=logger) if print_test_list: @@ -267,8 +272,12 @@ def run(controller_nodeid, device_nodeid, address, timeout, discriminator, setup logger.info(f"\tEnabled Tests: {enable_test}") logger.info(f"\tDisabled Tests: {disable_test}") SetTestSet(enable_test, disable_test) - do_tests(controller_nodeid, device_nodeid, address, timeout, - discriminator, setup_pin, paa_trust_store_path) + with TracingContext() as tracing_ctx: + for destination in trace_to: + tracing_ctx.StartFromString(destination) + + do_tests(controller_nodeid, device_nodeid, address, timeout, + discriminator, setup_pin, paa_trust_store_path) if __name__ == "__main__": diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index b51da99aed15e6..7570f3ddcbe415 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -51,6 +51,7 @@ from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction from chip.interaction_model import InteractionModelError, Status from chip.storage import PersistentStorage +from chip.tracing import TracingContext from mobly import asserts, base_test, signals, utils from mobly.config_parser import ENV_MOBLY_LOGPATH, TestRunConfig from mobly.test_runner import TestRunner @@ -265,6 +266,8 @@ class MatterTestConfig: # If this is set, we will reuse root of trust keys at that location chip_tool_credentials_path: Optional[pathlib.Path] = None + trace_to: List[str] = field(default_factory=list) + class ClusterMapper: """Describe clusters/attributes using schema names.""" @@ -817,6 +820,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig: config.pics = {} if args.PICS is None else read_pics_from_file(args.PICS) config.controller_node_id = args.controller_node_id + config.trace_to = args.trace_to # Accumulate all command-line-passed named args all_global_args = [] @@ -847,7 +851,8 @@ def parse_matter_test_args(argv: List[str]) -> MatterTestConfig: type=str, metavar='test_a test_b...', help='A list of tests in the test class to execute.') - + basic_group.add_argument('--trace-to', nargs="*", default=[], + help="Where to trace (e.g perfetto, perfetto:path, json:log, json:path)") basic_group.add_argument('--storage-path', action="store", type=pathlib.Path, metavar="PATH", help="Location for persisted storage of instance") basic_group.add_argument('--logs-path', action="store", type=pathlib.Path, metavar="PATH", help="Location for test logs") @@ -1051,44 +1056,49 @@ def default_matter_test_main(argv=None, **kwargs): matter_test_config.maximize_cert_chains = kwargs["maximize_cert_chains"] stack = MatterStackState(matter_test_config) - test_config.user_params["matter_stack"] = stash_globally(stack) - # TODO: Steer to right FabricAdmin! - # TODO: If CASE Admin Subject is a CAT tag range, then make sure to issue NOC with that CAT tag + with TracingContext() as tracing_ctx: + for destination in matter_test_config.trace_to: + tracing_ctx.StartFromString(destination) + + test_config.user_params["matter_stack"] = stash_globally(stack) + + # TODO: Steer to right FabricAdmin! + # TODO: If CASE Admin Subject is a CAT tag range, then make sure to issue NOC with that CAT tag - default_controller = stack.certificate_authorities[0].adminList[0].NewController( - nodeId=matter_test_config.controller_node_id, - paaTrustStorePath=str(matter_test_config.paa_trust_store_path), - catTags=matter_test_config.controller_cat_tags - ) - test_config.user_params["default_controller"] = stash_globally(default_controller) + default_controller = stack.certificate_authorities[0].adminList[0].NewController( + nodeId=matter_test_config.controller_node_id, + paaTrustStorePath=str(matter_test_config.paa_trust_store_path), + catTags=matter_test_config.controller_cat_tags + ) + test_config.user_params["default_controller"] = stash_globally(default_controller) - test_config.user_params["matter_test_config"] = stash_globally(matter_test_config) + test_config.user_params["matter_test_config"] = stash_globally(matter_test_config) - test_config.user_params["certificate_authority_manager"] = stash_globally(stack.certificate_authority_manager) + test_config.user_params["certificate_authority_manager"] = stash_globally(stack.certificate_authority_manager) - # Execute the test class with the config - ok = True + # Execute the test class with the config + ok = True - runner = TestRunner(log_dir=test_config.log_path, - testbed_name=test_config.testbed_name) + runner = TestRunner(log_dir=test_config.log_path, + testbed_name=test_config.testbed_name) - with runner.mobly_logger(): - if matter_test_config.commissioning_method is not None: - runner.add_test_class(test_config, CommissionDeviceTest, None) + with runner.mobly_logger(): + if matter_test_config.commissioning_method is not None: + runner.add_test_class(test_config, CommissionDeviceTest, None) - # Add the tests selected unless we have a commission-only request - if not matter_test_config.commission_only: - runner.add_test_class(test_config, test_class, tests) + # Add the tests selected unless we have a commission-only request + if not matter_test_config.commission_only: + runner.add_test_class(test_config, test_class, tests) - try: - runner.run() - ok = runner.results.is_all_pass and ok - except signals.TestAbortAll: - ok = False - except Exception: - logging.exception('Exception when executing %s.', test_config.testbed_name) - ok = False + try: + runner.run() + ok = runner.results.is_all_pass and ok + except signals.TestAbortAll: + ok = False + except Exception: + logging.exception('Exception when executing %s.', test_config.testbed_name) + ok = False # Shutdown the stack when all done stack.Shutdown() From c9ce7f21aff97aa0520ab778ae86d07af8bff507 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Mon, 24 Jul 2023 20:27:39 -0400 Subject: [PATCH 021/159] [ReadHandler] Integration of ReportScheduler into the ReadHandler and IM engine. (#28104) * Integration of ReportSchedulers into the ReadHandler and IM engine. Also added a static report scheduler to use in all test relying on the IM engine, also added test flags in ReportScheduler replace ReadHandler timing flags Refactored the TestReadInteraction to adopt correct behavior * Restyled by clang-format * Restyled by gn * Moved namespaces into class to avoid namespace pollution * Fix missing pragma once and copyright * Update src/app/reporting/ReportScheduler.h Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Removed OnIntervalsChanged, removed TestReadInteraction from ReportScheduler's friend class and refactored the tests to use wrapper functions, refactored tests for the removal of OnIntervalsChanged, removed reportscheduler nullptr check form controllers * Restyled by clang-format * Fix for the TimerDelegates And also added a default Scheduler to controllers * Restyled by clang-format * Added a timer Context class to allow interface between timer delegates, ReadHandlerNodes and SynchronisedReport Scheduler * Fix using InteractionModel... error * Added Platform::Delete() for allocated TimerDelegate and ReportScheduler on controller * Update src/app/ReadHandler.cpp Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> * Update src/app/TimerDelegates.h Co-authored-by: Boris Zbarsky * Addressed PR comments, next step trying to reduce RAM bloat * Restyled by clang-format * Removed IntrusiveList from the report Scheduler * Removed ReadHandlerNode's inheritance of IntrusiveListBase * Restyled by clang-format * Fix commented code and comment syntax * Restyled by clang-format * Update src/app/tests/TestReportScheduler.cpp Co-authored-by: Boris Zbarsky * Added extra check on timerDelegate in DeviceController, removed logging causing failure in linux CI * Restyled by clang-format --------- Co-authored-by: Restyled.io Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Co-authored-by: Boris Zbarsky --- src/app/InteractionModelEngine.cpp | 8 +- src/app/InteractionModelEngine.h | 6 +- src/app/ReadHandler.cpp | 159 ++--------- src/app/ReadHandler.h | 66 +---- src/app/TimerDelegates.h | 57 ++++ src/app/reporting/Engine.cpp | 3 +- src/app/reporting/ReportScheduler.h | 112 ++++++-- src/app/reporting/ReportSchedulerImpl.cpp | 28 +- .../SynchronizedReportSchedulerImpl.cpp | 92 +++--- .../SynchronizedReportSchedulerImpl.h | 6 +- .../reporting/tests/MockReportScheduler.cpp | 46 +++ src/app/reporting/tests/MockReportScheduler.h | 34 +++ src/app/server/Server.cpp | 4 +- src/app/server/Server.h | 17 +- src/app/tests/AppTestContext.cpp | 4 +- src/app/tests/BUILD.gn | 1 + src/app/tests/TestAclAttribute.cpp | 3 +- src/app/tests/TestAclEvent.cpp | 3 +- src/app/tests/TestInteractionModelEngine.cpp | 10 +- src/app/tests/TestReadInteraction.cpp | 261 +++++++++++------- src/app/tests/TestReportScheduler.cpp | 200 +++++++------- src/app/tests/TestReportingEngine.cpp | 13 +- src/app/tests/TestWriteInteraction.cpp | 21 +- src/app/tests/integration/BUILD.gn | 2 + .../tests/integration/chip_im_initiator.cpp | 4 +- .../tests/integration/chip_im_responder.cpp | 4 +- .../CHIPDeviceControllerFactory.cpp | 20 +- src/controller/CHIPDeviceControllerFactory.h | 1 + .../CHIPDeviceControllerSystemState.h | 16 +- src/lib/core/CHIPConfig.h | 14 +- 30 files changed, 711 insertions(+), 504 deletions(-) create mode 100644 src/app/TimerDelegates.h create mode 100644 src/app/reporting/tests/MockReportScheduler.cpp create mode 100644 src/app/reporting/tests/MockReportScheduler.h diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 569d0b0fdf4a4e..933b5a4c118254 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -51,16 +51,18 @@ InteractionModelEngine * InteractionModelEngine::GetInstance() } CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable, - CASESessionManager * apCASESessionMgr, + reporting::ReportScheduler * reportScheduler, CASESessionManager * apCASESessionMgr, SubscriptionResumptionStorage * subscriptionResumptionStorage) { VerifyOrReturnError(apFabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(apExchangeMgr != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(reportScheduler != nullptr, CHIP_ERROR_INVALID_ARGUMENT); mpExchangeMgr = apExchangeMgr; mpFabricTable = apFabricTable; mpCASESessionMgr = apCASESessionMgr; mpSubscriptionResumptionStorage = subscriptionResumptionStorage; + mReportScheduler = reportScheduler; ReturnErrorOnFailure(mpFabricTable->AddFabricDelegate(this)); ReturnErrorOnFailure(mpExchangeMgr->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::InteractionModel::Id, this)); @@ -741,7 +743,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest // We have already reserved enough resources for read requests, and have granted enough resources for current subscriptions, so // we should be able to allocate resources requested by this request. - ReadHandler * handler = mReadHandlers.CreateObject(*this, apExchangeContext, aInteractionType); + ReadHandler * handler = mReadHandlers.CreateObject(*this, apExchangeContext, aInteractionType, mReportScheduler); if (handler == nullptr) { ChipLogProgress(InteractionModel, "no resource for %s interaction", @@ -1845,7 +1847,7 @@ void InteractionModelEngine::ResumeSubscriptionsTimerCallback(System::Layer * ap return; } - ReadHandler * handler = imEngine->mReadHandlers.CreateObject(*imEngine); + ReadHandler * handler = imEngine->mReadHandlers.CreateObject(*imEngine, imEngine->GetReportScheduler()); if (handler == nullptr) { ChipLogProgress(InteractionModel, "no resource for ReadHandler creation"); diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 9e6ed36cce2396..6236ff63efc5ec 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -115,7 +116,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * */ CHIP_ERROR Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable, - CASESessionManager * apCASESessionMgr = nullptr, + reporting::ReportScheduler * reportScheduler, CASESessionManager * apCASESessionMgr = nullptr, SubscriptionResumptionStorage * subscriptionResumptionStorage = nullptr); void Shutdown(); @@ -178,6 +179,8 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, reporting::Engine & GetReportingEngine() { return mReportingEngine; } + reporting::ReportScheduler * GetReportScheduler() { return mReportScheduler; } + void ReleaseAttributePathList(ObjectList *& aAttributePathList); CHIP_ERROR PushFrontAttributePathList(ObjectList *& aAttributePathList, @@ -566,6 +569,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, ObjectPool mTimedHandlers; WriteHandler mWriteHandlers[CHIP_IM_MAX_NUM_WRITE_HANDLER]; reporting::Engine mReportingEngine; + reporting::ReportScheduler * mReportScheduler = nullptr; static constexpr size_t kReservedHandlersForReads = kMinSupportedReadRequestsPerFabric * (CHIP_CONFIG_MAX_FABRICS); static constexpr size_t kReservedPathsForReads = kMinSupportedPathsPerReadRequest * kReservedHandlersForReads; diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index bbaf9f7992eb30..1c3a40cc962273 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -77,16 +77,9 @@ ReadHandler::ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeCon mSessionHandle.Grab(mExchangeCtx->GetSessionHandle()); -// TODO (#27672): Uncomment when the ReportScheduler is implemented -#if 0 - if (nullptr != observer) - { - if (CHIP_NO_ERROR == SetObserver(observer)) - { - mObserver->OnReadHandlerCreated(this); - } - } -#endif + VerifyOrDie(observer != nullptr); + mObserver = observer; + mObserver->OnReadHandlerCreated(this); } #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS @@ -97,16 +90,9 @@ ReadHandler::ReadHandler(ManagementCallback & apCallback, Observer * observer) : mInteractionType = InteractionType::Subscribe; mFlags.ClearAll(); -// TODO (#27672): Uncomment when the ReportScheduler is implemented -#if 0 - if (nullptr != observer) - { - if (CHIP_NO_ERROR == SetObserver(observer)) - { - mObserver->OnReadHandlerCreated(this); - } - } -#endif + VerifyOrDie(observer != nullptr); + mObserver = observer; + mObserver->OnReadHandlerCreated(this); } void ReadHandler::ResumeSubscription(CASESessionManager & caseSessionManager, @@ -150,28 +136,14 @@ void ReadHandler::ResumeSubscription(CASESessionManager & caseSessionManager, ReadHandler::~ReadHandler() { - // TODO (#27672): Enable when the ReportScheduler is implemented and move in Close() after testing -#if 0 - if (nullptr != mObserver) - { - mObserver->OnReadHandlerDestroyed(this); - } -#endif + mObserver->OnReadHandlerDestroyed(this); + auto * appCallback = mManagementCallback.GetAppCallback(); if (mFlags.Has(ReadHandlerFlags::ActiveSubscription) && appCallback) { appCallback->OnSubscriptionTerminated(*this); } - if (IsType(InteractionType::Subscribe)) - { - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( - MinIntervalExpiredCallback, this); - - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( - MaxIntervalExpiredCallback, this); - } - if (IsAwaitingReportResponse()) { InteractionModelEngine::GetInstance()->GetReportingEngine().OnReportConfirm(); @@ -290,7 +262,7 @@ CHIP_ERROR ReadHandler::OnStatusResponse(Messaging::ExchangeContext * apExchange CHIP_ERROR ReadHandler::SendStatusReport(Protocols::InteractionModel::Status aStatus) { - VerifyOrReturnLogError(IsReportableNow(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(mState == HandlerState::GeneratingReports, CHIP_ERROR_INCORRECT_STATE); if (IsPriming() || IsChunkedReport()) { mSessionHandle.Grab(mExchangeCtx->GetSessionHandle()); @@ -314,7 +286,7 @@ CHIP_ERROR ReadHandler::SendStatusReport(Protocols::InteractionModel::Status aSt CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, bool aMoreChunks) { - VerifyOrReturnLogError(IsReportableNow(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(mState == HandlerState::GeneratingReports, CHIP_ERROR_INCORRECT_STATE); VerifyOrDie(!IsAwaitingReportResponse()); // Should not be reportable! if (IsPriming() || IsChunkedReport()) { @@ -359,21 +331,11 @@ CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, b InteractionModelEngine::GetInstance()->GetReportingEngine().OnReportConfirm(); } - if (IsType(InteractionType::Subscribe) && !IsPriming()) + // If we just finished a non-priming subscription report, notify our observers. + // Priming reports are handled when we send a SubscribeResponse. + if (IsType(InteractionType::Subscribe) && !IsPriming() && !IsChunkedReport()) { -// TODO (#27672): Enable when the ReportScheduler is implemented and remove call to UpdateReportTimer, will be handled by -// the report Scheduler -#if 0 - if (nullptr != mObserver) - { - mObserver->OnSubscriptionAction(this); - } -#endif - - // Ignore the error from UpdateReportTimer. If we've - // successfully sent the message, we need to return success from - // this method. - UpdateReportTimer(); + mObserver->OnSubscriptionAction(this); } } if (!aMoreChunks) @@ -641,16 +603,10 @@ void ReadHandler::MoveToState(const HandlerState aTargetState) // If we just unblocked sending reports, let's go ahead and schedule the reporting // engine to run to kick that off. // - if (aTargetState == HandlerState::GeneratingReports && IsReportableNow()) + if (aTargetState == HandlerState::GeneratingReports) { -// TODO (#27672): Enable when the ReportScheduler is implemented and remove the call to ScheduleRun() -#if 0 - if(nullptr != mObserver) - { - mObserver->OnBecameReportable(this); - } -#endif - InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); + // mObserver will take care of scheduling the report as soon as allowed + mObserver->OnBecameReportable(this); } } @@ -691,15 +647,7 @@ CHIP_ERROR ReadHandler::SendSubscribeResponse() ReturnErrorOnFailure(writer.Finalize(&packet)); VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); - // TODO (#27672): Uncomment when the ReportScheduler is implemented and remove call to UpdateReportTimer, handled by - // the report Scheduler -#if 0 - if (nullptr != mObserver) - { - mObserver->OnSubscriptionAction(this); - } -#endif - ReturnErrorOnFailure(UpdateReportTimer()); + mObserver->OnSubscriptionAction(this); ClearStateFlag(ReadHandlerFlags::PrimingReports); return mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::SubscribeResponse, std::move(packet)); @@ -818,50 +766,6 @@ void ReadHandler::PersistSubscription() } } -// TODO (#27672): Remove when ReportScheduler is enabled as timing will now be handled by the ReportScheduler -void ReadHandler::MinIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState) -{ - VerifyOrReturn(apAppState != nullptr); - ReadHandler * readHandler = static_cast(apAppState); - ChipLogDetail(DataManagement, "Unblock report hold after min %d seconds", readHandler->mMinIntervalFloorSeconds); - readHandler->ClearStateFlag(ReadHandlerFlags::WaitingUntilMinInterval); - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( - System::Clock::Seconds16(readHandler->mMaxInterval - readHandler->mMinIntervalFloorSeconds), MaxIntervalExpiredCallback, - readHandler); -} - -// TODO (#27672): Remove when ReportScheduler is enabled as timing will now be handled by the ReportScheduler -void ReadHandler::MaxIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState) -{ - VerifyOrReturn(apAppState != nullptr); - ReadHandler * readHandler = static_cast(apAppState); - readHandler->ClearStateFlag(ReadHandlerFlags::WaitingUntilMaxInterval); - ChipLogProgress(DataManagement, "Refresh subscribe timer sync after %d seconds", - readHandler->mMaxInterval - readHandler->mMinIntervalFloorSeconds); -} - -// TODO (#27672): Remove when ReportScheduler is enabled as timing will now be handled by the ReportScheduler -CHIP_ERROR ReadHandler::UpdateReportTimer() -{ - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( - MinIntervalExpiredCallback, this); - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( - MaxIntervalExpiredCallback, this); - - if (!IsChunkedReport()) - { - ChipLogProgress(DataManagement, "Refresh Subscribe Sync Timer with min %d seconds and max %d seconds", - mMinIntervalFloorSeconds, mMaxInterval); - SetStateFlag(ReadHandlerFlags::WaitingUntilMinInterval); - SetStateFlag(ReadHandlerFlags::WaitingUntilMaxInterval); - ReturnErrorOnFailure( - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( - System::Clock::Seconds16(mMinIntervalFloorSeconds), MinIntervalExpiredCallback, this)); - } - - return CHIP_NO_ERROR; -} - void ReadHandler::ResetPathIterator() { mAttributePathExpandIterator = AttributePathExpandIterator(mpAttributePathList); @@ -897,17 +801,8 @@ void ReadHandler::AttributePathIsDirty(const AttributePathParams & aAttributeCha mAttributeEncoderState = AttributeValueEncoder::AttributeEncodeState(); } - if (IsReportableNow()) - { - // TODO (#27672): Enable when the ReportScheduler is implemented and remove the call to ScheduleRun() -#if 0 - if(nullptr != mObserver) - { - mObserver->OnBecameReportable(this); - } -#endif - InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); - } + // ReportScheduler will take care of verifying the reportability of the handler and schedule the run + mObserver->OnBecameReportable(this); } Transport::SecureSession * ReadHandler::GetSession() const @@ -926,20 +821,14 @@ void ReadHandler::ForceDirtyState() void ReadHandler::SetStateFlag(ReadHandlerFlags aFlag, bool aValue) { - bool oldReportable = IsReportableNow(); + bool oldReportable = IsReportable(); mFlags.Set(aFlag, aValue); // If we became reportable, schedule a reporting run. - if (!oldReportable && IsReportableNow()) + if (!oldReportable && IsReportable()) { -// TODO (#27672): Enable when the ReportScheduler is implemented and remove the call to ScheduleRun() -#if 0 - if(nullptr != mObserver) - { - mObserver->OnBecameReportable(this); - } -#endif - InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); + // If we became reportable, the scheduler will schedule a run as soon as allowed + mObserver->OnBecameReportable(this); } } diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index 5b9bb346eb7894..5f1d3221886084 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -202,7 +202,7 @@ class ReadHandler : public Messaging::ExchangeDelegate * */ ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeContext * apExchangeContext, InteractionType aInteractionType, - Observer * observer = nullptr); + Observer * observer); #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS /** @@ -212,7 +212,7 @@ class ReadHandler : public Messaging::ExchangeDelegate * The callback passed in has to outlive this handler object. * */ - ReadHandler(ManagementCallback & apCallback, Observer * observer = nullptr); + ReadHandler(ManagementCallback & apCallback, Observer * observer); #endif const ObjectList * GetAttributePathList() const { return mpAttributePathList; } @@ -250,18 +250,6 @@ class ReadHandler : public Messaging::ExchangeDelegate return CHIP_NO_ERROR; } - /// @brief Add an observer to the read handler, currently only one observer is supported but all other callbacks should be - /// merged with a general observer type to allow multiple object to observe readhandlers - /// @param aObserver observer to be added - /// @return CHIP_ERROR_INVALID_ARGUMENT if passing in nullptr - CHIP_ERROR SetObserver(Observer * aObserver) - { - VerifyOrReturnError(nullptr != aObserver, CHIP_ERROR_INVALID_ARGUMENT); - // TODO (#27675) : After merging the callbacks and observer, change so the method adds a new observer to an observer pool - mObserver = aObserver; - return CHIP_NO_ERROR; - } - private: PriorityLevel GetCurrentPriority() const { return mCurrentPriority; } EventNumber & GetEventMin() { return mEventMin; } @@ -275,26 +263,16 @@ class ReadHandler : public Messaging::ExchangeDelegate enum class ReadHandlerFlags : uint8_t { - // WaitingUntilMinInterval is used to prevent subscription data delivery while we are - // waiting for the min reporting interval to elapse. - WaitingUntilMinInterval = (1 << 0), // TODO (#27672): Remove once ReportScheduler is implemented or change to test flag - - // WaitingUntilMaxInterval is used to prevent subscription empty report delivery while we - // are waiting for the max reporting interval to elaps. When WaitingUntilMaxInterval - // becomes false, we are allowed to send an empty report to keep the - // subscription alive on the client. - WaitingUntilMaxInterval = (1 << 1), // TODO (#27672): Remove once ReportScheduler is implemented - // The flag indicating we are in the middle of a series of chunked report messages, this flag will be cleared during // sending last chunked message. - ChunkedReport = (1 << 2), + ChunkedReport = (1 << 0), // Tracks whether we're in the initial phase of receiving priming // reports, which is always true for reads and true for subscriptions // prior to receiving a subscribe response. - PrimingReports = (1 << 3), - ActiveSubscription = (1 << 4), - FabricFiltered = (1 << 5), + PrimingReports = (1 << 1), + ActiveSubscription = (1 << 2), + FabricFiltered = (1 << 3), // For subscriptions, we record the dirty set generation when we started to generate the last report. // The mCurrentReportsBeginGeneration records the generation at the start of the current report. This only/ // has a meaningful value while IsReporting() is true. @@ -304,10 +282,10 @@ class ReadHandler : public Messaging::ExchangeDelegate // mPreviousReportsBeginGeneration has had its value sent to the client. // when receiving initial request, it needs mark current handler as dirty. // when there is urgent event, it needs mark current handler as dirty. - ForceDirty = (1 << 6), + ForceDirty = (1 << 4), // Don't need the response for report data if true - SuppressResponse = (1 << 7), + SuppressResponse = (1 << 5), }; /** @@ -354,17 +332,12 @@ class ReadHandler : public Messaging::ExchangeDelegate bool IsIdle() const { return mState == HandlerState::Idle; } - // TODO (#27672): Change back to IsReportable once ReportScheduler is implemented so this can assess reportability without - // considering timing. The ReporScheduler will handle timing. - /// @brief Returns whether the ReadHandler is in a state where it can immediately send a report. This function - /// is used to determine whether a report generation should be scheduled for the handler. - bool IsReportableNow() const + /// @brief Returns whether the ReadHandler is in a state where it can send a report and there is data to report. + bool IsReportable() const { - // Important: Anything that changes the state IsReportableNow depends on in - // a way that causes IsReportableNow to become true must call ScheduleRun - // on the reporting engine. - return mState == HandlerState::GeneratingReports && !mFlags.Has(ReadHandlerFlags::WaitingUntilMinInterval) && - (IsDirty() || !mFlags.Has(ReadHandlerFlags::WaitingUntilMaxInterval)); + // Important: Anything that changes the state IsReportable must call mObserver->OnBecameReportable(this) for the scheduler + // to plan the next run accordingly. + return mState == HandlerState::GeneratingReports && IsDirty(); } bool IsGeneratingReports() const { return mState == HandlerState::GeneratingReports; } bool IsAwaitingReportResponse() const { return mState == HandlerState::AwaitingReportResponse; } @@ -445,8 +418,8 @@ class ReadHandler : public Messaging::ExchangeDelegate friend class chip::app::reporting::Engine; friend class chip::app::InteractionModelEngine; - // The report scheduler needs to be able to access StateFlag private functions IsGeneratingReports() and IsDirty() to - // know when to schedule a run so it is declared as a friend class. + // The report scheduler needs to be able to access StateFlag private functions IsReportable(), IsGeneratingReports() and + // IsDirty() to know when to schedule a run so it is declared as a friend class. friend class chip::app::reporting::ReportScheduler; enum class HandlerState : uint8_t @@ -472,15 +445,6 @@ class ReadHandler : public Messaging::ExchangeDelegate */ void Close(CloseOptions options = CloseOptions::kDropPersistedSubscription); - /// @brief This function is called when the min interval timer has expired, it restarts the timer on a timeout equal to the - /// difference between the max interval and the min interval. - static void MinIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState); // TODO (#27672): Remove once - // ReportScheduler is implemented. - static void MaxIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState); // TODO (#27672): Remove once - // ReportScheduler is implemented. - /// @brief This function is called when a report is sent and it restarts the min interval timer. - CHIP_ERROR UpdateReportTimer(); // TODO (#27672) : Remove once ReportScheduler is implemented. - CHIP_ERROR SendSubscribeResponse(); CHIP_ERROR ProcessSubscribeRequest(System::PacketBufferHandle && aPayload); CHIP_ERROR ProcessReadRequest(System::PacketBufferHandle && aPayload); diff --git a/src/app/TimerDelegates.h b/src/app/TimerDelegates.h new file mode 100644 index 00000000000000..8e24fd4aef09bd --- /dev/null +++ b/src/app/TimerDelegates.h @@ -0,0 +1,57 @@ +/* + * + * 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 +#include +#include + +namespace chip { +namespace app { + +class DefaultTimerDelegate : public reporting::ReportScheduler::TimerDelegate +{ +public: + using TimerContext = reporting::TimerContext; + using Timeout = System::Clock::Timeout; + static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) + { + TimerContext * context = static_cast(aAppState); + context->TimerFired(); + } + CHIP_ERROR StartTimer(TimerContext * context, Timeout aTimeout) override + { + return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( + aTimeout, TimerCallbackInterface, context); + } + void CancelTimer(TimerContext * context) override + { + InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( + TimerCallbackInterface, context); + } + bool IsTimerActive(TimerContext * context) override + { + return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->IsTimerActive( + TimerCallbackInterface, context); + } + + System::Clock::Timestamp GetCurrentMonotonicTimestamp() override { return System::SystemClock().GetMonotonicTimestamp(); } +}; + +} // namespace app +} // namespace chip diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index f0fea66cc0b16c..1243fff3ac1775 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -636,8 +636,7 @@ void Engine::Run() ReadHandler * readHandler = imEngine->ActiveHandlerAt(mCurReadHandlerIdx % (uint32_t) imEngine->mReadHandlers.Allocated()); VerifyOrDie(readHandler != nullptr); - // TODO (#27672): Replace with check with Report Scheduler if the read handler is reportable - if (readHandler->IsReportableNow()) + if (imEngine->GetReportScheduler()->IsReportableNow(readHandler)) { mRunningReadHandler = readHandler; CHIP_ERROR err = BuildAndSendSingleReportData(readHandler); diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h index 0449ba3114f857..d691e4b36889ed 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -20,7 +20,6 @@ #include #include -#include #include namespace chip { @@ -32,6 +31,13 @@ class TestReportScheduler; using Timestamp = System::Clock::Timestamp; +class TimerContext +{ +public: + virtual ~TimerContext() {} + virtual void TimerFired() = 0; +}; + class ReportScheduler : public ReadHandler::Observer { public: @@ -45,17 +51,28 @@ class ReportScheduler : public ReadHandler::Observer /// CancelTimer) before starting a new one for that context. /// @param context context to pass to the timer callback. /// @param aTimeout time in miliseconds before the timer expires - virtual CHIP_ERROR StartTimer(void * context, System::Clock::Timeout aTimeout) = 0; + virtual CHIP_ERROR StartTimer(TimerContext * context, System::Clock::Timeout aTimeout) = 0; /// @brief Cancel a timer for a given context /// @param context used to identify the timer to cancel - virtual void CancelTimer(void * context) = 0; - virtual bool IsTimerActive(void * context) = 0; - virtual Timestamp GetCurrentMonotonicTimestamp() = 0; + virtual void CancelTimer(TimerContext * context) = 0; + virtual bool IsTimerActive(TimerContext * context) = 0; + virtual Timestamp GetCurrentMonotonicTimestamp() = 0; }; - class ReadHandlerNode : public IntrusiveListNodeBase<> + class ReadHandlerNode : public TimerContext { public: +#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST + /// Test flags to allow TestReadInteraction to simulate expiration of the minimal and maximal intervals without + /// waiting + enum class TestFlags : uint8_t{ + MinIntervalElapsed = (1 << 0), + MaxIntervalElapsed = (1 << 1), + }; + void SetTestFlags(TestFlags aFlag, bool aValue) { mFlags.Set(aFlag, aValue); } + bool GetTestFlags(TestFlags aFlag) const { return mFlags.Has(aFlag); } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + ReadHandlerNode(ReadHandler * aReadHandler, TimerDelegate * aTimerDelegate, ReportScheduler * aScheduler) : mTimerDelegate(aTimerDelegate), mScheduler(aScheduler) { @@ -67,20 +84,37 @@ class ReportScheduler : public ReadHandler::Observer SetIntervalTimeStamps(aReadHandler); } ReadHandler * GetReadHandler() const { return mReadHandler; } + /// @brief Check if the Node is reportable now, meaning its readhandler was made reportable by attribute dirtying and /// handler state, and minimal time interval since last report has elapsed, or the maximal time interval since last /// report has elapsed bool IsReportableNow() const { - // TODO: Add flags to allow for test to simulate waiting for the min interval or max intrval to elapse when integrating - // the scheduler in the ReadHandler Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + +#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST + return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp || mFlags.Has(TestFlags::MinIntervalElapsed)) && + (mReadHandler->IsDirty() || (now >= mMaxTimestamp || mFlags.Has(TestFlags::MaxIntervalElapsed)) || + now >= mSyncTimestamp)); +#else return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || now >= mSyncTimestamp))); +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } bool IsEngineRunScheduled() const { return mEngineRunScheduled; } - void SetEngineRunScheduled(bool aEnginRunScheduled) { mEngineRunScheduled = aEnginRunScheduled; } + void SetEngineRunScheduled(bool aEngineRunScheduled) + { + mEngineRunScheduled = aEngineRunScheduled; +#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST + // If the engine becomes unscheduled, this means a run just took place so we reset the test flags + if (!mEngineRunScheduled) + { + mFlags.Set(TestFlags::MinIntervalElapsed, false); + mFlags.Set(TestFlags::MaxIntervalElapsed, false); + } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + } void SetIntervalTimeStamps(ReadHandler * aReadHandler) { @@ -92,7 +126,7 @@ class ReportScheduler : public ReadHandler::Observer mSyncTimestamp = mMaxTimestamp; } - void RunCallback() + void TimerFired() override { mScheduler->ReportTimerCallback(); SetEngineRunScheduled(true); @@ -111,6 +145,9 @@ class ReportScheduler : public ReadHandler::Observer System::Clock::Timestamp GetSyncTimestamp() const { return mSyncTimestamp; } private: +#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST + BitFlags mFlags; +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST TimerDelegate * mTimerDelegate; ReadHandler * mReadHandler; ReportScheduler * mScheduler; @@ -132,19 +169,42 @@ class ReportScheduler : public ReadHandler::Observer /// @brief Check whether a ReadHandler is reportable right now, taking into account its minimum and maximum intervals. /// @param aReadHandler read handler to check - bool IsReportableNow(ReadHandler * aReadHandler) - { - return FindReadHandlerNode(aReadHandler)->IsReportableNow(); - } // TODO: Change the IsReportableNow to IsReportable() for readHandlers + bool IsReportableNow(ReadHandler * aReadHandler) { return FindReadHandlerNode(aReadHandler)->IsReportableNow(); } /// @brief Check if a ReadHandler is reportable without considering the timing - bool IsReadHandlerReportable(ReadHandler * aReadHandler) const - { - return aReadHandler->IsGeneratingReports() && aReadHandler->IsDirty(); - } + bool IsReadHandlerReportable(ReadHandler * aReadHandler) const { return aReadHandler->IsReportable(); } /// @brief Get the number of ReadHandlers registered in the scheduler's node pool size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); } +#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST + void RunNodeCallbackForHandler(const ReadHandler * aReadHandler) + { + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + node->TimerFired(); + } + void SetFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag, bool aValue) + { + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + node->SetTestFlags(aFlag, aValue); + } + + bool CheckFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag) + { + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + return node->GetTestFlags(aFlag); + } + Timestamp GetMinTimestampForHandler(const ReadHandler * aReadHandler) + { + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + return node->GetMinTimestamp(); + } + Timestamp GetMaxTimestampForHandler(const ReadHandler * aReadHandler) + { + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + return node->GetMaxTimestamp(); + } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + protected: friend class chip::app::reporting::TestReportScheduler; @@ -153,17 +213,19 @@ class ReportScheduler : public ReadHandler::Observer /// @return Node Address if node was found, nullptr otherwise ReadHandlerNode * FindReadHandlerNode(const ReadHandler * aReadHandler) { - for (auto & iter : mReadHandlerList) - { - if (iter.GetReadHandler() == aReadHandler) + ReadHandlerNode * foundNode = nullptr; + mNodesPool.ForEachActiveObject([&foundNode, aReadHandler](ReadHandlerNode * node) { + if (node->GetReadHandler() == aReadHandler) { - return &iter; + foundNode = node; + return Loop::Break; } - } - return nullptr; + + return Loop::Continue; + }); + return foundNode; } - IntrusiveList mReadHandlerList; ObjectPool mNodesPool; TimerDelegate * mTimerDelegate; }; diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index b49884aa3f699f..b6170fba9e0fdf 100644 --- a/src/app/reporting/ReportSchedulerImpl.cpp +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -46,7 +46,6 @@ void ReportSchedulerImpl::OnReadHandlerCreated(ReadHandler * aReadHandler) // The NodePool is the same size as the ReadHandler pool from the IM Engine, so we don't need a check for size here since if a // ReadHandler was created, space should be available. newNode = mNodesPool.CreateObject(aReadHandler, mTimerDelegate, this); - mReadHandlerList.PushBack(newNode); ChipLogProgress(DataManagement, "Registered a ReadHandler that will schedule a report between system Timestamp: %" PRIu64 @@ -59,23 +58,21 @@ void ReportSchedulerImpl::OnReadHandlerCreated(ReadHandler * aReadHandler) ScheduleReport(newTimeout, newNode); } -/// @brief When a ReadHandler becomes reportable, schedule, verifies if the min interval of a handleris elapsed. If not, -/// reschedule the report to happen when the min interval is elapsed. If it is, schedule an engine run. +/// @brief When a ReadHandler becomes reportable, schedule, recalculate and reschedule the report. void ReportSchedulerImpl::OnBecameReportable(ReadHandler * aReadHandler) { ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); VerifyOrReturn(nullptr != node); - Milliseconds32 newTimeout; CalculateNextReportTimeout(newTimeout, node); ScheduleReport(newTimeout, node); } -void ReportSchedulerImpl::OnSubscriptionAction(ReadHandler * apReadHandler) +void ReportSchedulerImpl::OnSubscriptionAction(ReadHandler * aReadHandler) { - ReadHandlerNode * node = FindReadHandlerNode(apReadHandler); + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); VerifyOrReturn(nullptr != node); - node->SetIntervalTimeStamps(apReadHandler); + node->SetIntervalTimeStamps(aReadHandler); Milliseconds32 newTimeout; CalculateNextReportTimeout(newTimeout, node); ScheduleReport(newTimeout, node); @@ -91,7 +88,6 @@ void ReportSchedulerImpl::OnReadHandlerDestroyed(ReadHandler * aReadHandler) // Nothing to remove if the handler is not found in the list VerifyOrReturn(nullptr != removeNode); - mReadHandlerList.Remove(removeNode); mNodesPool.ReleaseObject(removeNode); } @@ -99,6 +95,11 @@ CHIP_ERROR ReportSchedulerImpl::ScheduleReport(Timeout timeout, ReadHandlerNode { // Cancel Report if it is currently scheduled mTimerDelegate->CancelTimer(node); + if (timeout == Milliseconds32(0)) + { + node->TimerFired(); + return CHIP_NO_ERROR; + } ReturnErrorOnFailure(mTimerDelegate->StartTimer(node, timeout)); return CHIP_NO_ERROR; @@ -113,11 +114,10 @@ void ReportSchedulerImpl::CancelReport(ReadHandler * aReadHandler) void ReportSchedulerImpl::UnregisterAllHandlers() { - while (!mReadHandlerList.Empty()) - { - ReadHandler * firstReadHandler = mReadHandlerList.begin()->GetReadHandler(); - OnReadHandlerDestroyed(firstReadHandler); - } + mNodesPool.ForEachActiveObject([this](ReadHandlerNode * node) { + this->OnReadHandlerDestroyed(node->GetReadHandler()); + return Loop::Continue; + }); } bool ReportSchedulerImpl::IsReportScheduled(ReadHandler * aReadHandler) @@ -129,7 +129,7 @@ bool ReportSchedulerImpl::IsReportScheduled(ReadHandler * aReadHandler) CHIP_ERROR ReportSchedulerImpl::CalculateNextReportTimeout(Timeout & timeout, ReadHandlerNode * aNode) { - VerifyOrReturnError(mReadHandlerList.Contains(aNode), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(nullptr != FindReadHandlerNode(aNode->GetReadHandler()), CHIP_ERROR_INVALID_ARGUMENT); Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); // If the handler is reportable now, just schedule a report immediately diff --git a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp index 16713e37e05741..b3f700b8cbcc0f 100644 --- a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp +++ b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp @@ -29,16 +29,15 @@ using ReadHandlerNode = ReportScheduler::ReadHandlerNode; void SynchronizedReportSchedulerImpl::OnReadHandlerDestroyed(ReadHandler * aReadHandler) { // Verify list is populated - VerifyOrReturn((!mReadHandlerList.Empty())); + VerifyOrReturn(mNodesPool.Allocated()); ReadHandlerNode * removeNode = FindReadHandlerNode(aReadHandler); // Nothing to remove if the handler is not found in the list VerifyOrReturn(nullptr != removeNode); - mReadHandlerList.Remove(removeNode); mNodesPool.ReleaseObject(removeNode); - if (mReadHandlerList.Empty()) + if (!mNodesPool.Allocated()) { // Only cancel the timer if there are no more handlers registered CancelReport(); @@ -49,6 +48,11 @@ CHIP_ERROR SynchronizedReportSchedulerImpl::ScheduleReport(Timeout timeout, Read { // Cancel Report if it is currently scheduled mTimerDelegate->CancelTimer(this); + if (timeout == Milliseconds32(0)) + { + ReportTimerCallback(); + return CHIP_NO_ERROR; + } ReturnErrorOnFailure(mTimerDelegate->StartTimer(this, timeout)); mTestNextReportTimestamp = mTimerDelegate->GetCurrentMonotonicTimestamp() + timeout; @@ -61,8 +65,7 @@ void SynchronizedReportSchedulerImpl::CancelReport() mTimerDelegate->CancelTimer(this); } -/// @brief Checks if the timer is active for the given ReadHandler. Since all read handlers are scheduled on the same timer, we -/// check if the node is in the list and if the timer is active for the ReportScheduler +/// @brief Checks if the timer is active for the ReportScheduler bool SynchronizedReportSchedulerImpl::IsReportScheduled() { return mTimerDelegate->IsTimerActive(this); @@ -72,17 +75,18 @@ bool SynchronizedReportSchedulerImpl::IsReportScheduled() /// @return NO_ERROR if the smallest maximum interval was found, error otherwise, INVALID LIST LENGTH if the list is empty CHIP_ERROR SynchronizedReportSchedulerImpl::FindNextMaxInterval() { - VerifyOrReturnError(!mReadHandlerList.Empty(), CHIP_ERROR_INVALID_LIST_LENGTH); + VerifyOrReturnError(mNodesPool.Allocated(), CHIP_ERROR_INVALID_LIST_LENGTH); System::Clock::Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); System::Clock::Timestamp earliest = now + Seconds16::max(); - for (auto & iter : mReadHandlerList) - { - if (iter.GetMaxTimestamp() < earliest && iter.GetMaxTimestamp() > now) + mNodesPool.ForEachActiveObject([&earliest, now](ReadHandlerNode * node) { + if (node->GetMaxTimestamp() < earliest && node->GetMaxTimestamp() > now) { - earliest = iter.GetMaxTimestamp(); + earliest = node->GetMaxTimestamp(); } - } + + return Loop::Continue; + }); mNextMaxTimestamp = earliest; @@ -95,20 +99,19 @@ CHIP_ERROR SynchronizedReportSchedulerImpl::FindNextMaxInterval() /// @return NO_ERROR if the highest minimum timestamp was found, error otherwise, INVALID LIST LENGTH if the list is empty CHIP_ERROR SynchronizedReportSchedulerImpl::FindNextMinInterval() { - VerifyOrReturnError(!mReadHandlerList.Empty(), CHIP_ERROR_INVALID_LIST_LENGTH); + VerifyOrReturnError(mNodesPool.Allocated(), CHIP_ERROR_INVALID_LIST_LENGTH); System::Clock::Timestamp latest = mTimerDelegate->GetCurrentMonotonicTimestamp(); - for (auto & iter : mReadHandlerList) - { - if (iter.GetMinTimestamp() > latest && IsReadHandlerReportable(iter.GetReadHandler())) + mNodesPool.ForEachActiveObject([&latest, this](ReadHandlerNode * node) { + if (node->GetMinTimestamp() > latest && this->IsReadHandlerReportable(node->GetReadHandler()) && + node->GetMinTimestamp() <= this->mNextMaxTimestamp) { // We do not want the new min to be set above the max for any handler - if (iter.GetMinTimestamp() <= mNextMaxTimestamp) - { - latest = iter.GetMinTimestamp(); - } + latest = node->GetMinTimestamp(); } - } + + return Loop::Continue; + }); mNextMinTimestamp = latest; @@ -117,7 +120,7 @@ CHIP_ERROR SynchronizedReportSchedulerImpl::FindNextMinInterval() CHIP_ERROR SynchronizedReportSchedulerImpl::CalculateNextReportTimeout(Timeout & timeout, ReadHandlerNode * aNode) { - VerifyOrReturnError(mReadHandlerList.Contains(aNode), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(nullptr != FindReadHandlerNode(aNode->GetReadHandler()), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(FindNextMaxInterval()); ReturnErrorOnFailure(FindNextMinInterval()); bool reportableNow = false; @@ -125,22 +128,23 @@ CHIP_ERROR SynchronizedReportSchedulerImpl::CalculateNextReportTimeout(Timeout & Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); - for (auto & iter : mReadHandlerList) - { - if (!iter.IsEngineRunScheduled()) + mNodesPool.ForEachActiveObject([&reportableNow, &reportableAtMin, this](ReadHandlerNode * node) { + if (!node->IsEngineRunScheduled()) { - if (iter.IsReportableNow()) + if (node->IsReportableNow()) { reportableNow = true; - break; + return Loop::Break; } - if (IsReadHandlerReportable(iter.GetReadHandler()) && iter.GetMinTimestamp() <= mNextMaxTimestamp) + if (this->IsReadHandlerReportable(node->GetReadHandler()) && node->GetMinTimestamp() <= this->mNextMaxTimestamp) { reportableAtMin = true; } } - } + + return Loop::Continue; + }); // Find out if any handler is reportable now @@ -159,36 +163,36 @@ CHIP_ERROR SynchronizedReportSchedulerImpl::CalculateNextReportTimeout(Timeout & } // Updates the synching time of each handler - for (auto & iter : mReadHandlerList) - { + mNodesPool.ForEachActiveObject([now, timeout](ReadHandlerNode * node) { // Prevent modifying the sync if the handler is currently reportable, sync's purpose is to allow handler to become // reportable earlier than their max interval - if (!iter.IsReportableNow()) + if (!node->IsReportableNow()) { - iter.SetSyncTimestamp(Milliseconds64(now + timeout)); + node->SetSyncTimestamp(Milliseconds64(now + timeout)); } - } + + return Loop::Continue; + }); return CHIP_NO_ERROR; } /// @brief Callback called when the report timer expires to schedule an engine run regardless of the state of the ReadHandlers, as /// the engine already verifies that read handlers are reportable before sending a report -void SynchronizedReportSchedulerImpl::ReportTimerCallback() +void SynchronizedReportSchedulerImpl::TimerFired() { - ReportSchedulerImpl::ReportTimerCallback(); + InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); - Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); - ChipLogProgress(DataManagement, "Engine run at time: %" PRIu64 " for Handlers:", now.count()); - for (auto & iter : mReadHandlerList) - { - if (iter.IsReportableNow()) + mNodesPool.ForEachActiveObject([](ReadHandlerNode * node) { + if (node->IsReportableNow()) { - iter.SetEngineRunScheduled(true); - ChipLogProgress(DataManagement, "Handler: %p with min: %" PRIu64 " and max: %" PRIu64 " and sync: %" PRIu64, (&iter), - iter.GetMinTimestamp().count(), iter.GetMaxTimestamp().count(), iter.GetSyncTimestamp().count()); + node->SetEngineRunScheduled(true); + ChipLogProgress(DataManagement, "Handler: %p with min: %" PRIu64 " and max: %" PRIu64 " and sync: %" PRIu64, (node), + node->GetMinTimestamp().count(), node->GetMaxTimestamp().count(), node->GetSyncTimestamp().count()); } - } + + return Loop::Continue; + }); } } // namespace reporting diff --git a/src/app/reporting/SynchronizedReportSchedulerImpl.h b/src/app/reporting/SynchronizedReportSchedulerImpl.h index 18ee69520e5651..9fd4a8ca0aa684 100644 --- a/src/app/reporting/SynchronizedReportSchedulerImpl.h +++ b/src/app/reporting/SynchronizedReportSchedulerImpl.h @@ -30,17 +30,17 @@ using Milliseconds64 = System::Clock::Milliseconds64; using ReadHandlerNode = ReportScheduler::ReadHandlerNode; using TimerDelegate = ReportScheduler::TimerDelegate; -class SynchronizedReportSchedulerImpl : public ReportSchedulerImpl +class SynchronizedReportSchedulerImpl : public ReportSchedulerImpl, public TimerContext { public: void OnReadHandlerDestroyed(ReadHandler * aReadHandler) override; SynchronizedReportSchedulerImpl(TimerDelegate * aTimerDelegate) : ReportSchedulerImpl(aTimerDelegate) {} - ~SynchronizedReportSchedulerImpl() {} + ~SynchronizedReportSchedulerImpl() override { UnregisterAllHandlers(); } bool IsReportScheduled(); - void ReportTimerCallback() override; + void TimerFired() override; protected: CHIP_ERROR ScheduleReport(System::Clock::Timeout timeout, ReadHandlerNode * node) override; diff --git a/src/app/reporting/tests/MockReportScheduler.cpp b/src/app/reporting/tests/MockReportScheduler.cpp new file mode 100644 index 00000000000000..e42cf22e973e00 --- /dev/null +++ b/src/app/reporting/tests/MockReportScheduler.cpp @@ -0,0 +1,46 @@ +/* + * + * 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. + * 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. + */ + +#include +#include +#include + +namespace chip { +namespace app { +namespace reporting { + +/// @brief Static instance of the default report scheduler and synchronized report scheduler meant for injection into IM engine in +/// tests + +static chip::app::DefaultTimerDelegate sTimerDelegate; +static ReportSchedulerImpl sTestDefaultReportScheduler(&sTimerDelegate); +static SynchronizedReportSchedulerImpl sTestReportScheduler(&sTimerDelegate); + +ReportSchedulerImpl * GetDefaultReportScheduler() +{ + return &sTestDefaultReportScheduler; +} + +SynchronizedReportSchedulerImpl * GetSynchronizedReportScheduler() +{ + return &sTestReportScheduler; +} + +} // namespace reporting +} // namespace app +} // namespace chip diff --git a/src/app/reporting/tests/MockReportScheduler.h b/src/app/reporting/tests/MockReportScheduler.h new file mode 100644 index 00000000000000..9b3b3474a4fd49 --- /dev/null +++ b/src/app/reporting/tests/MockReportScheduler.h @@ -0,0 +1,34 @@ +/* + * + * 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. + * 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 +#include + +namespace chip { +namespace app { +namespace reporting { + +ReportSchedulerImpl * GetDefaultReportScheduler(); + +SynchronizedReportSchedulerImpl * GetSynchronizedReportScheduler(); + +} // namespace reporting +} // namespace app +} // namespace chip diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 0dfa76bd6ad59b..96847ace574100 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -316,8 +316,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) &mCertificateValidityPolicy, mGroupsProvider); SuccessOrExit(err); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mCASESessionManager, - mSubscriptionResumptionStorage); + err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mReportScheduler, + &mCASESessionManager, mSubscriptionResumptionStorage); SuccessOrExit(err); // This code is necessary to restart listening to existing groups after a reboot diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 9c4a3ee499dca3..c41a9e3127e0d9 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -63,7 +63,13 @@ #if CONFIG_NETWORK_LAYER_BLE #include #endif +#include #include +#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED +#include +#else +#include +#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER #include // nogncheck @@ -254,6 +260,7 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore; static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static Credentials::GroupDataProviderImpl sGroupDataProvider; + #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION static SimpleSessionResumptionStorage sSessionResumptionStorage; #endif @@ -333,6 +340,8 @@ class Server app::DefaultAttributePersistenceProvider & GetDefaultAttributePersister() { return mAttributePersister; } + app::reporting::ReportScheduler & GetReportScheduler() { return mReportScheduler; } + /** * This function causes the ShutDown event to be generated async on the * Matter event loop. Should be called before stopping the event loop. @@ -351,7 +360,7 @@ class Server static Server & GetInstance() { return sServer; } private: - Server() = default; + Server() : mTimerDelegate(), mReportScheduler(&mTimerDelegate) {} static Server sServer; @@ -585,6 +594,12 @@ class Server app::DefaultAttributePersistenceProvider mAttributePersister; GroupDataProviderListener mListener; ServerFabricDelegate mFabricDelegate; + app::DefaultTimerDelegate mTimerDelegate; +#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED + app::reporting::SynchronizedReportSchedulerImpl mReportScheduler; +#else + app::reporting::ReportSchedulerImpl mReportScheduler; +#endif Access::AccessControl mAccessControl; app::AclStorage * mAclStorage; diff --git a/src/app/tests/AppTestContext.cpp b/src/app/tests/AppTestContext.cpp index 3a63c3e21c5952..abac16a531b090 100644 --- a/src/app/tests/AppTestContext.cpp +++ b/src/app/tests/AppTestContext.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,8 @@ namespace Test { CHIP_ERROR AppContext::Init() { ReturnErrorOnFailure(Super::Init()); - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(&GetExchangeManager(), &GetFabricTable())); + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(&GetExchangeManager(), &GetFabricTable(), + app::reporting::GetDefaultReportScheduler())); Access::SetAccessControl(gPermissiveAccessControl); ReturnErrorOnFailure( diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index e5f39d95ab10dd..5378b199aa17f7 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -24,6 +24,7 @@ static_library("helpers") { output_dir = "${root_out_dir}/lib" sources = [ + "${chip_root}/src/app/reporting/tests/MockReportScheduler.cpp", "AppTestContext.cpp", "AppTestContext.h", "integration/RequiredPrivilegeStubs.cpp", diff --git a/src/app/tests/TestAclAttribute.cpp b/src/app/tests/TestAclAttribute.cpp index cd7d774ef3429a..1f0e0c13f17023 100644 --- a/src/app/tests/TestAclAttribute.cpp +++ b/src/app/tests/TestAclAttribute.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -170,7 +171,7 @@ void TestAclAttribute::TestACLDeniedAttribute(nlTestSuite * apSuite, void * apCo MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); { diff --git a/src/app/tests/TestAclEvent.cpp b/src/app/tests/TestAclEvent.cpp index be9b61affdb3ca..fcb477761aa342 100644 --- a/src/app/tests/TestAclEvent.cpp +++ b/src/app/tests/TestAclEvent.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -235,7 +236,7 @@ void TestAclEvent::TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * GenerateEvents(apSuite, apContext); auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); // A custom AccessControl::Delegate has been installed that grants privilege to any cluster except the test cluster. diff --git a/src/app/tests/TestInteractionModelEngine.cpp b/src/app/tests/TestInteractionModelEngine.cpp index 6fc5b1da27dcbe..a9a21071d25475 100644 --- a/src/app/tests/TestInteractionModelEngine.cpp +++ b/src/app/tests/TestInteractionModelEngine.cpp @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -70,7 +71,8 @@ void TestInteractionModelEngine::TestAttributePathParamsPushRelease(nlTestSuite { TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; - err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ObjectList * attributePathParamsList = nullptr; AttributePathParams attributePathParams1; @@ -107,7 +109,8 @@ void TestInteractionModelEngine::TestRemoveDuplicateConcreteAttribute(nlTestSuit { TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; - err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ObjectList * attributePathParamsList = nullptr; AttributePathParams attributePathParams1; @@ -231,7 +234,8 @@ void TestInteractionModelEngine::TestSubscriptionResumptionTimer(nlTestSuite * a { TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; - err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); uint32_t timeTillNextResubscriptionMs; diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 9ec3d59330c216..f886d6ead65bd8 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include @@ -45,7 +47,6 @@ #include #include #include - #include namespace { @@ -253,8 +254,13 @@ class NullReadHandlerCallback : public chip::app::ReadHandler::ManagementCallbac } // namespace +using ReportScheduler = chip::app::reporting::ReportScheduler; +using ReportSchedulerImpl = chip::app::reporting::ReportSchedulerImpl; +using ReadHandlerNode = chip::app::reporting::ReportScheduler::ReadHandlerNode; + namespace chip { namespace app { + CHIP_ERROR ReadSingleClusterData(const Access::SubjectDescriptor & aSubjectDescriptor, bool aIsFabricFiltered, const ConcreteReadAttributePath & aPath, AttributeReportIBs::Builder & aAttributeReports, AttributeValueEncoder::AttributeEncodeState * apEncoderState) @@ -512,12 +518,13 @@ void TestReadInteraction::TestReadHandler(nlTestSuite * apSuite, void * apContex NullReadHandlerCallback nullCallback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); { Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); - ReadHandler readHandler(nullCallback, exchangeCtx, chip::app::ReadHandler::InteractionType::Read); + ReadHandler readHandler(nullCallback, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); GenerateReportData(apSuite, apContext, reportDatabuf, false /*aNeedInvalidReport*/, false /* aSuppressResponse*/); err = readHandler.SendReportData(std::move(reportDatabuf), false); @@ -655,12 +662,13 @@ void TestReadInteraction::TestReadHandlerInvalidAttributePath(nlTestSuite * apSu NullReadHandlerCallback nullCallback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); { Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); - ReadHandler readHandler(nullCallback, exchangeCtx, chip::app::ReadHandler::InteractionType::Read); + ReadHandler readHandler(nullCallback, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); GenerateReportData(apSuite, apContext, reportDatabuf, false /*aNeedInvalidReport*/, false /* aSuppressResponse*/); err = readHandler.SendReportData(std::move(reportDatabuf), false); @@ -817,7 +825,7 @@ void TestReadInteraction::TestReadRoundtrip(nlTestSuite * apSuite, void * apCont MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -899,7 +907,7 @@ void TestReadInteraction::TestReadRoundtripWithDataVersionFilter(nlTestSuite * a MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -955,7 +963,7 @@ void TestReadInteraction::TestReadRoundtripWithNoMatchPathDataVersionFilter(nlTe MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); chip::app::AttributePathParams attributePathParams[2]; @@ -1015,7 +1023,7 @@ void TestReadInteraction::TestReadRoundtripWithMultiSamePathDifferentDataVersion MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1076,7 +1084,7 @@ void TestReadInteraction::TestReadRoundtripWithSameDifferentPathsDataVersionFilt MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1137,7 +1145,7 @@ void TestReadInteraction::TestReadWildcard(nlTestSuite * apSuite, void * apConte MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1187,7 +1195,7 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1239,7 +1247,7 @@ void TestReadInteraction::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void GenerateEvents(apSuite, apContext); auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); chip::app::AttributePathParams attributePathParams[2]; @@ -1390,7 +1398,7 @@ void TestReadInteraction::TestReadInvalidAttributePathRoundtrip(nlTestSuite * ap MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1431,13 +1439,14 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi SubscribeRequestMessage::Builder subscribeRequestBuilder; MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); { - ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read); + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); writer.Init(std::move(subscribeRequestbuf)); err = subscribeRequestBuilder.Init(&writer); @@ -1492,8 +1501,9 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1587,7 +1597,7 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a dirtyPath5.mAttributeId = 4; // Test report with 2 different path - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mGotEventResponse = false; delegate.mNumAttributeResponse = 0; @@ -1599,12 +1609,15 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse == true); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 2 different path, and 1 same path - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1616,11 +1629,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, and one path is overlapped with another - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1632,11 +1648,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, all are not overlapped, one path is not interested for current subscription - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1648,12 +1667,19 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test empty report - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMaxInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had + // elapsed as simulated above + reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -1683,8 +1709,9 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite MockInteractionModelApp delegate; MockInteractionModelApp nonUrgentDelegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); @@ -1740,13 +1767,12 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite GenerateEvents(apSuite, apContext); - NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mFlags.Has(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval)); + NL_TEST_ASSERT(apSuite, reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > startTime); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->IsDirty()); delegate.mGotEventResponse = false; delegate.mGotReport = false; - NL_TEST_ASSERT(apSuite, - nonUrgentDelegate.mpReadHandler->mFlags.Has(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval)); + NL_TEST_ASSERT(apSuite, reportScheduler->GetMinTimestampForHandler(nonUrgentDelegate.mpReadHandler) > startTime); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); nonUrgentDelegate.mGotEventResponse = false; nonUrgentDelegate.mGotReport = false; @@ -1780,16 +1806,19 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); - // Since we just sent a report for our urgent subscription, we should have our min interval timer - // running again. - NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mFlags.Has(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval)); + // Since we just sent a report for our urgent subscription, the min interval of the urgent subcription should have been + // updated + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > + System::SystemClock().GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); delegate.mGotEventResponse = false; - // For our non-urgent subscription, we did not send anything, so we - // should not have a min interval timer running there. + // For our non-urgent subscription, we did not send anything, so the min interval should of the non urgent subcription + // should be in the past NL_TEST_ASSERT(apSuite, - !nonUrgentDelegate.mpReadHandler->mFlags.Has(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval)); + reportScheduler->GetMinTimestampForHandler(nonUrgentDelegate.mpReadHandler) < + System::SystemClock().GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); // Wait for the min interval timer to fire. @@ -1807,18 +1836,24 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); - // min-interval timer should have fired, and our handler should still - // not be dirty or even reportable. - NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->mFlags.Has(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval)); + // The min-interval should have elapsed for urgen subscription, and our handler should still + // not be dirty or reportable. + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) < + System::SystemClock().GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); - NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsReportableNow()); + NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsReportable()); // And the non-urgent one should not have changed state either, since // it's waiting for the max-interval. NL_TEST_ASSERT(apSuite, - !nonUrgentDelegate.mpReadHandler->mFlags.Has(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval)); + reportScheduler->GetMinTimestampForHandler(nonUrgentDelegate.mpReadHandler) < + System::SystemClock().GetMonotonicTimestamp()); + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMaxTimestampForHandler(nonUrgentDelegate.mpReadHandler) > + System::SystemClock().GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); - NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsReportableNow()); + NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsReportable()); // There should be no reporting run scheduled. This is very important; // otherwise we can get a false-positive pass below because the run was @@ -1830,11 +1865,12 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite // Urgent read handler should now be dirty, and reportable. NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->IsDirty()); - NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->IsReportableNow()); + NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->IsReportable()); + NL_TEST_ASSERT(apSuite, reportScheduler->IsReadHandlerReportable(delegate.mpReadHandler)); // Non-urgent read handler should not be reportable. NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); - NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsReportableNow()); + NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsReportable()); // Still no reporting should have happened. NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1870,8 +1906,9 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap GenerateEvents(apSuite, apContext); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1917,7 +1954,7 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a concrete path dirty { - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -1931,6 +1968,9 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); // We subscribed wildcard path twice, so we will receive two reports here. NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); @@ -1938,7 +1978,7 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a endpoint dirty { - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; @@ -1960,6 +2000,9 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); } while (last != delegate.mNumAttributeResponse); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); // Mock endpoint3 has 13 attributes in total, and we subscribed twice. // And attribute 3/2/4 is a list with 6 elements and list chunking @@ -1991,8 +2034,9 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2030,7 +2074,7 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi // Set a partial overlapped path dirty { - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2043,6 +2087,9 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2067,8 +2114,9 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2107,7 +2155,7 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit // Set a full overlapped path dirty and expect to receive one E2C3A1 { - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2117,6 +2165,9 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2141,7 +2192,9 @@ void TestReadInteraction::TestSubscribeEarlyShutdown(nlTestSuite * apSuite, void // Initialize Interaction Model Engine NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); - NL_TEST_ASSERT(apSuite, engine.Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(apSuite, + engine.Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()) == + CHIP_NO_ERROR); // Subscribe to the attribute AttributePathParams attributePathParams; @@ -2194,8 +2247,9 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite GenerateEvents(apSuite, apContext); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2228,8 +2282,11 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); delegate.mpReadHandler = engine->ActiveHandlerAt(0); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMaxInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had + // elapsed as simulated above + reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); ctx.DrainAndServiceIO(); @@ -2293,7 +2350,7 @@ void TestReadInteraction::TestSubscribeInvalidInterval(nlTestSuite * apSuite, vo MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2337,8 +2394,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2404,7 +2462,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu dirtyPath2.mAttributeId = 2; // Test report with 2 different path - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2415,11 +2473,14 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu ctx.DrainAndServiceIO(); + NL_TEST_ASSERT( + apSuite, + !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMaxInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; ctx.ExpireSessionBobToAlice(); @@ -2459,7 +2520,7 @@ void TestReadInteraction::TestSubscribeRoundtripStatusReportTimeout(nlTestSuite MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2537,7 +2598,7 @@ void TestReadInteraction::TestReadChunkingStatusReportTimeout(nlTestSuite * apSu MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2591,7 +2652,7 @@ void TestReadInteraction::TestReadReportFailure(nlTestSuite * apSuite, void * ap MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2639,7 +2700,7 @@ void TestReadInteraction::TestSubscribeRoundtripChunkStatusReportTimeout(nlTestS MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2709,8 +2770,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2766,8 +2828,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMaxInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -2811,8 +2873,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2868,8 +2931,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); - delegate.mpReadHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMaxInterval, false); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -2913,7 +2976,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -3067,7 +3130,7 @@ void TestReadInteraction::TestReadClientReceiveInvalidMessage(nlTestSuite * apSu MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3153,7 +3216,7 @@ void TestReadInteraction::TestSubscribeClientReceiveInvalidStatusResponse(nlTest MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3246,7 +3309,7 @@ void TestReadInteraction::TestSubscribeClientReceiveWellFormedStatusResponse(nlT MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3338,7 +3401,7 @@ void TestReadInteraction::TestSubscribeClientReceiveInvalidReportMessage(nlTestS MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3430,7 +3493,7 @@ void TestReadInteraction::TestSubscribeClientReceiveUnsolicitedInvalidReportMess MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3502,7 +3565,7 @@ void TestReadInteraction::TestSubscribeClientReceiveInvalidSubscribeResponseMess MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3596,7 +3659,7 @@ void TestReadInteraction::TestSubscribeClientReceiveUnsolicitedReportMessageWith MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3675,7 +3738,7 @@ void TestReadInteraction::TestReadChunkingInvalidSubscriptionId(nlTestSuite * ap MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -3766,7 +3829,7 @@ void TestReadInteraction::TestReadHandlerMalformedSubscribeRequest(nlTestSuite * MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3811,7 +3874,7 @@ void TestReadInteraction::TestReadHandlerMalformedReadRequest1(nlTestSuite * apS MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3856,7 +3919,7 @@ void TestReadInteraction::TestReadHandlerMalformedReadRequest2(nlTestSuite * apS MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -3903,7 +3966,7 @@ void TestReadInteraction::TestSubscribeSendUnknownMessage(nlTestSuite * apSuite, MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); chip::app::AttributePathParams attributePathParams[1]; @@ -3979,7 +4042,7 @@ void TestReadInteraction::TestSubscribeSendInvalidStatusReport(nlTestSuite * apS MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); chip::app::AttributePathParams attributePathParams[1]; @@ -4054,7 +4117,7 @@ void TestReadInteraction::TestReadHandlerInvalidSubscribeRequest(nlTestSuite * a MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -4100,7 +4163,7 @@ void TestReadInteraction::TestSubscribeInvalidateFabric(nlTestSuite * apSuite, v MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -4159,7 +4222,7 @@ void TestReadInteraction::TestShutdownSubscription(nlTestSuite * apSuite, void * MockInteractionModelApp delegate; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); @@ -4211,8 +4274,9 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); MockInteractionModelApp delegate; - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); AttributePathParams subscribePath(Test::kMockEndpoint3, Test::MockClusterId(2), Test::MockAttributeId(1)); @@ -4249,13 +4313,14 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * NL_TEST_ASSERT(apSuite, SessionHandle(*readHandler->GetSession()) == ctx.GetSessionAliceToBob()); // Test that we send reports as needed. - readHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); ctx.DrainAndServiceIO(); - + NL_TEST_ASSERT(apSuite, + !reportScheduler->CheckFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); @@ -4265,7 +4330,7 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * // Test that if the session is defunct we don't send reports and clean // up properly. readHandler->GetSession()->MarkAsDefunct(); - readHandler->SetStateFlag(ReadHandler::ReadHandlerFlags::WaitingUntilMinInterval, false); + reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); diff --git a/src/app/tests/TestReportScheduler.cpp b/src/app/tests/TestReportScheduler.cpp index c789865bcc50b2..9d19f85636e15e 100644 --- a/src/app/tests/TestReportScheduler.cpp +++ b/src/app/tests/TestReportScheduler.cpp @@ -138,16 +138,16 @@ class TestTimerDelegate : public ReportScheduler::TimerDelegate // Normaly we would call the callback here, thus scheduling an engine run, but we don't need it for this test as we simulate // all the callbacks related to report emissions. The actual callback should look like this: // - // ReadHandlerNode * node = static_cast(aAppState); - // node->RunCallback(); + TimerContext * context = static_cast(aAppState); + context->TimerFired(); ChipLogProgress(DataManagement, "Simluating engine run for Handler: %p", aAppState); } - virtual CHIP_ERROR StartTimer(void * context, System::Clock::Timeout aTimeout) override + virtual CHIP_ERROR StartTimer(TimerContext * context, System::Clock::Timeout aTimeout) override { return insertPair(static_cast(context), aTimeout + mMockSystemTimestamp); } - virtual void CancelTimer(void * context) override { removePair(static_cast(context)); } - virtual bool IsTimerActive(void * context) override + virtual void CancelTimer(TimerContext * context) override { removePair(static_cast(context)); } + virtual bool IsTimerActive(TimerContext * context) override { size_t position; NodeTimeoutPair * pair = FindPair(static_cast(context), position); @@ -184,30 +184,29 @@ class TestTimerSynchronizedDelegate : public ReportScheduler::TimerDelegate public: static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) { - SynchronizedReportSchedulerImpl * scheduler = static_cast(aAppState); - scheduler->ReportTimerCallback(); + TimerContext * context = static_cast(aAppState); + context->TimerFired(); } - virtual CHIP_ERROR StartTimer(void * context, System::Clock::Timeout aTimeout) override + virtual CHIP_ERROR StartTimer(TimerContext * context, System::Clock::Timeout aTimeout) override { - SynchronizedReportSchedulerImpl * scheduler = static_cast(context); - if (nullptr == scheduler) + if (nullptr == context) { return CHIP_ERROR_INCORRECT_STATE; } - mSyncScheduler = scheduler; - mTimerTimeout = mMockSystemTimestamp + aTimeout; + mTimerContext = context; + mTimerTimeout = mMockSystemTimestamp + aTimeout; return CHIP_NO_ERROR; } - virtual void CancelTimer(void * context) override + virtual void CancelTimer(TimerContext * context) override { - VerifyOrReturn(nullptr != mSyncScheduler); - mSyncScheduler = nullptr; - mTimerTimeout = System::Clock::Milliseconds64(0x7FFFFFFFFFFFFFFF); + VerifyOrReturn(nullptr != mTimerContext); + mTimerContext = nullptr; + mTimerTimeout = System::Clock::Milliseconds64(0x7FFFFFFFFFFFFFFF); } - virtual bool IsTimerActive(void * context) override + virtual bool IsTimerActive(TimerContext * context) override { - return (nullptr != mSyncScheduler) && (mTimerTimeout > mMockSystemTimestamp); + return (nullptr != mTimerContext) && (mTimerTimeout > mMockSystemTimestamp); } virtual System::Clock::Timestamp GetCurrentMonotonicTimestamp() override { return mMockSystemTimestamp; } @@ -223,7 +222,7 @@ class TestTimerSynchronizedDelegate : public ReportScheduler::TimerDelegate mMockSystemTimestamp++; if (mMockSystemTimestamp == mTimerTimeout) { - TimerCallbackInterface(nullptr, mSyncScheduler); + TimerCallbackInterface(nullptr, mTimerContext); } } @@ -231,14 +230,14 @@ class TestTimerSynchronizedDelegate : public ReportScheduler::TimerDelegate { if (mMockSystemTimestamp == mTimerTimeout) { - TimerCallbackInterface(nullptr, mSyncScheduler); + TimerCallbackInterface(nullptr, mTimerContext); } } } - SynchronizedReportSchedulerImpl * mSyncScheduler = nullptr; - System::Clock::Timeout mTimerTimeout = System::Clock::Milliseconds64(0x7FFFFFFFFFFFFFFF); - System::Clock::Timestamp mMockSystemTimestamp = System::Clock::Milliseconds64(0); + TimerContext * mTimerContext = nullptr; + System::Clock::Timeout mTimerTimeout = System::Clock::Milliseconds64(0x7FFFFFFFFFFFFFFF); + System::Clock::Timestamp mMockSystemTimestamp = System::Clock::Milliseconds64(0); }; TestTimerDelegate sTestTimerDelegate; @@ -250,6 +249,25 @@ SynchronizedReportSchedulerImpl syncScheduler(&sTestTimerSynchronizedDelegate); class TestReportScheduler { public: + static ReadHandler * GetReadHandlerFromPool(ReportScheduler * scheduler, uint32_t target) + { + uint32_t i = 0; + ReadHandler * ret = nullptr; + + scheduler->mNodesPool.ForEachActiveObject([target, &i, &ret](ReadHandlerNode * node) { + if (i == target) + { + ret = node->GetReadHandler(); + return Loop::Break; + } + + i++; + return Loop::Continue; + }); + + return ret; + } + static void TestReadHandlerList(nlTestSuite * aSuite, void * aContext) { TestContext & ctx = *static_cast(aContext); @@ -266,11 +284,9 @@ class TestReportScheduler for (size_t i = 0; i < kNumMaxReadHandlers; i++) { ReadHandler * readHandler = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); NL_TEST_ASSERT(aSuite, nullptr != readHandler); VerifyOrReturn(nullptr != readHandler); - // Register ReadHandler using callback method - sScheduler.OnReadHandlerCreated(readHandler); NL_TEST_ASSERT(aSuite, nullptr != sScheduler.FindReadHandlerNode(readHandler)); } @@ -279,26 +295,26 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 1); // Test unregister first ReadHandler - ReadHandler * firstReadHandler = sScheduler.mReadHandlerList.begin()->GetReadHandler(); + uint32_t target = 0; + ReadHandler * firstReadHandler = GetReadHandlerFromPool(&sScheduler, target); + + NL_TEST_ASSERT(aSuite, nullptr != firstReadHandler); sScheduler.OnReadHandlerDestroyed(firstReadHandler); NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers - 1); NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(firstReadHandler)); // Test unregister middle ReadHandler - auto iter = sScheduler.mReadHandlerList.begin(); - for (size_t i = 0; i < static_cast(kNumMaxReadHandlers / 2); i++) - { - iter++; - } - ReadHandler * middleReadHandler = iter->GetReadHandler(); + target = static_cast(sScheduler.GetNumReadHandlers() / 2); + ReadHandler * middleReadHandler = GetReadHandlerFromPool(&sScheduler, target); + + NL_TEST_ASSERT(aSuite, nullptr != middleReadHandler); sScheduler.OnReadHandlerDestroyed(middleReadHandler); NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers - 2); NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(middleReadHandler)); // Test unregister last ReadHandler - iter = sScheduler.mReadHandlerList.end(); - iter--; - ReadHandler * lastReadHandler = iter->GetReadHandler(); + target = static_cast(sScheduler.GetNumReadHandlers() - 1); + ReadHandler * lastReadHandler = GetReadHandlerFromPool(&sScheduler, target); sScheduler.OnReadHandlerDestroyed(lastReadHandler); NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers - 3); NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(lastReadHandler)); @@ -330,32 +346,34 @@ class TestReportScheduler sTestTimerDelegate.SetMockSystemTimestamp(Milliseconds64(0)); // Dirty read handler, will be triggered at min interval + // Test OnReadHandler created ReadHandler * readHandler1 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMaxReportingInterval(2)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMinReportingIntervalForTests(1)); - // Do those manually to avoid scheduling an engine run - readHandler1->mState = ReadHandler::HandlerState::GeneratingReports; - sScheduler.OnReadHandlerCreated(readHandler1); + ReadHandlerNode * node = sScheduler.FindReadHandlerNode(readHandler1); + node->SetIntervalTimeStamps(readHandler1); + readHandler1->MoveToState(ReadHandler::HandlerState::GeneratingReports); readHandler1->ForceDirtyState(); // Clean read handler, will be triggered at max interval ReadHandler * readHandler2 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler2->SetMaxReportingInterval(3)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler2->SetMinReportingIntervalForTests(0)); - // Do those manually to avoid scheduling an engine run - readHandler2->mState = ReadHandler::HandlerState::GeneratingReports; - sScheduler.OnReadHandlerCreated(readHandler2); + node = sScheduler.FindReadHandlerNode(readHandler2); + node->SetIntervalTimeStamps(readHandler2); + readHandler2->MoveToState(ReadHandler::HandlerState::GeneratingReports); // Clean read handler, will be triggered at max interval, but will be cancelled before ReadHandler * readHandler3 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler3->SetMaxReportingInterval(3)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler3->SetMinReportingIntervalForTests(0)); - // Do those manually to avoid scheduling an engine run - readHandler3->mState = ReadHandler::HandlerState::GeneratingReports; - sScheduler.OnReadHandlerCreated(readHandler3); + node = sScheduler.FindReadHandlerNode(readHandler3); + node->SetIntervalTimeStamps(readHandler3); + readHandler3->MoveToState(ReadHandler::HandlerState::GeneratingReports); // Confirms that none of the ReadHandlers are currently reportable NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler1)); @@ -384,6 +402,10 @@ class TestReportScheduler // and it is in generating report state NL_TEST_ASSERT(aSuite, sScheduler.IsReportableNow(readHandler3)); + // Clear dirty flag on readHandler1 and confirm it is still reportable by time + readHandler1->ClearForceDirtyFlag(); + NL_TEST_ASSERT(aSuite, sScheduler.IsReportableNow(readHandler1)); + sScheduler.UnregisterAllHandlers(); readHandlerPool.ReleaseAll(); exchangeCtx->Close(); @@ -404,26 +426,31 @@ class TestReportScheduler sTestTimerDelegate.SetMockSystemTimestamp(Milliseconds64(0)); ReadHandler * readHandler = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler->SetMaxReportingInterval(2)); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler->SetMinReportingIntervalForTests(1)); - // Do those manually to avoid scheduling an engine run - readHandler->mState = ReadHandler::HandlerState::GeneratingReports; - readHandler->SetObserver(&sScheduler); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); + // Test OnReadHandler created registered the ReadHandler in the scheduler + NL_TEST_ASSERT(aSuite, nullptr != sScheduler.FindReadHandlerNode(readHandler)); - // Test OnReadHandlerCreated - readHandler->mObserver->OnReadHandlerCreated(readHandler); // Should have registered the read handler in the scheduler and scheduled a report NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == 1); - NL_TEST_ASSERT(aSuite, sScheduler.IsReportScheduled(readHandler)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler->SetMaxReportingInterval(2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler->SetMinReportingIntervalForTests(1)); ReadHandlerNode * node = sScheduler.FindReadHandlerNode(readHandler); + node->SetIntervalTimeStamps(readHandler); + + // Test OnReportingIntervalsChanged modified the intervals and re-scheduled a report + NL_TEST_ASSERT(aSuite, node->GetMinTimestamp().count() == 1000); + NL_TEST_ASSERT(aSuite, node->GetMaxTimestamp().count() == 2000); + + // Do those manually to avoid scheduling an engine run + readHandler->MoveToState(ReadHandler::HandlerState::GeneratingReports); + NL_TEST_ASSERT(aSuite, sScheduler.IsReportScheduled(readHandler)); + NL_TEST_ASSERT(aSuite, nullptr != node); VerifyOrReturn(nullptr != node); NL_TEST_ASSERT(aSuite, node->GetReadHandler() == readHandler); // Test OnBecameReportable readHandler->ForceDirtyState(); - readHandler->mObserver->OnBecameReportable(readHandler); // Should have changed the scheduled timeout to the handler's min interval, to check, we wait for the min interval to // expire // Simulate system clock increment @@ -457,7 +484,6 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == 0); NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(readHandler)); - sScheduler.OnReadHandlerDestroyed(readHandler); readHandlerPool.ReleaseAll(); exchangeCtx->Close(); NL_TEST_ASSERT(aSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); @@ -474,31 +500,28 @@ class TestReportScheduler // Read handler pool ObjectPool readHandlerPool; - // Initilaize the mock system time + // Initialize the mock system time sTestTimerSynchronizedDelegate.SetMockSystemTimestamp(System::Clock::Milliseconds64(0)); ReadHandler * readHandler1 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMaxReportingInterval(2)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMinReportingIntervalForTests(0)); + ReadHandlerNode * node1 = syncScheduler.FindReadHandlerNode(readHandler1); + node1->SetIntervalTimeStamps(readHandler1); readHandler1->MoveToState(ReadHandler::HandlerState::GeneratingReports); - readHandler1->SetObserver(&syncScheduler); - readHandler1->mObserver->OnReadHandlerCreated(readHandler1); ReadHandler * readHandler2 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler2->SetMaxReportingInterval(3)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler2->SetMinReportingIntervalForTests(1)); + ReadHandlerNode * node2 = syncScheduler.FindReadHandlerNode(readHandler2); + node2->SetIntervalTimeStamps(readHandler2); readHandler2->MoveToState(ReadHandler::HandlerState::GeneratingReports); - readHandler2->SetObserver(&syncScheduler); - readHandler2->mObserver->OnReadHandlerCreated(readHandler2); // Confirm all handler are currently registered in the scheduler NL_TEST_ASSERT(aSuite, syncScheduler.GetNumReadHandlers() == 2); - ReadHandlerNode * node1 = syncScheduler.FindReadHandlerNode(readHandler1); - ReadHandlerNode * node2 = syncScheduler.FindReadHandlerNode(readHandler2); - // Confirm that a report emission is scheduled NL_TEST_ASSERT(aSuite, syncScheduler.IsReportScheduled()); @@ -532,24 +555,17 @@ class TestReportScheduler // Confirm behavior when a read handler becomes dirty readHandler2->ForceDirtyState(); + // OnBecomeReportable should have been called on ForceDirtyState because readHandler callbacks are now integrated NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); // Simulate wait enough for min timestamp of readHandler2 to be reached (1s) sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(1000)); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler2)); - NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); - readHandler2->mObserver->OnBecameReportable(readHandler2); + NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); // confirm report scheduled now - NL_TEST_ASSERT(aSuite, - syncScheduler.mTestNextReportTimestamp == sTestTimerSynchronizedDelegate.GetCurrentMonotonicTimestamp()); - // Increment the timestamp by 0 here to trigger an engine run as the mock timer is only calling the timeout callback if we - // increment the mock timestamp - sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(0)); - - // since the min interval on readHandler1 is 0, it should also be reportable now by sync mechanism - NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); + NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node2->GetMinTimestamp()); NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node2->GetMinTimestamp()); // Confirm that the next report emission is scheduled on the min timestamp of readHandler2 as it is the highest reportable @@ -569,16 +585,13 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, node1->GetMaxTimestamp() > sTestTimerSynchronizedDelegate.GetCurrentMonotonicTimestamp()); NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMaxTimestamp()); - // Simulate readHandler1 becoming dirty after less than 1 seconds + // Simulate readHandler1 becoming dirty after less than 1 seconds, since it is reportable now, this will Schedule an Engin + // run immediately sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(900)); readHandler1->ForceDirtyState(); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); - readHandler1->mObserver->OnBecameReportable(readHandler1); - // Validate next report scheduled on the min timestamp of readHandler1 (readHandler 2 is not currently reportable) - NL_TEST_ASSERT(aSuite, - syncScheduler.mTestNextReportTimestamp == sTestTimerSynchronizedDelegate.GetCurrentMonotonicTimestamp()); // Simulate a report emission for readHandler1 readHandler1->ClearForceDirtyFlag(); readHandler1->mObserver->OnSubscriptionAction(readHandler1); @@ -604,16 +617,15 @@ class TestReportScheduler sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(1000)); ReadHandler * readHandler3 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler3->SetMaxReportingInterval(3)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler3->SetMinReportingIntervalForTests(2)); + ReadHandlerNode * node3 = syncScheduler.FindReadHandlerNode(readHandler3); + node3->SetIntervalTimeStamps(readHandler3); readHandler3->MoveToState(ReadHandler::HandlerState::GeneratingReports); - readHandler3->SetObserver(&syncScheduler); - readHandler3->mObserver->OnReadHandlerCreated(readHandler3); // Confirm all handler are currently registered in the scheduler NL_TEST_ASSERT(aSuite, syncScheduler.GetNumReadHandlers() == 3); - ReadHandlerNode * node3 = syncScheduler.FindReadHandlerNode(readHandler3); // Since the min interval on readHandler3 is 2, it should be above the current max timestamp, therefore the next report // should still happen on the max timestamp of readHandler1 and the sync should be done on future reports @@ -662,16 +674,15 @@ class TestReportScheduler // Now simulate a new readHandler being added with a max forcing a conflict ReadHandler * readHandler4 = - readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler4->SetMaxReportingInterval(1)); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler4->SetMinReportingIntervalForTests(0)); + ReadHandlerNode * node4 = syncScheduler.FindReadHandlerNode(readHandler4); + node4->SetIntervalTimeStamps(readHandler4); readHandler4->MoveToState(ReadHandler::HandlerState::GeneratingReports); - readHandler4->SetObserver(&syncScheduler); - readHandler4->mObserver->OnReadHandlerCreated(readHandler4); // Confirm all handler are currently registered in the scheduler NL_TEST_ASSERT(aSuite, syncScheduler.GetNumReadHandlers() == 4); - ReadHandlerNode * node4 = syncScheduler.FindReadHandlerNode(readHandler4); // Confirm next report is scheduled on the max timestamp of readHandler4 and other handlers 1 and 2 are synced NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node4->GetMaxTimestamp()); @@ -752,8 +763,8 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMinReportingIntervalForTests(0)); readHandler1->MoveToState(ReadHandler::HandlerState::GeneratingReports); syncScheduler.OnReadHandlerCreated(readHandler1); + // Forcing the dirty flag to make the scheduler call Engine::ScheduleRun() immediately readHandler1->ForceDirtyState(); - syncScheduler.OnBecameReportable(readHandler1); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); readHandler2->MoveToState(ReadHandler::HandlerState::Idle); @@ -762,14 +773,11 @@ class TestReportScheduler readHandler2->MoveToState(ReadHandler::HandlerState::GeneratingReports); syncScheduler.OnReadHandlerCreated(readHandler2); readHandler2->ForceDirtyState(); - syncScheduler.OnBecameReportable(readHandler2); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); node1 = syncScheduler.FindReadHandlerNode(readHandler1); node2 = syncScheduler.FindReadHandlerNode(readHandler2); - // Verify report is scheduled immediately as readHandler1 is dirty and its min == 0 - NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMinTimestamp()); readHandler1->ClearForceDirtyFlag(); // report got emited so clear dirty flag syncScheduler.OnSubscriptionAction(readHandler1); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); diff --git a/src/app/tests/TestReportingEngine.cpp b/src/app/tests/TestReportingEngine.cpp index 6921ea66d711b0..ddf793ec8880ae 100644 --- a/src/app/tests/TestReportingEngine.cpp +++ b/src/app/tests/TestReportingEngine.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -130,7 +131,8 @@ void TestReportingEngine::TestBuildAndSendSingleReportData(nlTestSuite * apSuite ReadRequestMessage::Builder readRequestBuilder; DummyDelegate dummy; - err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); TestExchangeDelegate delegate; Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(&delegate); @@ -156,7 +158,8 @@ void TestReportingEngine::TestBuildAndSendSingleReportData(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); err = writer.Finalize(&readRequestbuf); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - app::ReadHandler readHandler(dummy, exchangeCtx, chip::app::ReadHandler::InteractionType::Read); + app::ReadHandler readHandler(dummy, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); readHandler.OnInitialRequest(std::move(readRequestbuf)); err = InteractionModelEngine::GetInstance()->GetReportingEngine().BuildAndSendSingleReportData(&readHandler); @@ -169,7 +172,8 @@ void TestReportingEngine::TestMergeOverlappedAttributePath(nlTestSuite * apSuite { TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; - err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); AttributePathParams * clusterInfo = InteractionModelEngine::GetInstance()->GetReportingEngine().mGlobalDirtySet.CreateObject(); @@ -240,7 +244,8 @@ void TestReportingEngine::TestMergeAttributePathWhenDirtySetPoolExhausted(nlTest { TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; - err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); InteractionModelEngine::GetInstance()->GetReportingEngine().mGlobalDirtySet.ReleaseAll(); diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 95cb83eaf21d65..a8f5d27979c152 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -366,7 +367,7 @@ void TestWriteInteraction::TestWriteRoundtripWithClusterObjects(nlTestSuite * ap TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -434,7 +435,7 @@ void TestWriteInteraction::TestWriteRoundtripWithClusterObjectsVersionMatch(nlTe TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -483,7 +484,7 @@ void TestWriteInteraction::TestWriteRoundtripWithClusterObjectsVersionMismatch(n TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -534,7 +535,7 @@ void TestWriteInteraction::TestWriteRoundtrip(nlTestSuite * apSuite, void * apCo TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -575,7 +576,7 @@ void TestWriteInteraction::TestWriteHandlerReceiveInvalidMessage(nlTestSuite * a TestWriteClientCallback writeCallback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), @@ -643,7 +644,7 @@ void TestWriteInteraction::TestWriteHandlerInvalidateFabric(nlTestSuite * apSuit TestWriteClientCallback writeCallback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), @@ -725,7 +726,7 @@ void TestWriteInteraction::TestWriteInvalidMessage1(nlTestSuite * apSuite, void TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -796,7 +797,7 @@ void TestWriteInteraction::TestWriteInvalidMessage2(nlTestSuite * apSuite, void TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -866,7 +867,7 @@ void TestWriteInteraction::TestWriteInvalidMessage3(nlTestSuite * apSuite, void TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); @@ -937,7 +938,7 @@ void TestWriteInteraction::TestWriteInvalidMessage4(nlTestSuite * apSuite, void TestWriteClientCallback callback; auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); diff --git a/src/app/tests/integration/BUILD.gn b/src/app/tests/integration/BUILD.gn index 05e06d897ca690..0381691b43ffbd 100644 --- a/src/app/tests/integration/BUILD.gn +++ b/src/app/tests/integration/BUILD.gn @@ -21,6 +21,7 @@ assert(chip_build_tools) executable("chip-im-initiator") { sources = [ + "${chip_root}/src/app/reporting/tests/MockReportScheduler.cpp", "RequiredPrivilegeStubs.cpp", "chip_im_initiator.cpp", "common.cpp", @@ -41,6 +42,7 @@ executable("chip-im-initiator") { executable("chip-im-responder") { sources = [ + "${chip_root}/src/app/reporting/tests/MockReportScheduler.cpp", "MockEvents.cpp", "RequiredPrivilegeStubs.cpp", "chip_im_responder.cpp", diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index 24ed65a26869f9..1353e211c0ac36 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -731,7 +732,8 @@ int main(int argc, char * argv[]) err = gMessageCounterManager.Init(&gExchangeManager); SuccessOrExit(err); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&gExchangeManager, &gFabricTable); + err = chip::app::InteractionModelEngine::GetInstance()->Init(&gExchangeManager, &gFabricTable, + chip::app::reporting::GetDefaultReportScheduler()); SuccessOrExit(err); // Start the CHIP connection to the CHIP im responder. diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index f7b003754da86a..b090425bebf093 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -214,7 +215,8 @@ int main(int argc, char * argv[]) err = gMessageCounterManager.Init(&gExchangeManager); SuccessOrExit(err); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&gExchangeManager, &gFabricTable); + err = chip::app::InteractionModelEngine::GetInstance()->Init(&gExchangeManager, &gFabricTable, + chip::app::reporting::GetDefaultReportScheduler()); SuccessOrExit(err); err = InitializeEventLogging(&gExchangeManager); diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index d2edbd840894dc..f39a3c7a65ed0e 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include #include #include #include @@ -170,6 +172,8 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) stateParams.exchangeMgr = chip::Platform::New(); stateParams.messageCounterManager = chip::Platform::New(); stateParams.groupDataProvider = params.groupDataProvider; + stateParams.timerDelegate = chip::Platform::New(); + stateParams.reportScheduler = chip::Platform::New(stateParams.timerDelegate); stateParams.sessionKeystore = params.sessionKeystore; // if no fabricTable was provided, create one and track it in stateParams for cleanup @@ -270,8 +274,8 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) stateParams.caseSessionManager = Platform::New(); ReturnErrorOnFailure(stateParams.caseSessionManager->Init(stateParams.systemLayer, sessionManagerConfig)); - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(stateParams.exchangeMgr, stateParams.fabricTable, - stateParams.caseSessionManager)); + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init( + stateParams.exchangeMgr, stateParams.fabricTable, stateParams.reportScheduler, stateParams.caseSessionManager)); // store the system state mSystemState = chip::Platform::New(std::move(stateParams)); @@ -487,6 +491,18 @@ void DeviceControllerSystemState::Shutdown() mSessionMgr = nullptr; } + if (mReportScheduler != nullptr) + { + chip::Platform::Delete(mReportScheduler); + mReportScheduler = nullptr; + } + + if (mTimerDelegate != nullptr) + { + chip::Platform::Delete(mTimerDelegate); + mTimerDelegate = nullptr; + } + if (mTempFabricTable != nullptr) { mTempFabricTable->Shutdown(); diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index 11f84e6a42c58b..f807f39e1fd570 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -114,6 +114,7 @@ struct FactoryInitParams PersistentStorageDelegate * fabricIndependentStorage = nullptr; Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; Credentials::GroupDataProvider * groupDataProvider = nullptr; + app::reporting::ReportScheduler::TimerDelegate * timerDelegate = nullptr; Crypto::SessionKeystore * sessionKeystore = nullptr; Inet::EndPointManager * tcpEndPointManager = nullptr; Inet::EndPointManager * udpEndPointManager = nullptr; diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index e191411d0016fa..37f85b1cd90784 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -98,6 +99,8 @@ struct DeviceControllerSystemStateParams SessionSetupPool * sessionSetupPool = nullptr; CASEClientPool * caseClientPool = nullptr; FabricTable::Delegate * fabricTableDelegate = nullptr; + chip::app::reporting::ReportScheduler::TimerDelegate * timerDelegate = nullptr; + chip::app::reporting::ReportScheduler * reportScheduler = nullptr; }; // A representation of the internal state maintained by the DeviceControllerFactory. @@ -127,9 +130,9 @@ class DeviceControllerSystemState mUnsolicitedStatusHandler(params.unsolicitedStatusHandler), mExchangeMgr(params.exchangeMgr), mMessageCounterManager(params.messageCounterManager), mFabrics(params.fabricTable), mCASEServer(params.caseServer), mCASESessionManager(params.caseSessionManager), mSessionSetupPool(params.sessionSetupPool), - mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider), - mSessionKeystore(params.sessionKeystore), mFabricTableDelegate(params.fabricTableDelegate), - mSessionResumptionStorage(std::move(params.sessionResumptionStorage)) + mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider), mTimerDelegate(params.timerDelegate), + mReportScheduler(params.reportScheduler), mSessionKeystore(params.sessionKeystore), + mFabricTableDelegate(params.fabricTableDelegate), mSessionResumptionStorage(std::move(params.sessionResumptionStorage)) { #if CONFIG_NETWORK_LAYER_BLE mBleLayer = params.bleLayer; @@ -168,7 +171,8 @@ class DeviceControllerSystemState return mSystemLayer != nullptr && mUDPEndPointManager != nullptr && mTransportMgr != nullptr && mSessionMgr != nullptr && mUnsolicitedStatusHandler != nullptr && mExchangeMgr != nullptr && mMessageCounterManager != nullptr && mFabrics != nullptr && mCASESessionManager != nullptr && mSessionSetupPool != nullptr && mCASEClientPool != nullptr && - mGroupDataProvider != nullptr && mSessionKeystore != nullptr; + mGroupDataProvider != nullptr && mReportScheduler != nullptr && mTimerDelegate != nullptr && + mSessionKeystore != nullptr; }; System::Layer * SystemLayer() const { return mSystemLayer; }; @@ -184,6 +188,8 @@ class DeviceControllerSystemState #endif CASESessionManager * CASESessionMgr() const { return mCASESessionManager; } Credentials::GroupDataProvider * GetGroupDataProvider() const { return mGroupDataProvider; } + chip::app::reporting::ReportScheduler * GetReportScheduler() const { return mReportScheduler; } + Crypto::SessionKeystore * GetSessionKeystore() const { return mSessionKeystore; } void SetTempFabricTable(FabricTable * tempFabricTable, bool enableServerInteractions) { @@ -211,6 +217,8 @@ class DeviceControllerSystemState SessionSetupPool * mSessionSetupPool = nullptr; CASEClientPool * mCASEClientPool = nullptr; Credentials::GroupDataProvider * mGroupDataProvider = nullptr; + app::reporting::ReportScheduler::TimerDelegate * mTimerDelegate = nullptr; + app::reporting::ReportScheduler * mReportScheduler = nullptr; Crypto::SessionKeystore * mSessionKeystore = nullptr; FabricTable::Delegate * mFabricTableDelegate = nullptr; Platform::UniquePtr mSessionResumptionStorage; diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index f83951ba3775c7..d1e6dc45cd8c7b 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1556,5 +1556,17 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #endif // CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION_MAX_RETRY_INTERVAL_SECS /** - * @} + * @def CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED + * + * @brief Controls whether the synchronized report scheduler is used. + * + * The use of the synchronous reports feature aims to reduce the number of times an ICD needs to wake up to emit reports to its + * various subscribers. + */ +#ifndef CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED +#define CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED 0 +#endif + +/** + * @} */ From 3efdd368f71ebad966f158f38384c897c53db5b4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 24 Jul 2023 21:00:13 -0400 Subject: [PATCH 022/159] Update documentation with zap supporting amd64 (#28210) * ZAP supports arm64, doc this * Fix file name --- docs/code_generation.md | 4 ---- docs/guides/BUILDING.md | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/code_generation.md b/docs/code_generation.md index 318cfedd359954..e12bf40f100cff 100644 --- a/docs/code_generation.md +++ b/docs/code_generation.md @@ -40,10 +40,6 @@ ZAP is generally installed as a third-party tool via CIPD during the build environment bootstrap (see `scripts/setup/zap.json`), which makes `zap-cli` available in `$PATH` when running in a build environment. -**NOTE**: zap packages are currently NOT available for `arm64` (like when -compiling on Raspberry PI.). In these cases one should check out zap from source -and set `$ZAP_DEVELOPMENT_PATH` as described below. - When matter scripts need to invoke `zap-cli` (for code generation) or `zap` (to start the UI tool), they make use of the following environment variables to figure out where the zap tool is located (in order of precedence): diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 26ff8d59485e13..359b35e3d6b2d4 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -169,8 +169,8 @@ The ZAP tool scripting uses the following detection, in order of importance: - Use this if you are developing ZAP locally and would like to run ZAP with your changes. -- `$ZAP_INSTALL_PATH` to point to where `zap-linux.zip` or `zap-mac.zip` was - unpacked. +- `$ZAP_INSTALL_PATH` to point to where `zap-linux-x64.zip`, + `zap-linux-arm64.zip` or `zap-mac-x64.zip` was unpacked. - This allows you to not need to place `zap` or `zap-cli` (or both) in `$PATH`. From 7b6cbc545a9bdfd4880d72c43dca7f499c5a4c22 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 25 Jul 2023 11:07:22 +0100 Subject: [PATCH 023/159] Replaced the use of std::set with IntrusiveList in ModeBase. (#28163) * Replaced the use of std::set with IntrusiveList in ModeBase. * Removed the std::set exeption for ModeBase. * Restyled by clang-format * Refoctor from review. * Added a way to gracefully shutdown the ModeBase dreived clusters and used it in the linux all-clusters-app. * Restyled by whitespace * Restyled by clang-format * Implemented required ApplicationExit(). * Restyled by clang-format * Modified the ModeBase example shutdowns to be safe if Shutdown is called twice and properly free the memory. * Renamed ApplicationExit() to ApplicationShutdown() * Apply documentation suggestions from code review Co-authored-by: Boris Zbarsky --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- .../include/dishwasher-mode.h | 2 ++ .../include/laundry-washer-mode.h | 2 ++ .../all-clusters-common/include/rvc-modes.h | 4 +++ .../all-clusters-common/include/tcc-mode.h | 2 ++ .../src/dishwasher-mode.cpp | 14 +++++++++- .../src/laundry-washer-mode.cpp | 13 ++++++++++ .../all-clusters-common/src/rvc-modes.cpp | 26 +++++++++++++++++++ .../all-clusters-common/src/tcc-mode.cpp | 13 ++++++++++ .../all-clusters-app/linux/main-common.cpp | 10 +++++-- examples/all-clusters-app/linux/main-common.h | 21 --------------- examples/all-clusters-app/linux/main.cpp | 2 -- examples/all-clusters-app/tizen/src/main.cpp | 2 ++ .../linux/main-common.cpp | 2 ++ .../tizen/src/main.cpp | 2 ++ examples/bridge-app/linux/main.cpp | 2 ++ examples/chef/linux/main.cpp | 2 ++ examples/contact-sensor-app/linux/main.cpp | 2 ++ examples/dishwasher-app/linux/main.cpp | 2 ++ examples/lighting-app/linux/main.cpp | 2 +- examples/lighting-app/tizen/src/main.cpp | 2 ++ examples/lock-app/linux/main.cpp | 2 ++ examples/ota-provider-app/linux/main.cpp | 2 ++ examples/ota-requestor-app/linux/main.cpp | 2 ++ examples/placeholder/linux/main.cpp | 2 ++ examples/platform/linux/AppMain.cpp | 2 ++ examples/platform/linux/AppMain.h | 3 +++ .../linux/src/main.cpp | 2 ++ examples/thermostat/linux/main.cpp | 2 ++ examples/tv-app/linux/main.cpp | 2 ++ scripts/tools/check_includes_config.py | 3 --- .../mode-base-server/mode-base-server.cpp | 22 ++++++++++++---- .../mode-base-server/mode-base-server.h | 21 ++++++++++++--- .../clusters/on-off-server/on-off-server.cpp | 10 +++---- 33 files changed, 158 insertions(+), 44 deletions(-) delete mode 100644 examples/all-clusters-app/linux/main-common.h diff --git a/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h b/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h index 51a5ab5d0d80d8..54d78c56b23132 100644 --- a/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h @@ -69,6 +69,8 @@ class DishwasherModeDelegate : public ModeBase::Delegate ~DishwasherModeDelegate() override = default; }; +void Shutdown(); + } // namespace DishwasherMode } // namespace Clusters diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h index 06fffda82d99b1..f8acce69295f46 100644 --- a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h @@ -74,6 +74,8 @@ class LaundryWasherModeDelegate : public ModeBase::Delegate ~LaundryWasherModeDelegate() override = default; }; +void Shutdown(); + } // namespace LaundryWasherMode } // namespace Clusters diff --git a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h index 3e2841654fb5e5..b8e7e13cf2c6ee 100644 --- a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h +++ b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h @@ -66,6 +66,8 @@ class RvcRunModeDelegate : public ModeBase::Delegate ~RvcRunModeDelegate() override = default; }; +void Shutdown(); + } // namespace RvcRunMode namespace RvcCleanMode { @@ -107,6 +109,8 @@ class RvcCleanModeDelegate : public ModeBase::Delegate ~RvcCleanModeDelegate() override = default; }; +void Shutdown(); + } // namespace RvcCleanMode } // namespace Clusters diff --git a/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h b/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h index 7294fac8cbccd8..dcd9024e8d0385 100644 --- a/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h @@ -67,6 +67,8 @@ class TccModeDelegate : public ModeBase::Delegate ~TccModeDelegate() override = default; }; +void Shutdown(); + } // namespace RefrigeratorAndTemperatureControlledCabinetMode } // namespace Clusters diff --git a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp index 845ecb6d32a8a9..c96ec297a2e2d2 100644 --- a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp @@ -76,12 +76,24 @@ CHIP_ERROR DishwasherModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List~DishwasherModeDelegate(); + } +} + void emberAfDishwasherModeClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gDishwasherModeDelegate == nullptr && gDishwasherModeInstance == nullptr); gDishwasherModeDelegate = new DishwasherMode::DishwasherModeDelegate; - // todo use Clusters::XxxMode::Feature::kXxxx to set features. gDishwasherModeInstance = new ModeBase::Instance(gDishwasherModeDelegate, 0x1, DishwasherMode::Id, chip::to_underlying(Feature::kOnOff)); gDishwasherModeInstance->Init(); diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp index 3cc44deee84878..9d05b4b58850e0 100644 --- a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp @@ -75,6 +75,19 @@ CHIP_ERROR LaundryWasherModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List return CHIP_NO_ERROR; } +void LaundryWasherMode::Shutdown() +{ + if (gLaundryWasherModeInstance != nullptr) + { + delete gLaundryWasherModeInstance; + gLaundryWasherModeInstance = nullptr; + } + if (gLaundryWasherModeDelegate != nullptr) + { + gLaundryWasherModeDelegate->~LaundryWasherModeDelegate(); + } +} + void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 36a2fd7204a77c..9a95054c26f8ab 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -88,6 +88,19 @@ CHIP_ERROR RvcRunModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List~RvcRunModeDelegate(); + } +} + void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. @@ -158,6 +171,19 @@ CHIP_ERROR RvcCleanModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List~RvcCleanModeDelegate(); + } +} + void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. diff --git a/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp index 704e5b17be22cb..30b8c03075e2ea 100644 --- a/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp @@ -75,6 +75,19 @@ CHIP_ERROR TccModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List~TccModeDelegate(); + } +} + void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 0ebeff439e9dc2..727bddb955056b 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -16,7 +16,6 @@ * limitations under the License. */ -#include "main-common.h" #include "AllClustersCommandDelegate.h" #include "WindowCoveringManager.h" #include "dishwasher-mode.h" @@ -191,8 +190,15 @@ void ApplicationInit() app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); } -void ApplicationExit() +void ApplicationShutdown() { + // These may have been initialised via the emberAfXxxClusterInitCallback methods. We need to destroy them before shutdown. + Clusters::DishwasherMode::Shutdown(); + Clusters::LaundryWasherMode::Shutdown(); + Clusters::RvcCleanMode::Shutdown(); + Clusters::RvcRunMode::Shutdown(); + Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Shutdown(); + if (sChipNamedPipeCommands.Stop() != CHIP_NO_ERROR) { ChipLogError(NotSpecified, "Failed to stop CHIP NamedPipeCommands"); diff --git a/examples/all-clusters-app/linux/main-common.h b/examples/all-clusters-app/linux/main-common.h deleted file mode 100644 index d6e076b4416798..00000000000000 --- a/examples/all-clusters-app/linux/main-common.h +++ /dev/null @@ -1,21 +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 - -void ApplicationExit(); diff --git a/examples/all-clusters-app/linux/main.cpp b/examples/all-clusters-app/linux/main.cpp index c9d829ba423e44..cd1e88c87e3108 100644 --- a/examples/all-clusters-app/linux/main.cpp +++ b/examples/all-clusters-app/linux/main.cpp @@ -19,7 +19,6 @@ #include "AppMain.h" #include "AppOptions.h" #include "binding-handler.h" -#include "main-common.h" // Network commissioning namespace { @@ -35,7 +34,6 @@ int main(int argc, char * argv[]) LinuxDeviceOptions::GetInstance().dacProvider = AppOptions::GetDACProvider(); ChipLinuxAppMainLoop(); - ApplicationExit(); return 0; } diff --git a/examples/all-clusters-app/tizen/src/main.cpp b/examples/all-clusters-app/tizen/src/main.cpp index b7e3a501df17b3..e3e8aa736846fc 100644 --- a/examples/all-clusters-app/tizen/src/main.cpp +++ b/examples/all-clusters-app/tizen/src/main.cpp @@ -51,6 +51,8 @@ void ApplicationInit() app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { TizenServiceAppMain app; diff --git a/examples/all-clusters-minimal-app/linux/main-common.cpp b/examples/all-clusters-minimal-app/linux/main-common.cpp index 698e1400b8e2b7..a6fd0a9866220e 100644 --- a/examples/all-clusters-minimal-app/linux/main-common.cpp +++ b/examples/all-clusters-minimal-app/linux/main-common.cpp @@ -84,6 +84,8 @@ static Identify gIdentify1 = { void ApplicationInit() {} +void ApplicationShutdown() {} + void emberAfLowPowerClusterInitCallback(EndpointId endpoint) { ChipLogProgress(Zcl, "TV Linux App: LowPower::SetDefaultDelegate"); diff --git a/examples/all-clusters-minimal-app/tizen/src/main.cpp b/examples/all-clusters-minimal-app/tizen/src/main.cpp index adeb8735752332..327623911831bb 100644 --- a/examples/all-clusters-minimal-app/tizen/src/main.cpp +++ b/examples/all-clusters-minimal-app/tizen/src/main.cpp @@ -47,6 +47,8 @@ void ApplicationInit() sEthernetNetworkCommissioningInstance.Init(); } +void ApplicationShutdown(){}; + int main(int argc, char * argv[]) { TizenServiceAppMain app; diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 382ff7fe456de0..32930d7133db77 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -741,6 +741,8 @@ bool emberAfActionsClusterInstantActionCallback(app::CommandHandler * commandObj void ApplicationInit() {} +void ApplicationShutdown() {} + const EmberAfDeviceType gBridgedOnOffDeviceTypes[] = { { DEVICE_TYPE_LO_ON_OFF_LIGHT, DEVICE_VERSION_DEFAULT }, { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } }; diff --git a/examples/chef/linux/main.cpp b/examples/chef/linux/main.cpp index 57e5273d5a58d2..9b15ae9cba6582 100644 --- a/examples/chef/linux/main.cpp +++ b/examples/chef/linux/main.cpp @@ -32,6 +32,8 @@ using namespace chip::app; void ApplicationInit() {} +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) diff --git a/examples/contact-sensor-app/linux/main.cpp b/examples/contact-sensor-app/linux/main.cpp index b72cd7f755ab46..fcc56d7c3d02a4 100644 --- a/examples/contact-sensor-app/linux/main.cpp +++ b/examples/contact-sensor-app/linux/main.cpp @@ -33,6 +33,8 @@ using namespace chip::app::Clusters; void ApplicationInit() {} +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); diff --git a/examples/dishwasher-app/linux/main.cpp b/examples/dishwasher-app/linux/main.cpp index 080df313425cba..54e320ffc9e14c 100644 --- a/examples/dishwasher-app/linux/main.cpp +++ b/examples/dishwasher-app/linux/main.cpp @@ -32,6 +32,8 @@ void ApplicationInit() MatterOperationalStateServerInit(); } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) diff --git a/examples/lighting-app/linux/main.cpp b/examples/lighting-app/linux/main.cpp index 5689a0cd68979c..3bd27fddc0f95a 100644 --- a/examples/lighting-app/linux/main.cpp +++ b/examples/lighting-app/linux/main.cpp @@ -85,7 +85,7 @@ void ApplicationInit() } } -void ApplicationExit() +void ApplicationShutdown() { if (sChipNamedPipeCommands.Stop() != CHIP_NO_ERROR) { diff --git a/examples/lighting-app/tizen/src/main.cpp b/examples/lighting-app/tizen/src/main.cpp index e69bc25fdc1c7a..8f0bafaec72e31 100644 --- a/examples/lighting-app/tizen/src/main.cpp +++ b/examples/lighting-app/tizen/src/main.cpp @@ -52,6 +52,8 @@ void ApplicationInit() #endif } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { TizenServiceAppMain app; diff --git a/examples/lock-app/linux/main.cpp b/examples/lock-app/linux/main.cpp index 5031fda7db3755..bf4f485758485a 100644 --- a/examples/lock-app/linux/main.cpp +++ b/examples/lock-app/linux/main.cpp @@ -43,6 +43,8 @@ void ApplicationInit() } } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); diff --git a/examples/ota-provider-app/linux/main.cpp b/examples/ota-provider-app/linux/main.cpp index 71b8630cdb2e48..15d8ecdf55feea 100644 --- a/examples/ota-provider-app/linux/main.cpp +++ b/examples/ota-provider-app/linux/main.cpp @@ -380,6 +380,8 @@ void ApplicationInit() chip::app::Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, &gOtaProvider); } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv, &cmdLineOptions) == 0); diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 355f5c2c133e87..50cf24191a5a98 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -255,6 +255,8 @@ void ApplicationInit() InitOTARequestor(); } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv, &cmdLineOptions, MakeOptional(kNetworkCommissioningEndpointSecondary)) == 0); diff --git a/examples/placeholder/linux/main.cpp b/examples/placeholder/linux/main.cpp index 610e7b65dc1ae3..11f7529e07aa03 100644 --- a/examples/placeholder/linux/main.cpp +++ b/examples/placeholder/linux/main.cpp @@ -22,6 +22,8 @@ void ApplicationInit() {} +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv, AppOptions::GetOptions()) == 0); diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index ac97e6104417b3..22ff4d2db71cb6 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -578,6 +578,8 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) } gMainLoopImplementation = nullptr; + ApplicationShutdown(); + #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE ShutdownCommissioner(); #endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE diff --git a/examples/platform/linux/AppMain.h b/examples/platform/linux/AppMain.h index 759b5da6eb4b3f..94bf4d3e609da1 100644 --- a/examples/platform/linux/AppMain.h +++ b/examples/platform/linux/AppMain.h @@ -103,3 +103,6 @@ CommissionerDiscoveryController * GetCommissionerDiscoveryController(); // For extra init calls, the function will be called right before running Matter main loop. void ApplicationInit(); + +// For extra shutdown calls, the function will be called before any of the core Matter objects are shut down. +void ApplicationShutdown(); diff --git a/examples/resource-monitoring-app/linux/src/main.cpp b/examples/resource-monitoring-app/linux/src/main.cpp index 6e515b7ea5845c..dd6e1231d6a9e2 100644 --- a/examples/resource-monitoring-app/linux/src/main.cpp +++ b/examples/resource-monitoring-app/linux/src/main.cpp @@ -48,6 +48,8 @@ void ApplicationInit() gActivatedCarbonFilterInstance.Init(); } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) diff --git a/examples/thermostat/linux/main.cpp b/examples/thermostat/linux/main.cpp index c039b4cd1902d5..77de93055e3aa0 100644 --- a/examples/thermostat/linux/main.cpp +++ b/examples/thermostat/linux/main.cpp @@ -71,6 +71,8 @@ static Identify gIdentify1 = { void ApplicationInit() {} +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index ffdd5e00bc5513..859b3f47284929 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -47,6 +47,8 @@ void ApplicationInit() // emberAfEndpointEnableDisable(3, false); } +void ApplicationShutdown() {} + int main(int argc, char * argv[]) { diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index fba3a095e74a6d..cb1f4e1062fb26 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -158,7 +158,4 @@ # Library meant for non-embedded 'src/tracing/json/json_tracing.cpp': {'string', 'sstream'}, 'src/tracing/json/json_tracing.h': {'fstream'}, - - # Temporary solution util the OnOff server can provide a callback API for state change. - 'src/app/clusters/mode-base-server/mode-base-server.h': {'set'} } diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index ac85ccb9941ec9..f4ec6a46ec7581 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -38,6 +38,19 @@ namespace app { namespace Clusters { namespace ModeBase { +void Instance::RegisterInstance() +{ + if (!gModeBaseAliasesInstances.Contains(this)) + { + gModeBaseAliasesInstances.PushBack(this); + } +} + +void Instance::UnregisterInstance() +{ + gModeBaseAliasesInstances.Remove(this); +} + bool Instance::HasFeature(Feature feature) const { return (mFeature & to_underlying(feature)) != 0; @@ -137,10 +150,9 @@ CHIP_ERROR Instance::Init() ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); + RegisterInstance(); ReturnErrorOnFailure(mDelegate->Init()); - ModeBaseAliasesInstances.insert(this); - // If the StartUpMode is set, the CurrentMode attribute SHALL be set to the StartUpMode value, when the server is powered up. if (!mStartUpMode.IsNull()) { @@ -476,14 +488,14 @@ Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClus Instance::~Instance() { - ModeBaseAliasesInstances.erase(this); + UnregisterInstance(); chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); unregisterAttributeAccessOverride(this); } -std::set * GetModeBaseInstances() +IntrusiveList & GetModeBaseInstanceList() { - return &ModeBaseAliasesInstances; + return gModeBaseAliasesInstances; } } // namespace ModeBase diff --git a/src/app/clusters/mode-base-server/mode-base-server.h b/src/app/clusters/mode-base-server/mode-base-server.h index 617fd262ba8515..3e1b77bcbf7e2a 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.h +++ b/src/app/clusters/mode-base-server/mode-base-server.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include namespace chip { namespace app { @@ -32,7 +32,7 @@ namespace ModeBase { class Delegate; -class Instance : public CommandHandlerInterface, public AttributeAccessInterface +class Instance : public CommandHandlerInterface, public AttributeAccessInterface, public IntrusiveListNodeBase<> { private: Delegate * mDelegate; @@ -55,6 +55,16 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + /** + * Register this ModeBase instance. + */ + void RegisterInstance(); + + /** + * Unregister this ModeBase instance. + */ + void UnregisterInstance(); + /** * Internal change-to-mode command handler function. */ @@ -229,9 +239,12 @@ class Delegate // A set of pointers to all initialised ModeBase instances. It provides a way to access all ModeBase derived clusters. // todo change once there is a clear public interface for the OnOff cluster data dependencies (#27508) -static std::set ModeBaseAliasesInstances; +static IntrusiveList gModeBaseAliasesInstances; -std::set * GetModeBaseInstances(); +// This does not return a refernce to const IntrusiveList, because the caller might need +// to change the state of the instances in the list and const IntrusiveList only allows +// access to const Instance. +IntrusiveList & GetModeBaseInstanceList(); } // namespace ModeBase } // namespace Clusters diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index eb1c320b800da6..440ea0a471fa30 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -60,16 +60,16 @@ namespace { */ void UpdateModeBaseCurrentModeToOnMode(EndpointId endpoint) { - for (const auto & modeBaseInstance : *ModeBase::GetModeBaseInstances()) + for (auto & modeBaseInstance : ModeBase::GetModeBaseInstanceList()) { - if (modeBaseInstance->GetEndpointId() == endpoint) + if (modeBaseInstance.GetEndpointId() == endpoint) { - if (modeBaseInstance->HasFeature(ModeBase::Feature::kOnOff)) + if (modeBaseInstance.HasFeature(ModeBase::Feature::kOnOff)) { - ModeBase::Attributes::OnMode::TypeInfo::Type onMode = modeBaseInstance->GetOnMode(); + ModeBase::Attributes::OnMode::TypeInfo::Type onMode = modeBaseInstance.GetOnMode(); if (!onMode.IsNull()) { - Status status = modeBaseInstance->UpdateCurrentMode(onMode.Value()); + Status status = modeBaseInstance.UpdateCurrentMode(onMode.Value()); if (status == Status::Success) { ChipLogProgress(Zcl, "Changed the Current Mode to %x", onMode.Value()); From f2fc1a2777a9df8b3d5f485b4657415098d56eeb Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:02:27 +0530 Subject: [PATCH 024/159] Remove unwanted "\" at line 156 from DA-1.4 test (#28252) --- src/app/tests/suites/certification/Test_TC_DA_1_4.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml index 7795144645bc41..db416d3c119f35 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml @@ -153,7 +153,7 @@ tests: verification: | "The all-cluster-app in the sample application is not a certified commissionee (Certification Declaration has certification_type 0). Launch all-cluster-app on TH raspi and provision the app using the DUT " - disabled: true\ + disabled: true - label: "Verify that DUT notifies a warning stating that Commissionee is not a From 60cf9818026191aa4976e70907a702e4baa9e83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20M=C3=B8ller?= Date: Tue, 25 Jul 2023 07:09:33 -0700 Subject: [PATCH 025/159] Remove zap development install. (#28223) `zap` is now available as arm64 binaries, and bootstrap will take care of installing it. --- .../docker/images/chip-cert-bins/Dockerfile | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 18ebd7263fc701..47d7cc0b606742 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -5,11 +5,6 @@ ARG TARGETPLATFORM # COMMITHASH defines the target commit to build from. May be passed in using --build-arg. ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb -# ZAP Development install, so that it runs on both x64 and arm64 -# Generally this should match with the ZAP version that is used for codegen within the -# specified SHA -ARG ZAP_VERSION=v2023.07.21-nightly - # Ensure TARGETPLATFORM is set RUN case ${TARGETPLATFORM} in \ "linux/amd64") \ @@ -157,45 +152,6 @@ RUN set -x \ && rm -rf bloaty \ && : # last line -# NodeJS: install a newer version than what apt-get would read -# This installs the latest LTS version of nodejs -RUN case ${TARGETPLATFORM} in \ - "linux/amd64") \ - set -x \ - && mkdir node_js \ - && cd node_js \ - && wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-x64.tar.xz \ - && tar xfvJ node-v12.22.12-linux-x64.tar.xz \ - && mv node-v12.22.12-linux-x64 /opt/ \ - && ln -s /opt/node-v12.22.12-linux-x64 /opt/node \ - && ln -s /opt/node/bin/* /usr/bin \ - && cd .. \ - && rm -rf node_js \ - ;; \ - "linux/arm64")\ - set -x \ - && mkdir node_js \ - && cd node_js \ - && wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-arm64.tar.xz \ - && tar xfvJ node-v12.22.12-linux-arm64.tar.xz \ - && mv node-v12.22.12-linux-arm64 /opt/ \ - && ln -s /opt/node-v12.22.12-linux-arm64 /opt/node \ - && ln -s /opt/node/bin/* /usr/bin \ - && cd .. \ - && rm -rf node_js \ - ;; \ - *) ;; \ - esac - -RUN set -x \ - && mkdir -p /opt/zap-${ZAP_VERSION} \ - && git clone https://github.com/project-chip/zap.git /opt/zap-${ZAP_VERSION} \ - && cd /opt/zap-${ZAP_VERSION} \ - && git checkout ${ZAP_VERSION} \ - && npm config set user 0 \ - && npm ci -ENV ZAP_DEVELOPMENT_PATH=/opt/zap-${ZAP_VERSION} - # Stage 1.5: Bootstrap Matter. RUN mkdir /root/connectedhomeip RUN git clone https://github.com/project-chip/connectedhomeip.git /root/connectedhomeip From 5b4f8004662d00bdb111367fec7d3ea978c23372 Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Tue, 25 Jul 2023 22:12:46 +0800 Subject: [PATCH 026/159] [feature]Add dishwasher-app example for ASR platform (#28207) * Add dishwasher-app example for ASR platform * Restyled by clang-format * Restyled by gn * remove unuseful macro * update document * fix CI build error * delete unuseful code * remove chip:: prefixed * Restyled by whitespace * Restyled by clang-format --------- Co-authored-by: Restyled.io --- examples/dishwasher-app/asr/.gn | 29 ++++ examples/dishwasher-app/asr/BUILD.gn | 131 ++++++++++++++++++ examples/dishwasher-app/asr/args.gni | 27 ++++ examples/dishwasher-app/asr/build_overrides | 1 + examples/dishwasher-app/asr/cfg.gni | 23 +++ .../dishwasher-app/asr/include/AppConfig.h | 45 ++++++ examples/dishwasher-app/asr/include/AppTask.h | 43 ++++++ .../asr/include/CHIPProjectConfig.h | 111 +++++++++++++++ .../asr/include/DeviceCallbacks.h | 40 ++++++ examples/dishwasher-app/asr/src/AppTask.cpp | 112 +++++++++++++++ .../asr/src/DeviceCallbacks.cpp | 122 ++++++++++++++++ examples/dishwasher-app/asr/src/main.cpp | 92 ++++++++++++ .../asr/third_party/connectedhomeip | 1 + scripts/build/build/targets.py | 1 + scripts/build/builders/asr.py | 5 + .../build/testdata/all_targets_linux_x64.txt | 2 +- 16 files changed, 784 insertions(+), 1 deletion(-) create mode 100755 examples/dishwasher-app/asr/.gn create mode 100755 examples/dishwasher-app/asr/BUILD.gn create mode 100755 examples/dishwasher-app/asr/args.gni create mode 120000 examples/dishwasher-app/asr/build_overrides create mode 100755 examples/dishwasher-app/asr/cfg.gni create mode 100644 examples/dishwasher-app/asr/include/AppConfig.h create mode 100644 examples/dishwasher-app/asr/include/AppTask.h create mode 100755 examples/dishwasher-app/asr/include/CHIPProjectConfig.h create mode 100644 examples/dishwasher-app/asr/include/DeviceCallbacks.h create mode 100644 examples/dishwasher-app/asr/src/AppTask.cpp create mode 100644 examples/dishwasher-app/asr/src/DeviceCallbacks.cpp create mode 100644 examples/dishwasher-app/asr/src/main.cpp create mode 120000 examples/dishwasher-app/asr/third_party/connectedhomeip diff --git a/examples/dishwasher-app/asr/.gn b/examples/dishwasher-app/asr/.gn new file mode 100755 index 00000000000000..8d75f1eafcdb89 --- /dev/null +++ b/examples/dishwasher-app/asr/.gn @@ -0,0 +1,29 @@ +# 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. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + + target_os = "freertos" + + import("//args.gni") +} diff --git a/examples/dishwasher-app/asr/BUILD.gn b/examples/dishwasher-app/asr/BUILD.gn new file mode 100755 index 00000000000000..2b0cc1ef7507df --- /dev/null +++ b/examples/dishwasher-app/asr/BUILD.gn @@ -0,0 +1,131 @@ +# 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. + +import("//build_overrides/asr.gni") +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("${asr_sdk_build_root}/asr_sdk.gni") +import("${build_root}/config/defaults.gni") +import("${chip_root}/src/lib/lib.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/asr/asr_executable.gni") + +import("cfg.gni") + +assert(current_os == "freertos") + +asr_project_dir = "${chip_root}/examples/dishwasher-app/asr" +examples_plat_dir = "${chip_root}/examples/platform/asr" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false +} + +asr_sdk_sources("dishwasher_app_sdk_sources") { + include_dirs = [ + "${chip_root}/src/platform/ASR", + "${asr_project_dir}/include", + "${examples_plat_dir}", + ] + + defines = [ + "ASR_LOG_ENABLED=1", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + ] + + if (chip_enable_factory_data) { + defines += [ + "CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER=1", + "CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER=1", + ] + } + + if (chip_lwip_ip6_hook) { + defines += [ + "CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT", + "CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT", + ] + } + + sources = [ "${asr_project_dir}/include/CHIPProjectConfig.h" ] + + public_configs = [ "${asr_sdk_build_root}:asr_sdk_config" ] +} + +asr_executable("dishwasher_app") { + include_dirs = [] + defines = [] + output_name = "chip-asr-dishwasher-example.out" + + sources = [ + "${chip_root}/examples/dishwasher-app/dishwasher-common/src/operational-state-delegate-impl.cpp", + "${chip_root}/examples/dishwasher-app/dishwasher-common/src/operational-state-delegates.cpp", + "${examples_plat_dir}/CHIPDeviceManager.cpp", + "${examples_plat_dir}/LEDWidget.cpp", + "${examples_plat_dir}/init_Matter.cpp", + "${examples_plat_dir}/init_asrPlatform.cpp", + "${examples_plat_dir}/shell/matter_shell.cpp", + "src/AppTask.cpp", + "src/DeviceCallbacks.cpp", + "src/main.cpp", + ] + + if (chip_enable_ota_requestor) { + sources += [ "${examples_plat_dir}/init_OTARequestor.cpp" ] + } + + deps = [ + ":dishwasher_app_sdk_sources", + "${chip_root}/examples/common/QRCode", + "${chip_root}/examples/dishwasher-app/dishwasher-common", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + ] + + include_dirs += [ + "include", + "${examples_plat_dir}", + "${asr_project_dir}/include", + "${chip_root}/src/lib", + "${chip_root}/examples/dishwasher-app/dishwasher-common/include", + ] + + defines = [ "ASR_NETWORK_LAYER_BLE=${chip_config_network_layer_ble}" ] + + if (chip_build_libshell) { + defines += [ "CONFIG_ENABLE_CHIP_SHELL=1" ] + sources += [ "${examples_plat_dir}/shell/launch_shell.cpp" ] + include_dirs += [ "${examples_plat_dir}/shell" ] + } + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + output_dir = root_out_dir +} + +group("asr") { + deps = [ ":dishwasher_app" ] +} + +group("default") { + deps = [ ":asr" ] +} diff --git a/examples/dishwasher-app/asr/args.gni b/examples/dishwasher-app/asr/args.gni new file mode 100755 index 00000000000000..b7599ea01b20dd --- /dev/null +++ b/examples/dishwasher-app/asr/args.gni @@ -0,0 +1,27 @@ +# 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. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("//cfg.gni") +import("${chip_root}/src/platform/ASR/args.gni") + +asr_target_project = + get_label_info(":dishwasher_app_sdk_sources", "label_no_toolchain") + +declare_args() { + # Disable lock tracking, since our FreeRTOS configuration does not set + # INCLUDE_xSemaphoreGetMutexHolder + chip_stack_lock_tracking = "none" +} diff --git a/examples/dishwasher-app/asr/build_overrides b/examples/dishwasher-app/asr/build_overrides new file mode 120000 index 00000000000000..194ee0b812dc3d --- /dev/null +++ b/examples/dishwasher-app/asr/build_overrides @@ -0,0 +1 @@ +../../build_overrides/ \ No newline at end of file diff --git a/examples/dishwasher-app/asr/cfg.gni b/examples/dishwasher-app/asr/cfg.gni new file mode 100755 index 00000000000000..15fe50e79efb6d --- /dev/null +++ b/examples/dishwasher-app/asr/cfg.gni @@ -0,0 +1,23 @@ +# 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. + +declare_args() { + chip_enable_factory_data = false + + chip_lwip_ip6_hook = false + + setupPinCode = 20202021 + + setupDiscriminator = 3840 +} diff --git a/examples/dishwasher-app/asr/include/AppConfig.h b/examples/dishwasher-app/asr/include/AppConfig.h new file mode 100644 index 00000000000000..d475e4c41e3f2f --- /dev/null +++ b/examples/dishwasher-app/asr/include/AppConfig.h @@ -0,0 +1,45 @@ +/* + * + * 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. + * 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 + +// ---- Dishwasher Example App Config ---- + +#if (CFG_EASY_LOG_ENABLE == 1) +#include "elog.h" +#endif + +#define APP_TASK_NAME "APP" + +#define APP_TASK_STACK_SIZE (1024 * 4) + +#define MATTER_DEVICE_NAME "Dishwasher" + +#ifdef __cplusplus +extern "C" { +#endif + +void appError(int err); +void ASR_LOG(const char * aFormat, ...); + +#ifdef __cplusplus +} + +#include +void appError(CHIP_ERROR error); +#endif diff --git a/examples/dishwasher-app/asr/include/AppTask.h b/examples/dishwasher-app/asr/include/AppTask.h new file mode 100644 index 00000000000000..138c1b7260c63f --- /dev/null +++ b/examples/dishwasher-app/asr/include/AppTask.h @@ -0,0 +1,43 @@ +/* + * + * 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. + * 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 +#include + +#include +#include + +class AppTask +{ + +public: + CHIP_ERROR StartAppTask(); + static void AppTaskMain(void * pvParameter); + +private: + friend AppTask & GetAppTask(void); + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/dishwasher-app/asr/include/CHIPProjectConfig.h b/examples/dishwasher-app/asr/include/CHIPProjectConfig.h new file mode 100755 index 00000000000000..38ba84fe10f85a --- /dev/null +++ b/examples/dishwasher-app/asr/include/CHIPProjectConfig.h @@ -0,0 +1,111 @@ +/* + * + * 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. + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +/** + * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY + * + * Enables the use of a hard-coded default Chip device id and credentials if no device id + * is found in Chip NV storage. + * + * This option is for testing only and should be disabled in production releases. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// define Device type based on the application +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 117 // 0x0075 Dishwasher + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A uint32_t identifying the software version running on the device. + */ +/* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) diff --git a/examples/dishwasher-app/asr/include/DeviceCallbacks.h b/examples/dishwasher-app/asr/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..dcd71806f6f2d3 --- /dev/null +++ b/examples/dishwasher-app/asr/include/DeviceCallbacks.h @@ -0,0 +1,40 @@ +/* + * + * 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. + * 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. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include "CHIPDeviceManager.h" +#include +#include +#include + +class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks +{ +public: + virtual void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) override; + +private: + void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); +}; diff --git a/examples/dishwasher-app/asr/src/AppTask.cpp b/examples/dishwasher-app/asr/src/AppTask.cpp new file mode 100644 index 00000000000000..d2d8d0cb34fa64 --- /dev/null +++ b/examples/dishwasher-app/asr/src/AppTask.cpp @@ -0,0 +1,112 @@ +/* + * + * 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. + * 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. + */ + +#include "AppTask.h" +#include "AppConfig.h" +#include "CHIPDeviceManager.h" +#include "DeviceCallbacks.h" +#include "operational-state-delegates.h" +#include "qrcodegen.h" +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "init_Matter.h" +#if CONFIG_ENABLE_CHIP_SHELL +#include "matter_shell.h" +#endif +#include + +namespace { +lega_thread_t sAppTaskHandle; +} // namespace + +using namespace ::chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; +using namespace ::chip::System; + +AppTask AppTask::sAppTask; + +namespace { +constexpr EndpointId kNetworkCommissioningEndpointMain = 0; +constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(kNetworkCommissioningEndpointMain /* Endpoint Id */, + &(NetworkCommissioning::ASRWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); + + // We only have network commissioning on endpoint 0. + emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); +} + +static DeviceCallbacks EchoCallbacks; + +CHIP_ERROR AppTask::StartAppTask() +{ + // Start App task. + OSStatus result = lega_rtos_create_thread(&sAppTaskHandle, 2, APP_TASK_NAME, (lega_thread_function_t) AppTaskMain, + APP_TASK_STACK_SIZE, (lega_thread_arg_t) this); + return (result == kNoErr) ? CHIP_NO_ERROR : CHIP_APPLICATION_ERROR(0x02); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + ASR_LOG("App Task started"); + + if (MatterInitializer::Init_Matter_Stack(MATTER_DEVICE_NAME) != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); + + if (deviceMgr.Init(&EchoCallbacks) != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + if (MatterInitializer::Init_Matter_Server() != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + NetWorkCommissioningInstInit(); + + ASR_LOG("Current Firmware Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + ConfigurationMgr().LogDeviceConfig(); + + // Print setup info +#if CONFIG_NETWORK_LAYER_BLE + PrintOnboardingCodes(RendezvousInformationFlag(RendezvousInformationFlag::kBLE)); +#else + PrintOnboardingCodes(RendezvousInformationFlag(RendezvousInformationFlag::kOnNetwork)); +#endif /* CONFIG_NETWORK_LAYER_BLE */ + + /*Operational State Server Init*/ + MatterOperationalStateServerInit(); + /* Delete task */ + lega_rtos_delete_thread(NULL); +} diff --git a/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp b/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..23e6de9a118b03 --- /dev/null +++ b/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp @@ -0,0 +1,122 @@ +/* + * + * Copyright (c) 2020 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. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ +#include "DeviceCallbacks.h" +#include "AppConfig.h" +#include "CHIPDeviceManager.h" +#include "init_OTARequestor.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT || defined CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT +#include "route_hook/asr_route_hook.h" +#endif + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceManager; +using namespace ::chip::Logging; + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +constexpr uint32_t kInitOTARequestorDelaySec = 3; + +void InitOTARequestorHandler(System::Layer * systemLayer, void * appState) +{ + OTAInitializer::Instance().InitOTARequestor(); +} +#endif +void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ + switch (event->Type) + { + case DeviceEventType::kInternetConnectivityChange: + OnInternetConnectivityChange(event); + break; + + case DeviceEventType::kInterfaceIpAddressChanged: + if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || + (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) + { + // MDNS server restart on any ip assignment: if link local ipv6 is configured, that + // will not trigger a 'internet connectivity change' as there is no internet + // connectivity. MDNS still wants to refresh its listening interfaces to include the + // newly selected address. + app::DnssdServer::Instance().StartServer(); + + if (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned) + { +#if defined CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT || defined CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT + ChipLogProgress(NotSpecified, "Initializing route hook..."); + asr_route_hook_init(); +#endif + } + } + break; + } +} + +void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + static bool isOTAInitialized = false; +#endif + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established) + { + ASR_LOG("IPv4 Server ready..."); + app::DnssdServer::Instance().StartServer(); + } + else if (event->InternetConnectivityChange.IPv4 == kConnectivity_Lost) + { + ASR_LOG("Lost IPv4 connectivity..."); + } + if (event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + ASR_LOG("IPv6 Server ready..."); + app::DnssdServer::Instance().StartServer(); +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + // Init OTA requestor only when we have gotten IPv6 address + if (!isOTAInitialized) + { + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(kInitOTARequestorDelaySec), InitOTARequestorHandler, + nullptr); + isOTAInitialized = true; + } +#endif + } + else if (event->InternetConnectivityChange.IPv6 == kConnectivity_Lost) + { + ASR_LOG("Lost IPv6 connectivity..."); + } +} diff --git a/examples/dishwasher-app/asr/src/main.cpp b/examples/dishwasher-app/asr/src/main.cpp new file mode 100644 index 00000000000000..31c3543bd27b69 --- /dev/null +++ b/examples/dishwasher-app/asr/src/main.cpp @@ -0,0 +1,92 @@ +/* + * + * 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. + * 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. + */ + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "AppConfig.h" +#include "init_asrPlatform.h" +#include + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; + +volatile int apperror_cnt; +// ================================================================================ +// App Error +//================================================================================= +void appError(int err) +{ + ASR_LOG("!!!!!!!!!!!! App Critical Error: %d !!!!!!!!!!!", err); + lega_rtos_declare_critical(); + lega_rtos_enter_critical(); + while (1) + ; +} + +void appError(CHIP_ERROR error) +{ + appError(static_cast(error.AsInteger())); +} + +// ================================================================================ +// FreeRTOS Callbacks +// ================================================================================ +extern "C" void vApplicationIdleHook(void) +{ + // FreeRTOS Idle callback +} + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_asrPlatform(); + + CHIP_ERROR ret = GetAppTask().StartAppTask(); + if (ret != CHIP_NO_ERROR) + { + ASR_LOG("GetAppTask().Init() failed"); + appError(ret); + } + /* Start the FreeRTOS scheduler */ + vTaskStartScheduler(); + + chip::Platform::MemoryShutdown(); + PlatformMgr().StopEventLoopTask(); + PlatformMgr().Shutdown(); + + // Should never get here. + ASR_LOG("vTaskStartScheduler() failed"); + appError(ret); +} diff --git a/examples/dishwasher-app/asr/third_party/connectedhomeip b/examples/dishwasher-app/asr/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/dishwasher-app/asr/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 6be42b1525c125..b6bb80b2ebe5c7 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -433,6 +433,7 @@ def BuildASRTarget(): TargetPart('temperature-measurement', app=ASRApp.TEMPERATURE_MEASUREMENT), TargetPart('thermostat', app=ASRApp.THERMOSTAT), TargetPart('ota-requestor', app=ASRApp.OTA_REQUESTOR), + TargetPart('dishwasher', app=ASRApp.DISHWASHER), ]) # modifiers diff --git a/scripts/build/builders/asr.py b/scripts/build/builders/asr.py index bf856862e583e9..98062b3bbc7c8b 100644 --- a/scripts/build/builders/asr.py +++ b/scripts/build/builders/asr.py @@ -28,6 +28,7 @@ class ASRApp(Enum): TEMPERATURE_MEASUREMENT = auto() THERMOSTAT = auto() OTA_REQUESTOR = auto() + DISHWASHER = auto() def ExampleName(self): if self == ASRApp.ALL_CLUSTERS: @@ -48,6 +49,8 @@ def ExampleName(self): return 'thermostat' elif self == ASRApp.OTA_REQUESTOR: return 'ota-requestor-app' + elif self == ASRApp.DISHWASHER: + return 'dishwasher-app' else: raise Exception('Unknown app type: %r' % self) @@ -70,6 +73,8 @@ def AppNamePrefix(self): return 'chip-asr-thermostat-example' elif self == ASRApp.OTA_REQUESTOR: return 'chip-asr-ota-requestor-example' + elif self == ASRApp.DISHWASHER: + return 'chip-asr-dishwasher-example' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 61daa468a6967d..db0d31ea145989 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -1,5 +1,5 @@ ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed} -asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio] +asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio] android-{arm,arm64,x86,x64,androidstudio-arm,androidstudio-arm64,androidstudio-x86,androidstudio-x64}-{chip-tool,chip-test,tv-server,tv-casting-app,java-matter-controller,virtual-device-app}[-no-debug] bouffalolab-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706-eth,bl704l-dvk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id] cc32xx-lock From 1ed2425961ad81ac03a2d12e2dd0c1cbb5a5c068 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Wed, 26 Jul 2023 01:43:52 +0900 Subject: [PATCH 027/159] [ Java] Decouple generated API in build option (#27624) * Decouple Java generated API * Add comment * restyle * remove tlvdecoder in controller library * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format * Restyled by gn --------- Co-authored-by: Restyled.io --- build/chip/java/config.gni | 4 + src/controller/java/AndroidCallbacks.cpp | 31 ++++--- .../java/AndroidDeviceControllerWrapper.cpp | 20 ++--- src/controller/java/BUILD.gn | 61 +++++++++----- .../ChipDeviceController.java | 12 +-- .../devicecontroller/ThreadScanResult.java | 82 +++++++++++++++++++ .../chip/devicecontroller/WiFiScanResult.java | 70 ++++++++++++++++ 7 files changed, 228 insertions(+), 52 deletions(-) create mode 100644 src/controller/java/src/chip/devicecontroller/ThreadScanResult.java create mode 100644 src/controller/java/src/chip/devicecontroller/WiFiScanResult.java diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index ca18c9231fef1d..fbc1d95755863f 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -15,6 +15,9 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] + + # The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters) + matter_enable_java_generated_api = true matter_enable_java_compilation = false if (java_path != "" && current_os == "linux") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] @@ -27,6 +30,7 @@ declare_args() { [ "${java_path}/include/linux/" ] } + matter_enable_java_generated_api = false matter_enable_java_compilation = true } } diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index e236aef95fc41a..d55dfdf953c91c 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -17,8 +17,10 @@ #include "AndroidCallbacks.h" #include #include +#if USE_JAVA_TLV_ENCODE_DECODE #include #include +#endif #include #include #include @@ -243,14 +245,17 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jobject value = DecodeAttributeValue(aPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + + value = DecodeAttributeValue(aPath, readerForJavaObject, &err); // If we don't know this attribute, suppress it. if (err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB) { @@ -260,7 +265,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(attributePathObj, nullptr, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(attributePathObj, nullptr, CHIP_JNI_ERROR_EXCEPTION_THROWN)); - +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); @@ -354,10 +359,8 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -365,7 +368,11 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. if (err == CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB) { @@ -374,6 +381,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(nullptr, eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(nullptr, eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); @@ -699,10 +707,8 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -710,11 +716,16 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. VerifyOrReturn(err != CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB); VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 974cb882cd2a9e..110121d6e2e41c 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -653,12 +653,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); jclass wiFiInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", - wiFiInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/WiFiScanResult", + wiFiInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class WiFiScanResult"); return; } jmethodID wiFiInterfaceScanResultStructCtor = @@ -666,8 +665,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); if (wiFiInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find WiFiScanResult constructor"); return; } @@ -717,12 +715,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); jclass threadInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", - threadInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ThreadScanResult", + threadInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class ThreadScanResult"); return; } jmethodID threadInterfaceScanResultStructCtor = @@ -731,8 +728,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "Integer;[BLjava/lang/Integer;Ljava/lang/Integer;)V"); if (threadInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find ThreadScanResult constructor"); return; } diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index d6c78191e37fe0..7a3f2b5b41dac8 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -29,6 +29,8 @@ shared_library("jni") { output_extension = "dylib" } + defines = [] + # Temporary while we have circular dependencies between codegen.py and zap # generated files check_includes = false @@ -53,23 +55,14 @@ shared_library("jni") { "AttestationTrustStoreBridge.h", "BaseCHIPCluster-JNI.cpp", "CHIPAttributeTLVValueDecoder.h", - "CHIPDefaultCallbacks.cpp", - "CHIPDefaultCallbacks.h", "CHIPDeviceController-JNI.cpp", "CHIPTLVValueDecoder-JNI.cpp", "DeviceAttestationDelegateBridge.cpp", "DeviceAttestationDelegateBridge.h", - "zap-generated/CHIPAttributeTLVValueDecoder.cpp", - "zap-generated/CHIPClustersWrite-JNI.cpp", - "zap-generated/CHIPEventTLVValueDecoder.cpp", - "zap-generated/CHIPInvokeCallbacks.cpp", - "zap-generated/CHIPInvokeCallbacks.h", - "zap-generated/CHIPReadCallbacks.cpp", ] deps = [ "${chip_root}/src/controller/data_model", - "${chip_root}/src/controller/data_model:java-jni-sources", "${chip_root}/src/credentials:default_attestation_verifier", "${chip_root}/src/inet", "${chip_root}/src/lib", @@ -77,8 +70,25 @@ shared_library("jni") { "${chip_root}/src/platform", ] + if (matter_enable_java_generated_api) { + defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ] + + sources += [ + "CHIPDefaultCallbacks.cpp", + "CHIPDefaultCallbacks.h", + "zap-generated/CHIPAttributeTLVValueDecoder.cpp", + "zap-generated/CHIPClustersWrite-JNI.cpp", + "zap-generated/CHIPEventTLVValueDecoder.cpp", + "zap-generated/CHIPInvokeCallbacks.cpp", + "zap-generated/CHIPInvokeCallbacks.h", + "zap-generated/CHIPReadCallbacks.cpp", + ] + + deps += [ "${chip_root}/src/controller/data_model:java-jni-sources" ] + } + if (matter_enable_java_compilation) { - defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] + defines += [ "JAVA_MATTER_CONTROLLER_TEST" ] sources += [ "${chip_root}/src/controller/ExamplePersistentStorage.cpp", @@ -313,14 +323,6 @@ android_library("java") { sources = [ "generated/java/chip/devicecontroller/ClusterIDMapping.java", - "generated/java/chip/devicecontroller/ClusterReadMapping.java", - "generated/java/chip/devicecontroller/ClusterWriteMapping.java", - "src/chip/clusterinfo/ClusterCommandCallback.java", - "src/chip/clusterinfo/ClusterInfo.java", - "src/chip/clusterinfo/CommandParameterInfo.java", - "src/chip/clusterinfo/CommandResponseInfo.java", - "src/chip/clusterinfo/DelegatedClusterCallback.java", - "src/chip/clusterinfo/InteractionInfo.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -348,7 +350,9 @@ android_library("java") { "src/chip/devicecontroller/ReportEventCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", + "src/chip/devicecontroller/ThreadScanResult.java", "src/chip/devicecontroller/UnpairDeviceCallback.java", + "src/chip/devicecontroller/WiFiScanResult.java", "src/chip/devicecontroller/WriteAttributesCallback.java", "src/chip/devicecontroller/WriteAttributesCallbackJni.java", "src/chip/devicecontroller/model/AttributeState.java", @@ -361,12 +365,25 @@ android_library("java") { "src/chip/devicecontroller/model/EventState.java", "src/chip/devicecontroller/model/InvokeElement.java", "src/chip/devicecontroller/model/NodeState.java", - "zap-generated/chip/devicecontroller/ChipClusters.java", - "zap-generated/chip/devicecontroller/ChipEventStructs.java", - "zap-generated/chip/devicecontroller/ChipStructs.java", - "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", ] + if (matter_enable_java_generated_api) { + sources += [ + "generated/java/chip/devicecontroller/ClusterReadMapping.java", + "generated/java/chip/devicecontroller/ClusterWriteMapping.java", + "src/chip/clusterinfo/ClusterCommandCallback.java", + "src/chip/clusterinfo/ClusterInfo.java", + "src/chip/clusterinfo/CommandParameterInfo.java", + "src/chip/clusterinfo/CommandResponseInfo.java", + "src/chip/clusterinfo/DelegatedClusterCallback.java", + "src/chip/clusterinfo/InteractionInfo.java", + "zap-generated/chip/devicecontroller/ChipClusters.java", + "zap-generated/chip/devicecontroller/ChipEventStructs.java", + "zap-generated/chip/devicecontroller/ChipStructs.java", + "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", + ] + } + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 916f65fb270819..33cb7a9ff3ae6e 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -389,10 +389,8 @@ public void onScanNetworksFailure(int errorCode) { public void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults) { + Optional> wiFiScanResults, + Optional> threadScanResults) { if (scanNetworksListener != null) { scanNetworksListener.onScanNetworksSuccess( networkingStatus, debugText, wiFiScanResults, threadScanResults); @@ -1268,10 +1266,8 @@ public interface ScanNetworksListener { void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults); + Optional> wiFiScanResults, + Optional> threadScanResults); } /** Interface to listen for callbacks from CHIPDeviceController. */ diff --git a/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java new file mode 100644 index 00000000000000..64c837bdca411d --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020-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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class ThreadScanResult { + public Integer panId; + public Long extendedPanId; + public String networkName; + public Integer channel; + public Integer version; + public byte[] extendedAddress; + public Integer rssi; + public Integer lqi; + + public ThreadScanResult( + Integer panId, + Long extendedPanId, + String networkName, + Integer channel, + Integer version, + byte[] extendedAddress, + Integer rssi, + Integer lqi) { + this.panId = panId; + this.extendedPanId = extendedPanId; + this.networkName = networkName; + this.channel = channel; + this.version = version; + this.extendedAddress = extendedAddress; + this.rssi = rssi; + this.lqi = lqi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadScanResult {\n"); + output.append("\tpanId: "); + output.append(panId); + output.append("\n"); + output.append("\textendedPanId: "); + output.append(extendedPanId); + output.append("\n"); + output.append("\tnetworkName: "); + output.append(networkName); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tversion: "); + output.append(version); + output.append("\n"); + output.append("\textendedAddress: "); + output.append(Arrays.toString(extendedAddress)); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} diff --git a/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java new file mode 100644 index 00000000000000..bcc01e0af26874 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020-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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class WiFiScanResult { + public Integer security; + public byte[] ssid; + public byte[] bssid; + public Integer channel; + public Integer wiFiBand; + public Integer rssi; + + public WiFiScanResult( + Integer security, + byte[] ssid, + byte[] bssid, + Integer channel, + Integer wiFiBand, + Integer rssi) { + this.security = security; + this.ssid = ssid; + this.bssid = bssid; + this.channel = channel; + this.wiFiBand = wiFiBand; + this.rssi = rssi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("WiFiScanResult {\n"); + output.append("\tsecurity: "); + output.append(security); + output.append("\n"); + output.append("\tssid: "); + output.append(Arrays.toString(ssid)); + output.append("\n"); + output.append("\tbssid: "); + output.append(Arrays.toString(bssid)); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\twiFiBand: "); + output.append(wiFiBand); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} From f6be226aacaa83037184127c8b8934050805ed07 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 25 Jul 2023 13:12:32 -0400 Subject: [PATCH 028/159] Revert "[ Java] Decouple generated API in build option (#27624)" (#28272) This reverts commit 1ed2425961ad81ac03a2d12e2dd0c1cbb5a5c068. Co-authored-by: Andrei Litvin --- build/chip/java/config.gni | 4 - src/controller/java/AndroidCallbacks.cpp | 31 +++---- .../java/AndroidDeviceControllerWrapper.cpp | 20 +++-- src/controller/java/BUILD.gn | 61 +++++--------- .../ChipDeviceController.java | 12 ++- .../devicecontroller/ThreadScanResult.java | 82 ------------------- .../chip/devicecontroller/WiFiScanResult.java | 70 ---------------- 7 files changed, 52 insertions(+), 228 deletions(-) delete mode 100644 src/controller/java/src/chip/devicecontroller/ThreadScanResult.java delete mode 100644 src/controller/java/src/chip/devicecontroller/WiFiScanResult.java diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index fbc1d95755863f..ca18c9231fef1d 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -15,9 +15,6 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] - - # The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters) - matter_enable_java_generated_api = true matter_enable_java_compilation = false if (java_path != "" && current_os == "linux") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] @@ -30,7 +27,6 @@ declare_args() { [ "${java_path}/include/linux/" ] } - matter_enable_java_generated_api = false matter_enable_java_compilation = true } } diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index d55dfdf953c91c..e236aef95fc41a 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -17,10 +17,8 @@ #include "AndroidCallbacks.h" #include #include -#if USE_JAVA_TLV_ENCODE_DECODE #include #include -#endif #include #include #include @@ -245,17 +243,14 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat return; } + TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; + readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jobject value = nullptr; -#if USE_JAVA_TLV_ENCODE_DECODE - TLV::TLVReader readerForJavaObject; - readerForJavaObject.Init(*apData); - - value = DecodeAttributeValue(aPath, readerForJavaObject, &err); + jobject value = DecodeAttributeValue(aPath, readerForJavaObject, &err); // If we don't know this attribute, suppress it. if (err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB) { @@ -265,7 +260,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(attributePathObj, nullptr, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(attributePathObj, nullptr, CHIP_JNI_ERROR_EXCEPTION_THROWN)); -#endif + // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); @@ -359,8 +354,10 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV return; } + TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; + readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -368,11 +365,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = nullptr; -#if USE_JAVA_TLV_ENCODE_DECODE - TLV::TLVReader readerForJavaObject; - readerForJavaObject.Init(*apData); - value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. if (err == CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB) { @@ -381,7 +374,6 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(nullptr, eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(nullptr, eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); -#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); @@ -707,8 +699,10 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV return; } + TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; + readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -716,16 +710,11 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = nullptr; -#if USE_JAVA_TLV_ENCODE_DECODE - TLV::TLVReader readerForJavaObject; - readerForJavaObject.Init(*apData); - value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. VerifyOrReturn(err != CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB); VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); -#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 110121d6e2e41c..974cb882cd2a9e 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -653,11 +653,12 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); jclass wiFiInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/WiFiScanResult", - wiFiInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", + wiFiInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class WiFiScanResult"); + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); return; } jmethodID wiFiInterfaceScanResultStructCtor = @@ -665,7 +666,8 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); if (wiFiInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, "Could not find WiFiScanResult constructor"); + ChipLogError(Zcl, + "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); return; } @@ -715,11 +717,12 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); jclass threadInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ThreadScanResult", - threadInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", + threadInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ThreadScanResult"); + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); return; } jmethodID threadInterfaceScanResultStructCtor = @@ -728,7 +731,8 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "Integer;[BLjava/lang/Integer;Ljava/lang/Integer;)V"); if (threadInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, "Could not find ThreadScanResult constructor"); + ChipLogError(Zcl, + "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); return; } diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 7a3f2b5b41dac8..d6c78191e37fe0 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -29,8 +29,6 @@ shared_library("jni") { output_extension = "dylib" } - defines = [] - # Temporary while we have circular dependencies between codegen.py and zap # generated files check_includes = false @@ -55,14 +53,23 @@ shared_library("jni") { "AttestationTrustStoreBridge.h", "BaseCHIPCluster-JNI.cpp", "CHIPAttributeTLVValueDecoder.h", + "CHIPDefaultCallbacks.cpp", + "CHIPDefaultCallbacks.h", "CHIPDeviceController-JNI.cpp", "CHIPTLVValueDecoder-JNI.cpp", "DeviceAttestationDelegateBridge.cpp", "DeviceAttestationDelegateBridge.h", + "zap-generated/CHIPAttributeTLVValueDecoder.cpp", + "zap-generated/CHIPClustersWrite-JNI.cpp", + "zap-generated/CHIPEventTLVValueDecoder.cpp", + "zap-generated/CHIPInvokeCallbacks.cpp", + "zap-generated/CHIPInvokeCallbacks.h", + "zap-generated/CHIPReadCallbacks.cpp", ] deps = [ "${chip_root}/src/controller/data_model", + "${chip_root}/src/controller/data_model:java-jni-sources", "${chip_root}/src/credentials:default_attestation_verifier", "${chip_root}/src/inet", "${chip_root}/src/lib", @@ -70,25 +77,8 @@ shared_library("jni") { "${chip_root}/src/platform", ] - if (matter_enable_java_generated_api) { - defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ] - - sources += [ - "CHIPDefaultCallbacks.cpp", - "CHIPDefaultCallbacks.h", - "zap-generated/CHIPAttributeTLVValueDecoder.cpp", - "zap-generated/CHIPClustersWrite-JNI.cpp", - "zap-generated/CHIPEventTLVValueDecoder.cpp", - "zap-generated/CHIPInvokeCallbacks.cpp", - "zap-generated/CHIPInvokeCallbacks.h", - "zap-generated/CHIPReadCallbacks.cpp", - ] - - deps += [ "${chip_root}/src/controller/data_model:java-jni-sources" ] - } - if (matter_enable_java_compilation) { - defines += [ "JAVA_MATTER_CONTROLLER_TEST" ] + defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] sources += [ "${chip_root}/src/controller/ExamplePersistentStorage.cpp", @@ -323,6 +313,14 @@ android_library("java") { sources = [ "generated/java/chip/devicecontroller/ClusterIDMapping.java", + "generated/java/chip/devicecontroller/ClusterReadMapping.java", + "generated/java/chip/devicecontroller/ClusterWriteMapping.java", + "src/chip/clusterinfo/ClusterCommandCallback.java", + "src/chip/clusterinfo/ClusterInfo.java", + "src/chip/clusterinfo/CommandParameterInfo.java", + "src/chip/clusterinfo/CommandResponseInfo.java", + "src/chip/clusterinfo/DelegatedClusterCallback.java", + "src/chip/clusterinfo/InteractionInfo.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -350,9 +348,7 @@ android_library("java") { "src/chip/devicecontroller/ReportEventCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", - "src/chip/devicecontroller/ThreadScanResult.java", "src/chip/devicecontroller/UnpairDeviceCallback.java", - "src/chip/devicecontroller/WiFiScanResult.java", "src/chip/devicecontroller/WriteAttributesCallback.java", "src/chip/devicecontroller/WriteAttributesCallbackJni.java", "src/chip/devicecontroller/model/AttributeState.java", @@ -365,25 +361,12 @@ android_library("java") { "src/chip/devicecontroller/model/EventState.java", "src/chip/devicecontroller/model/InvokeElement.java", "src/chip/devicecontroller/model/NodeState.java", + "zap-generated/chip/devicecontroller/ChipClusters.java", + "zap-generated/chip/devicecontroller/ChipEventStructs.java", + "zap-generated/chip/devicecontroller/ChipStructs.java", + "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", ] - if (matter_enable_java_generated_api) { - sources += [ - "generated/java/chip/devicecontroller/ClusterReadMapping.java", - "generated/java/chip/devicecontroller/ClusterWriteMapping.java", - "src/chip/clusterinfo/ClusterCommandCallback.java", - "src/chip/clusterinfo/ClusterInfo.java", - "src/chip/clusterinfo/CommandParameterInfo.java", - "src/chip/clusterinfo/CommandResponseInfo.java", - "src/chip/clusterinfo/DelegatedClusterCallback.java", - "src/chip/clusterinfo/InteractionInfo.java", - "zap-generated/chip/devicecontroller/ChipClusters.java", - "zap-generated/chip/devicecontroller/ChipEventStructs.java", - "zap-generated/chip/devicecontroller/ChipStructs.java", - "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", - ] - } - if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 33cb7a9ff3ae6e..916f65fb270819 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -389,8 +389,10 @@ public void onScanNetworksFailure(int errorCode) { public void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> wiFiScanResults, - Optional> threadScanResults) { + Optional> + wiFiScanResults, + Optional> + threadScanResults) { if (scanNetworksListener != null) { scanNetworksListener.onScanNetworksSuccess( networkingStatus, debugText, wiFiScanResults, threadScanResults); @@ -1266,8 +1268,10 @@ public interface ScanNetworksListener { void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> wiFiScanResults, - Optional> threadScanResults); + Optional> + wiFiScanResults, + Optional> + threadScanResults); } /** Interface to listen for callbacks from CHIPDeviceController. */ diff --git a/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java deleted file mode 100644 index 64c837bdca411d..00000000000000 --- a/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2020-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. - * - */ -package chip.devicecontroller; - -import java.util.Arrays; - -public class ThreadScanResult { - public Integer panId; - public Long extendedPanId; - public String networkName; - public Integer channel; - public Integer version; - public byte[] extendedAddress; - public Integer rssi; - public Integer lqi; - - public ThreadScanResult( - Integer panId, - Long extendedPanId, - String networkName, - Integer channel, - Integer version, - byte[] extendedAddress, - Integer rssi, - Integer lqi) { - this.panId = panId; - this.extendedPanId = extendedPanId; - this.networkName = networkName; - this.channel = channel; - this.version = version; - this.extendedAddress = extendedAddress; - this.rssi = rssi; - this.lqi = lqi; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ThreadScanResult {\n"); - output.append("\tpanId: "); - output.append(panId); - output.append("\n"); - output.append("\textendedPanId: "); - output.append(extendedPanId); - output.append("\n"); - output.append("\tnetworkName: "); - output.append(networkName); - output.append("\n"); - output.append("\tchannel: "); - output.append(channel); - output.append("\n"); - output.append("\tversion: "); - output.append(version); - output.append("\n"); - output.append("\textendedAddress: "); - output.append(Arrays.toString(extendedAddress)); - output.append("\n"); - output.append("\trssi: "); - output.append(rssi); - output.append("\n"); - output.append("\tlqi: "); - output.append(lqi); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} diff --git a/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java deleted file mode 100644 index bcc01e0af26874..00000000000000 --- a/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2020-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. - * - */ -package chip.devicecontroller; - -import java.util.Arrays; - -public class WiFiScanResult { - public Integer security; - public byte[] ssid; - public byte[] bssid; - public Integer channel; - public Integer wiFiBand; - public Integer rssi; - - public WiFiScanResult( - Integer security, - byte[] ssid, - byte[] bssid, - Integer channel, - Integer wiFiBand, - Integer rssi) { - this.security = security; - this.ssid = ssid; - this.bssid = bssid; - this.channel = channel; - this.wiFiBand = wiFiBand; - this.rssi = rssi; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("WiFiScanResult {\n"); - output.append("\tsecurity: "); - output.append(security); - output.append("\n"); - output.append("\tssid: "); - output.append(Arrays.toString(ssid)); - output.append("\n"); - output.append("\tbssid: "); - output.append(Arrays.toString(bssid)); - output.append("\n"); - output.append("\tchannel: "); - output.append(channel); - output.append("\n"); - output.append("\twiFiBand: "); - output.append(wiFiBand); - output.append("\n"); - output.append("\trssi: "); - output.append(rssi); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} From 0b4659fa25c69b7767f568f51d57c96aa8017faa Mon Sep 17 00:00:00 2001 From: weicheng Date: Wed, 26 Jul 2023 01:16:38 +0800 Subject: [PATCH 029/159] [ASR] update device manager (#28251) Co-authored-by: weicheng --- examples/platform/asr/CHIPDeviceManager.cpp | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 examples/platform/asr/CHIPDeviceManager.cpp diff --git a/examples/platform/asr/CHIPDeviceManager.cpp b/examples/platform/asr/CHIPDeviceManager.cpp old mode 100644 new mode 100755 index c546175e2f393a..98ebda9a85134d --- a/examples/platform/asr/CHIPDeviceManager.cpp +++ b/examples/platform/asr/CHIPDeviceManager.cpp @@ -27,6 +27,7 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include #include From ed545c48fc7eed3a87cd464488bdb72703a82e86 Mon Sep 17 00:00:00 2001 From: Petru Lauric <81822411+plauric@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:21:30 -0400 Subject: [PATCH 030/159] Add RVC device type to XML + fix RVC Clean/Run XML issue (#28239) * add rvc device type * Apply suggestions from code review Co-authored-by: Boris Zbarsky --------- Co-authored-by: Boris Zbarsky --- .../zcl/data-model/chip/matter-devices.xml | 15 +++++++++++++++ .../data-model/chip/rvc-clean-mode-cluster.xml | 2 +- .../zcl/data-model/chip/rvc-run-mode-cluster.xml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 3c923129fb9f12..be7b55cb5ed43e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1989,6 +1989,21 @@ limitations under the License. + + MA-robotic-vacuum-cleaner + CHIP + Matter Robotic Vacuum Cleaner + 0x0103 + 0x0074 + + + + + + + + + MA-temperature-controlled-cabinet CHIP diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index 1baf10841b9672..8921822d4f89c5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -30,7 +30,7 @@ limitations under the License. - General + Robots RVC Clean Mode 0x0055 RVC_CLEAN_MODE_CLUSTER diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index dd7905ce9891d7..d6a3a241c32bd1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -36,7 +36,7 @@ limitations under the License. - General + Robots RVC Run Mode 0x0054 RVC_RUN_MODE_CLUSTER From 42e6f431b9b50e9351f50e53b36ac7555100292f Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 25 Jul 2023 14:44:22 -0400 Subject: [PATCH 031/159] Make C++17 the default everywhere (#28269) * Make cpp17 the default * Restyle * Add a clean for build on linux, since I had a run out of space --------- Co-authored-by: Andrei Litvin --- .github/workflows/build.yaml | 2 ++ build/config/compiler/compiler.gni | 7 +------ config/ameba/args.gni | 1 - config/mbed/CMakeLists.txt | 4 +--- examples/chef/silabs/with_pw_rpc.gni | 2 -- examples/chip-tool/args.gni | 3 --- examples/common/tracing/BUILD.gn | 5 +---- examples/light-switch-app/genio/with_pw_rpc.gni | 2 -- examples/lighting-app/bouffalolab/bl602/with_pw_rpc.gni | 2 -- examples/lighting-app/bouffalolab/bl702/with_pw_rpc.gni | 2 -- examples/lighting-app/bouffalolab/bl702l/with_pw_rpc.gni | 2 -- examples/lighting-app/genio/with_pw_rpc.gni | 2 -- examples/lighting-app/qpg/with_pw_rpc.gni | 2 -- examples/lighting-app/silabs/with_pw_rpc.gni | 2 -- examples/lock-app/genio/with_pw_rpc.gni | 2 -- examples/lock-app/qpg/with_pw_rpc.gni | 2 -- examples/lock-app/silabs/with_pw_rpc.gni | 2 -- examples/ota-requestor-app/genio/with_pw_rpc.gni | 2 -- examples/pump-app/silabs/with_pw_rpc.gni | 2 -- examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni | 2 -- examples/thermostat/genio/with_pw_rpc.gni | 2 -- src/test_driver/efr32/args.gni | 1 - 22 files changed, 5 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 14ced0ab7474a8..c3914b86230305 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -174,6 +174,8 @@ jobs: BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false" scripts/run_in_build_env.sh "ninja -C ./out/gcc_release" BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh + - name: Clean output + run: rm -rf ./out - name: Run Tests with sanitizers env: LSAN_OPTIONS: detect_leaks=1 diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 12a93863be8ce0..74dc224f3ecec7 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -43,12 +43,7 @@ declare_args() { c_standard = "gnu11" # C++ standard level (value for -std flag). - if (current_os == "linux" || current_os == "mac" || current_os == "ios" || - current_os == "android") { - cpp_standard = "gnu++17" - } else { - cpp_standard = "gnu++14" - } + cpp_standard = "gnu++17" # enable libfuzzer is_libfuzzer = false diff --git a/config/ameba/args.gni b/config/ameba/args.gni index 51634a9d738da6..a60eee6db2887c 100755 --- a/config/ameba/args.gni +++ b/config/ameba/args.gni @@ -37,4 +37,3 @@ custom_toolchain = "//third_party/connectedhomeip/config/ameba/toolchain:ameba" pw_build_PIP_CONSTRAINTS = [ "//third_party/connectedhomeip/scripts/setup/constraints.txt" ] -cpp_standard = "c++17" diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index a7006062f12ace..88567b604e3254 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -106,9 +106,7 @@ matter_get_compiler_flags_from_targets("${CONFIG_CHIP_EXTERNAL_TARGETS}") matter_add_flags(-D__LINUX_ERRNO_EXTENSIONS__=1) matter_add_flags(-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=) -if (CONFIG_CHIP_PW_RPC) - matter_add_gnu_cpp_standard("17") -endif() +matter_add_gnu_cpp_standard("17") if (CONFIG_MBED_BSD_SOCKET_TRACE) matter_add_flags(-DMBED_BSD_SOCKET_TRACE=1) diff --git a/examples/chef/silabs/with_pw_rpc.gni b/examples/chef/silabs/with_pw_rpc.gni index f07744d855c6f9..ec2d4cff28e7ad 100644 --- a/examples/chef/silabs/with_pw_rpc.gni +++ b/examples/chef/silabs/with_pw_rpc.gni @@ -24,7 +24,5 @@ silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true -cpp_standard = "gnu++17" - # Light app on EFR enables tracing server pw_trace_BACKEND = "$dir_pw_trace_tokenized" diff --git a/examples/chip-tool/args.gni b/examples/chip-tool/args.gni index 96dd37f02f03a1..a0b30a430f23f3 100644 --- a/examples/chip-tool/args.gni +++ b/examples/chip-tool/args.gni @@ -25,8 +25,5 @@ chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true -# Perfetto requires C++17 -cpp_standard = "gnu++17" - matter_log_json_payload_hex = true matter_log_json_payload_decode_full = true diff --git a/examples/common/tracing/BUILD.gn b/examples/common/tracing/BUILD.gn index 57eaaca3952245..266c3fc0f31581 100644 --- a/examples/common/tracing/BUILD.gn +++ b/examples/common/tracing/BUILD.gn @@ -19,10 +19,7 @@ import("${chip_root}/build/chip/buildconfig_header.gni") import("${chip_root}/src/lib/lib.gni") declare_args() { - # TODO: cpp_standard check is not ideal, it should be >= 17, - # however for now this is what we use in compilations - matter_commandline_enable_perfetto_tracing = - current_os == "linux" && cpp_standard == "gnu++17" + matter_commandline_enable_perfetto_tracing = current_os == "linux" } config("default_config") { diff --git a/examples/light-switch-app/genio/with_pw_rpc.gni b/examples/light-switch-app/genio/with_pw_rpc.gni index 581b4f415d5654..b8fc451b7c4a3a 100644 --- a/examples/light-switch-app/genio/with_pw_rpc.gni +++ b/examples/light-switch-app/genio/with_pw_rpc.gni @@ -23,5 +23,3 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/examples/lighting-app/bouffalolab/bl602/with_pw_rpc.gni b/examples/lighting-app/bouffalolab/bl602/with_pw_rpc.gni index f398cda41f8c7d..4b76ad23d426ac 100644 --- a/examples/lighting-app/bouffalolab/bl602/with_pw_rpc.gni +++ b/examples/lighting-app/bouffalolab/bl602/with_pw_rpc.gni @@ -22,8 +22,6 @@ import("${chip_root}/examples/platform/bouffalolab/bl602/args.gni") chip_enable_pw_rpc = true -cpp_standard = "gnu++17" - # pigweed updated to a1bd248 makes compile conversion errors; # it seems riscv gcc (version > 10) can fixes this issue. # let's disable strict warnings for RPC enabled for now. diff --git a/examples/lighting-app/bouffalolab/bl702/with_pw_rpc.gni b/examples/lighting-app/bouffalolab/bl702/with_pw_rpc.gni index 0a075b0e27228c..130936065cd57c 100644 --- a/examples/lighting-app/bouffalolab/bl702/with_pw_rpc.gni +++ b/examples/lighting-app/bouffalolab/bl702/with_pw_rpc.gni @@ -22,8 +22,6 @@ import("${chip_root}/examples/platform/bouffalolab/bl702/args.gni") chip_enable_pw_rpc = true -cpp_standard = "gnu++17" - # pigweed updated to a1bd248 makes compile conversion errors; # it seems riscv gcc (version > 10) can fixes this issue. # let's disable strict warnings for RPC enabled for now. diff --git a/examples/lighting-app/bouffalolab/bl702l/with_pw_rpc.gni b/examples/lighting-app/bouffalolab/bl702l/with_pw_rpc.gni index 81aacad443b43c..5d7ce27c99df3d 100644 --- a/examples/lighting-app/bouffalolab/bl702l/with_pw_rpc.gni +++ b/examples/lighting-app/bouffalolab/bl702l/with_pw_rpc.gni @@ -22,6 +22,4 @@ import("${chip_root}/examples/platform/bouffalolab/bl702l/args.gni") chip_enable_pw_rpc = true chip_build_pw_trace_lib = false - -cpp_standard = "gnu++17" #pw_trace_BACKEND = "$dir_pw_trace_tokenized" diff --git a/examples/lighting-app/genio/with_pw_rpc.gni b/examples/lighting-app/genio/with_pw_rpc.gni index 581b4f415d5654..b8fc451b7c4a3a 100644 --- a/examples/lighting-app/genio/with_pw_rpc.gni +++ b/examples/lighting-app/genio/with_pw_rpc.gni @@ -23,5 +23,3 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/examples/lighting-app/qpg/with_pw_rpc.gni b/examples/lighting-app/qpg/with_pw_rpc.gni index 2c388aa153388e..a2d2b536b17682 100644 --- a/examples/lighting-app/qpg/with_pw_rpc.gni +++ b/examples/lighting-app/qpg/with_pw_rpc.gni @@ -22,5 +22,3 @@ qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/examples/lighting-app/silabs/with_pw_rpc.gni b/examples/lighting-app/silabs/with_pw_rpc.gni index f8af7659ce1ed8..b53832f4b3d468 100644 --- a/examples/lighting-app/silabs/with_pw_rpc.gni +++ b/examples/lighting-app/silabs/with_pw_rpc.gni @@ -25,7 +25,5 @@ app_data_model = "${chip_root}/examples/lighting-app/lighting-common" chip_enable_pw_rpc = true chip_enable_openthread = true -cpp_standard = "gnu++17" - # Light app on EFR enables tracing server pw_trace_BACKEND = "$dir_pw_trace_tokenized" diff --git a/examples/lock-app/genio/with_pw_rpc.gni b/examples/lock-app/genio/with_pw_rpc.gni index 581b4f415d5654..b8fc451b7c4a3a 100644 --- a/examples/lock-app/genio/with_pw_rpc.gni +++ b/examples/lock-app/genio/with_pw_rpc.gni @@ -23,5 +23,3 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/examples/lock-app/qpg/with_pw_rpc.gni b/examples/lock-app/qpg/with_pw_rpc.gni index 60eff2c6f10c42..6f195eee957169 100644 --- a/examples/lock-app/qpg/with_pw_rpc.gni +++ b/examples/lock-app/qpg/with_pw_rpc.gni @@ -22,5 +22,3 @@ import("${chip_root}/examples/platform/qpg/args.gni") qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true - -cpp_standard = "gnu++17" diff --git a/examples/lock-app/silabs/with_pw_rpc.gni b/examples/lock-app/silabs/with_pw_rpc.gni index 2592790c03e2ce..c919d90189eb7c 100644 --- a/examples/lock-app/silabs/with_pw_rpc.gni +++ b/examples/lock-app/silabs/with_pw_rpc.gni @@ -26,8 +26,6 @@ chip_enable_pw_rpc = true chip_enable_openthread = true chip_openthread_ftd = true -cpp_standard = "gnu++17" - # To fit in flash chip_detail_logging = false show_qr_code = false diff --git a/examples/ota-requestor-app/genio/with_pw_rpc.gni b/examples/ota-requestor-app/genio/with_pw_rpc.gni index 581b4f415d5654..b8fc451b7c4a3a 100644 --- a/examples/ota-requestor-app/genio/with_pw_rpc.gni +++ b/examples/ota-requestor-app/genio/with_pw_rpc.gni @@ -23,5 +23,3 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/examples/pump-app/silabs/with_pw_rpc.gni b/examples/pump-app/silabs/with_pw_rpc.gni index bade7c7ea1f376..fb05fde8b4ccc3 100644 --- a/examples/pump-app/silabs/with_pw_rpc.gni +++ b/examples/pump-app/silabs/with_pw_rpc.gni @@ -26,7 +26,5 @@ chip_enable_pw_rpc = true chip_enable_openthread = true chip_build_pw_trace_lib = true -cpp_standard = "gnu++17" - # Light app on EFR enables tracing server pw_trace_BACKEND = "$dir_pw_trace_tokenized" diff --git a/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni b/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni index d06a784404a350..9b757515aceca9 100644 --- a/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni +++ b/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni @@ -25,5 +25,3 @@ app_data_model = "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/examples/thermostat/genio/with_pw_rpc.gni b/examples/thermostat/genio/with_pw_rpc.gni index 581b4f415d5654..b8fc451b7c4a3a 100644 --- a/examples/thermostat/genio/with_pw_rpc.gni +++ b/examples/thermostat/genio/with_pw_rpc.gni @@ -23,5 +23,3 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true - -cpp_standard = "gnu++17" diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index 2ef6653a0181e2..a8d442d5c2140e 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -21,7 +21,6 @@ import("${chip_root}/src/platform/silabs/efr32/args.gni") silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true -cpp_standard = "gnu++17" chip_build_tests = true chip_enable_openthread = true chip_openthread_ftd = true From 88f9a4480c634a20d8420d1c9c8f4a71321354f2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 25 Jul 2023 16:59:22 -0400 Subject: [PATCH 032/159] Add ipv6only build for rpc target, to not run out of ram when linking after #28104 (#28276) Co-authored-by: Andrei Litvin --- integrations/cloudbuild/smoke-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 05511e2b184670..a745ee172004cc 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -32,7 +32,7 @@ steps: ./scripts/build/build_examples.py --enable-flashbundle --target esp32-devkitc-light-rpc --target esp32-m5stack-all-clusters-ipv6only --target - esp32-m5stack-all-clusters-rpc --target + esp32-m5stack-all-clusters-rpc-ipv6only --target esp32-m5stack-light --target esp32-m5stack-light-ipv6only --target esp32-m5stack-ota-requestor build --create-archives From d9a747bade926b93df7a221b020060145e011ae5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 25 Jul 2023 20:24:14 -0400 Subject: [PATCH 033/159] Fix handling of cluster state cache min event number. (#28273) When initializing a new ReadClient with an existing ClusterStateCache, we should be setting the min event number to 1 more than the last event the cache saw. ReadClient was not doing this correctly. --- src/app/ReadClient.cpp | 7 +- src/controller/tests/TestEventCaching.cpp | 79 +++++++++++++------ .../tests/TestEventNumberCaching.cpp | 49 ++++++++---- .../Framework/CHIPTests/MTRDeviceTests.m | 1 + 4 files changed, 95 insertions(+), 41 deletions(-) diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 23b57df99ddbcf..c9df6638b708ef 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -1186,7 +1186,12 @@ CHIP_ERROR ReadClient::GetMinEventNumber(const ReadPrepareParams & aReadPrepareP } else { - return mpCallback.GetHighestReceivedEventNumber(aEventMin); + ReturnErrorOnFailure(mpCallback.GetHighestReceivedEventNumber(aEventMin)); + if (aEventMin.HasValue()) + { + // We want to start with the first event _after_ the last one we received. + aEventMin.SetValue(aEventMin.Value() + 1); + } } return CHIP_NO_ERROR; } diff --git a/src/controller/tests/TestEventCaching.cpp b/src/controller/tests/TestEventCaching.cpp index 06100250bdc2f4..24a101aeeb95b8 100644 --- a/src/controller/tests/TestEventCaching.cpp +++ b/src/controller/tests/TestEventCaching.cpp @@ -128,9 +128,16 @@ class TestReadCallback : public app::ClusterStateCache::Callback { public: TestReadCallback() : mClusterCacheAdapter(*this) {} - void OnDone(app::ReadClient *) {} + void OnDone(app::ReadClient *) override {} + + void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override + { + ++mEventsSeen; + } app::ClusterStateCache mClusterCacheAdapter; + + size_t mEventsSeen = 0; }; namespace { @@ -181,6 +188,7 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) chip::EventNumber lastEventNumber; GenerateEvents(apSuite, firstEventNumber, lastEventNumber); + NL_TEST_ASSERT(apSuite, lastEventNumber > firstEventNumber); app::EventPathParams eventPath; eventPath.mEndpointId = kTestEndpointId; @@ -203,10 +211,12 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) uint8_t generationCount = 0; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, firstEventNumber, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber >= firstEventNumber); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -216,21 +226,23 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) return CHIP_NO_ERROR; }); - NL_TEST_ASSERT(apSuite, generationCount == 5); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - firstEventNumber + 1); Optional highestEventNumber; readCallback.mClusterCacheAdapter.GetHighestReceivedEventNumber(highestEventNumber); - NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == 4); + NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == lastEventNumber); // // Re-run the iterator but pass in a path filter: EP*/TestCluster/EID* // generationCount = 0; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, firstEventNumber, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber >= firstEventNumber); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -241,17 +253,19 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) }, app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, kInvalidEventId)); - NL_TEST_ASSERT(apSuite, generationCount == 5); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - firstEventNumber + 1); // // Re-run the iterator but pass in a path filter: EP*/TestCluster/TestEvent // generationCount = 0; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, firstEventNumber, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber >= firstEventNumber); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -262,17 +276,20 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) }, app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, Clusters::UnitTesting::Events::TestEvent::Id)); - NL_TEST_ASSERT(apSuite, generationCount == 5); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - firstEventNumber + 1); // - // Re-run the iterator but pass in a min event number filter (EventNumber = 1). We should only receive 4 events. + // Re-run the iterator but pass in a min event number filter + // (EventNumber = firstEventNumber + 1). We should only receive 4 events. // generationCount = 1; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, firstEventNumber, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber >= firstEventNumber + 1); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -281,20 +298,23 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) generationCount++; return CHIP_NO_ERROR; }, - app::EventPathParams(), 1); + app::EventPathParams(), firstEventNumber + 1); - NL_TEST_ASSERT(apSuite, generationCount == 5); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - firstEventNumber + 1); // - // Re-run the iterator but pass in a min event number filter (EventNumber = 1) AND a path filter. We should only receive 4 + // Re-run the iterator but pass in a min event number filter + // (EventNumber = firstEventNumber + 1) AND a path filter. We should only receive 4 // events. // generationCount = 1; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, firstEventNumber, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber >= firstEventNumber + 1); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -303,14 +323,15 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) generationCount++; return CHIP_NO_ERROR; }, - app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, kInvalidEventId), 1); + app::EventPathParams(kInvalidEndpointId, Clusters::UnitTesting::Id, kInvalidEventId), firstEventNumber + 1); - NL_TEST_ASSERT(apSuite, generationCount == 5); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - firstEventNumber + 1); } // // Generate more events. // + const EventNumber oldFirstEventNumber = firstEventNumber; GenerateEvents(apSuite, firstEventNumber, lastEventNumber); { @@ -327,10 +348,12 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) // uint8_t generationCount = 0; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, oldFirstEventNumber, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber >= oldFirstEventNumber); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -341,7 +364,7 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) return CHIP_NO_ERROR; }); - NL_TEST_ASSERT(apSuite, generationCount == 10); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - oldFirstEventNumber + 1); Optional highestEventNumber; readCallback.mClusterCacheAdapter.GetHighestReceivedEventNumber(highestEventNumber); @@ -368,18 +391,28 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) app::ReadClient::InteractionType::Read); readCallback.mClusterCacheAdapter.ClearEventCache(); - readCallback.mClusterCacheAdapter.SetHighestReceivedEventNumber(3); + constexpr EventNumber kLastSeenEventNumber = 3; + NL_TEST_ASSERT(apSuite, kLastSeenEventNumber < lastEventNumber); + readCallback.mClusterCacheAdapter.SetHighestReceivedEventNumber(kLastSeenEventNumber); + readParams.mEventNumber.ClearValue(); + + readCallback.mEventsSeen = 0; NL_TEST_ASSERT(apSuite, readClient.SendRequest(readParams) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - uint8_t generationCount = 4; + // We should only get events with event numbers larger than kHighestEventNumberSeen. + NL_TEST_ASSERT(apSuite, readCallback.mEventsSeen == lastEventNumber - kLastSeenEventNumber); + + uint8_t generationCount = kLastSeenEventNumber + 1; readCallback.mClusterCacheAdapter.ForEachEventData( - [&apSuite, &readCallback, &generationCount](const app::EventHeader & header) { + [&apSuite, &readCallback, &generationCount, lastEventNumber](const app::EventHeader & header) { NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, header.mEventNumber > kLastSeenEventNumber); + NL_TEST_ASSERT(apSuite, header.mEventNumber <= lastEventNumber); Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) == CHIP_NO_ERROR); @@ -390,10 +423,10 @@ void TestReadEvents::TestBasicCaching(nlTestSuite * apSuite, void * apContext) return CHIP_NO_ERROR; }); - NL_TEST_ASSERT(apSuite, generationCount == 10); + NL_TEST_ASSERT(apSuite, generationCount == lastEventNumber - oldFirstEventNumber + 1); Optional highestEventNumber; readCallback.mClusterCacheAdapter.GetHighestReceivedEventNumber(highestEventNumber); - NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == 9); + NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == lastEventNumber); } // diff --git a/src/controller/tests/TestEventNumberCaching.cpp b/src/controller/tests/TestEventNumberCaching.cpp index 8c291013e874c5..982e98fcc2cc05 100644 --- a/src/controller/tests/TestEventNumberCaching.cpp +++ b/src/controller/tests/TestEventNumberCaching.cpp @@ -128,9 +128,16 @@ class TestReadCallback : public app::ClusterStateCache::Callback { public: TestReadCallback() : mClusterCacheAdapter(*this, Optional::Missing(), false /*cacheData*/) {} - void OnDone(app::ReadClient *) {} + void OnDone(app::ReadClient *) override {} + + void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override + { + ++mEventsSeen; + } app::ClusterStateCache mClusterCacheAdapter; + + size_t mEventsSeen = 0; }; namespace { @@ -178,6 +185,7 @@ void TestReadEvents::TestEventNumberCaching(nlTestSuite * apSuite, void * apCont chip::EventNumber lastEventNumber; GenerateEvents(apSuite, firstEventNumber, lastEventNumber); + NL_TEST_ASSERT(apSuite, lastEventNumber > firstEventNumber); app::EventPathParams eventPath; eventPath.mEndpointId = kTestEndpointId; @@ -201,23 +209,22 @@ void TestReadEvents::TestEventNumberCaching(nlTestSuite * apSuite, void * apCont ctx.DrainAndServiceIO(); - readCallback.mClusterCacheAdapter.ForEachEventData([&apSuite, &readCallback](const app::EventHeader & header) { - NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); - NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); - NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + NL_TEST_ASSERT(apSuite, readCallback.mEventsSeen == lastEventNumber - firstEventNumber + 1); + + readCallback.mClusterCacheAdapter.ForEachEventData([&apSuite](const app::EventHeader & header) { + // We are not caching data. + NL_TEST_ASSERT(apSuite, false); - Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; - NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) != CHIP_NO_ERROR); return CHIP_NO_ERROR; }); readCallback.mClusterCacheAdapter.GetHighestReceivedEventNumber(highestEventNumber); - NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == 4); + NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == lastEventNumber); } // // Clear out the event cache and set its highest received event number to a non zero value. Validate that - // we don't receive events lower than that value. + // we don't receive events except ones larger than that value. // { app::ReadClient readClient(engine, &ctx.GetExchangeManager(), readCallback.mClusterCacheAdapter.GetBufferedCallback(), @@ -227,24 +234,32 @@ void TestReadEvents::TestEventNumberCaching(nlTestSuite * apSuite, void * apCont Optional highestEventNumber; readCallback.mClusterCacheAdapter.GetHighestReceivedEventNumber(highestEventNumber); NL_TEST_ASSERT(apSuite, !highestEventNumber.HasValue()); - readCallback.mClusterCacheAdapter.SetHighestReceivedEventNumber(3); + const EventNumber kHighestEventNumberSeen = lastEventNumber - 1; + NL_TEST_ASSERT(apSuite, kHighestEventNumberSeen < lastEventNumber); + + readCallback.mClusterCacheAdapter.SetHighestReceivedEventNumber(kHighestEventNumberSeen); + + readCallback.mEventsSeen = 0; + + readParams.mEventNumber.ClearValue(); + NL_TEST_ASSERT(apSuite, !readParams.mEventNumber.HasValue()); NL_TEST_ASSERT(apSuite, readClient.SendRequest(readParams) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - readCallback.mClusterCacheAdapter.ForEachEventData([&apSuite, &readCallback](const app::EventHeader & header) { - NL_TEST_ASSERT(apSuite, header.mPath.mClusterId == Clusters::UnitTesting::Id); - NL_TEST_ASSERT(apSuite, header.mPath.mEventId == Clusters::UnitTesting::Events::TestEvent::Id); - NL_TEST_ASSERT(apSuite, header.mPath.mEndpointId == kTestEndpointId); + // We should only get events with event numbers larger than kHighestEventNumberSeen. + NL_TEST_ASSERT(apSuite, readCallback.mEventsSeen == lastEventNumber - kHighestEventNumberSeen); + + readCallback.mClusterCacheAdapter.ForEachEventData([&apSuite](const app::EventHeader & header) { + // We are not caching data. + NL_TEST_ASSERT(apSuite, false); - Clusters::UnitTesting::Events::TestEvent::DecodableType eventData; - NL_TEST_ASSERT(apSuite, readCallback.mClusterCacheAdapter.Get(header.mEventNumber, eventData) != CHIP_NO_ERROR); return CHIP_NO_ERROR; }); readCallback.mClusterCacheAdapter.GetHighestReceivedEventNumber(highestEventNumber); - NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == 4); + NL_TEST_ASSERT(apSuite, highestEventNumber.HasValue() && highestEventNumber.Value() == lastEventNumber); } NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index a4e0577f8f92ef..0d9b693296bc2d 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -1484,6 +1484,7 @@ - (void)test017_TestMTRDeviceBasics [self waitForExpectations:@[ subscriptionExpectation ] timeout:60]; XCTAssertNotEqual(attributeReportsReceived, 0); + XCTAssertNotEqual(eventReportsReceived, 0); attributeReportsReceived = 0; eventReportsReceived = 0; From 9c90f0f21c93256cab4347e7b1d0f2abe136b1b0 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 26 Jul 2023 04:05:31 +0200 Subject: [PATCH 034/159] [chiptool.py] Add show_adapter_logs option to chiptool.py (#28258) --- scripts/tests/yaml/chiptool.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/tests/yaml/chiptool.py b/scripts/tests/yaml/chiptool.py index f36e29f22e0e4b..757d304312d77b 100755 --- a/scripts/tests/yaml/chiptool.py +++ b/scripts/tests/yaml/chiptool.py @@ -32,8 +32,9 @@ @click.pass_context -def send_yaml_command(ctx, test_name: str, server_path: str, server_arguments: str, pics: str, additional_pseudo_clusters_directory: str, commands: List[str]): - kwargs = {'test_name': test_name, 'pics': pics, 'additional_pseudo_clusters_directory': additional_pseudo_clusters_directory} +def send_yaml_command(ctx, test_name: str, server_path: str, server_arguments: str, show_adapter_logs: bool, pics: str, additional_pseudo_clusters_directory: str, commands: List[str]): + kwargs = {'test_name': test_name, 'show_adapter_logs': show_adapter_logs, 'pics': pics, + 'additional_pseudo_clusters_directory': additional_pseudo_clusters_directory} index = 0 while len(commands) - index > 1: @@ -83,6 +84,8 @@ def chiptool_runner_options(f): help='Name of a websocket server to run at launch.')(f) f = click.option('--server_arguments', type=str, default='interactive server', help='Optional arguments to pass to the websocket server at launch.')(f) + f = click.option('--show_adapter_logs', type=bool, default=False, show_default=True, + help='Show additional logs provided by the adapter.')(f) f = click.option('--trace_file', type=click.Path(), default=None, help='Optional file path to save the tracing output to.')(f) f = click.option('--trace_decode', type=bool, default=True, @@ -126,14 +129,14 @@ def maybe_update_stop_on_error(ctx): @click.argument('commands', nargs=-1) @chiptool_runner_options @click.pass_context -def chiptool_py(ctx, commands: List[str], server_path: str, server_name: str, server_arguments: str, trace_file: str, trace_decode: bool, delay_in_ms: int, continueonfailure: bool, pics: str, additional_pseudo_clusters_directory: str): +def chiptool_py(ctx, commands: List[str], server_path: str, server_name: str, server_arguments: str, show_adapter_logs: bool, trace_file: str, trace_decode: bool, delay_in_ms: int, continueonfailure: bool, pics: str, additional_pseudo_clusters_directory: str): success = False server_arguments = maybe_update_server_arguments(ctx) maybe_update_stop_on_error(ctx) if len(commands) > 1 and commands[0] == 'tests': - success = send_yaml_command(commands[1], server_path, server_arguments, pics, + success = send_yaml_command(commands[1], server_path, server_arguments, show_adapter_logs, pics, additional_pseudo_clusters_directory, commands[2:]) else: if server_path is None and server_name: From 67324e6f593a95fdec8a8de50c10a5d368348e0c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 26 Jul 2023 00:46:22 -0400 Subject: [PATCH 035/159] Update various bits to c++17 and gnu++17. (#28280) A number of gnu++14/c++14/c++11/gnu++11 got missed. --- .vscode/c_cpp_properties.json | 16 ++++++++-------- .vscode/settings.json | 2 +- examples/all-clusters-app/ameba/chip_main.cmake | 3 +-- .../ameba/chip_main.cmake | 3 +-- examples/bridge-app/esp32/CMakeLists.txt | 2 +- examples/chef/ameba/chip_main.cmake | 3 +-- examples/light-switch-app/ameba/chip_main.cmake | 3 +-- examples/lighting-app/ameba/chip_main.cmake | 3 +-- examples/ota-provider-app/esp32/CMakeLists.txt | 2 +- examples/ota-requestor-app/ameba/chip_main.cmake | 3 +-- examples/persistent-storage/esp32/CMakeLists.txt | 2 +- examples/shell/esp32/CMakeLists.txt | 2 +- .../CHIPTool/CHIPTool.xcodeproj/project.pbxproj | 4 ++-- .../Framework/Matter.xcodeproj/project.pbxproj | 4 ++-- third_party/ti_simplelink_sdk/BUILD.gn | 2 +- .../ti_simplelink_sdk/ti_simplelink_sdk.gni | 2 +- 16 files changed, 25 insertions(+), 31 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 425b49fdf84ae3..ef2ff751283ba9 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -5,7 +5,7 @@ "compileCommands": "${workspaceFolder}/out/debug/compile_commands.gcc.json", "compilerPath": "/usr/bin/gcc", "cStandard": "c11", - "cppStandard": "gnu++14", + "cppStandard": "gnu++17", "intelliSenseMode": "gcc-x64", "browse": { "path": ["${workspaceFolder}/out/debug/"], @@ -17,7 +17,7 @@ "compileCommands": "${workspaceFolder}/out/debug/compile_commands.clang.json", "compilerPath": "/usr/bin/clang", "cStandard": "c11", - "cppStandard": "gnu++14", + "cppStandard": "gnu++17", "intelliSenseMode": "clang-x64", "browse": { "path": ["${workspaceFolder}/out/debug/"], @@ -29,7 +29,7 @@ "compileCommands": "${workspaceFolder}/out/debug/compile_commands.mbedtls.json", "compilerPath": "/usr/bin/gcc", "cStandard": "c11", - "cppStandard": "gnu++14", + "cppStandard": "gnu++17", "intelliSenseMode": "gcc-x64", "browse": { "path": ["${workspaceFolder}/out/debug/"], @@ -39,7 +39,7 @@ { "name": "Android x64 debug (GN)", "cStandard": "c11", - "cppStandard": "c++11", + "cppStandard": "gnu++17", "intelliSenseMode": "clang-x64", "compileCommands": "${workspaceFolder}/out/debug/compile_commands.android_x64.json", "compilerPath": "/opt/android/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang", @@ -51,7 +51,7 @@ { "name": "Android arm64 debug (GN)", "cStandard": "c11", - "cppStandard": "c++11", + "cppStandard": "gnu++17", "intelliSenseMode": "clang-arm64", "compileCommands": "${workspaceFolder}/out/debug/compile_commands.android_arm64.json", "compilerPath": "/opt/android/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang", @@ -63,7 +63,7 @@ { "name": "EFR32 examples debug (GN)", "cStandard": "c11", - "cppStandard": "c++11", + "cppStandard": "gnu++17", "intelliSenseMode": "gcc-arm", "compileCommands": "${workspaceFolder}/out/debug/compile_commands.efr32.json", "compilerPath": "/opt/ARM-software/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc", @@ -75,7 +75,7 @@ { "name": "nRF Connect examples debug (GN)", "cStandard": "c11", - "cppStandard": "gnu++14", + "cppStandard": "gnu++17", "intelliSenseMode": "gcc-arm", "compilerPath": "/opt/ARM-software/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc", "browse": { @@ -86,7 +86,7 @@ { "name": "Tizen examples debug (GN)", "cStandard": "c11", - "cppStandard": "gnu++14", + "cppStandard": "gnu++17", "intelliSenseMode": "gcc-arm", "compilerPath": "/opt/tizen-sdk/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-gcc", "compileCommands": "${workspaceFolder}/out/debug/compile_commands.tizen_arm.json", diff --git a/.vscode/settings.json b/.vscode/settings.json index e1a1725bcfbadb..7524bf25d83ec2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -166,7 +166,7 @@ ], "clang-format.fallbackStyle": "WebKit", "files.trimFinalNewlines": true, - "C_Cpp.default.cppStandard": "gnu++14", + "C_Cpp.default.cppStandard": "gnu++17", "C_Cpp.default.cStandard": "gnu11", "cmake.configureOnOpen": false, "search.followSymlinks": false, diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 77bea5ccfe132f..9aa14765fa7923 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -298,8 +298,7 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++11 - -std=c++14 + -std=c++17 -fno-rtti ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) diff --git a/examples/all-clusters-minimal-app/ameba/chip_main.cmake b/examples/all-clusters-minimal-app/ameba/chip_main.cmake index 95b062a636f0a6..6eed28e5dec0da 100755 --- a/examples/all-clusters-minimal-app/ameba/chip_main.cmake +++ b/examples/all-clusters-minimal-app/ameba/chip_main.cmake @@ -258,8 +258,7 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++11 - -std=c++14 + -std=c++17 -fno-rtti ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) diff --git a/examples/bridge-app/esp32/CMakeLists.txt b/examples/bridge-app/esp32/CMakeLists.txt index 1e7c544310462c..d5a5732e145274 100644 --- a/examples/bridge-app/esp32/CMakeLists.txt +++ b/examples/bridge-app/esp32/CMakeLists.txt @@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS # TODO: add CHIPProjectAppConfig.h to esp32 project(chip-bridge-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/chef/ameba/chip_main.cmake b/examples/chef/ameba/chip_main.cmake index c92f1e0b471eb0..bc4ef4a9308bc1 100755 --- a/examples/chef/ameba/chip_main.cmake +++ b/examples/chef/ameba/chip_main.cmake @@ -114,8 +114,7 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++11 - -std=c++14 + -std=c++17 -fno-rtti ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) diff --git a/examples/light-switch-app/ameba/chip_main.cmake b/examples/light-switch-app/ameba/chip_main.cmake index 23d8d66feea2d4..71deaa9938e494 100755 --- a/examples/light-switch-app/ameba/chip_main.cmake +++ b/examples/light-switch-app/ameba/chip_main.cmake @@ -287,8 +287,7 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++11 - -std=c++14 + -std=c++17 -fno-rtti ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake index 5d8b85dd1e6a14..727b7e4d554868 100755 --- a/examples/lighting-app/ameba/chip_main.cmake +++ b/examples/lighting-app/ameba/chip_main.cmake @@ -274,8 +274,7 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++11 - -std=c++14 + -std=c++17 -fno-rtti ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) diff --git a/examples/ota-provider-app/esp32/CMakeLists.txt b/examples/ota-provider-app/esp32/CMakeLists.txt index d9abb2fe27f3d3..156c9366e183b1 100644 --- a/examples/ota-provider-app/esp32/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/CMakeLists.txt @@ -30,7 +30,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-ota-provider-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/ota-requestor-app/ameba/chip_main.cmake b/examples/ota-requestor-app/ameba/chip_main.cmake index a7aecb06707370..ed14a6424eab40 100644 --- a/examples/ota-requestor-app/ameba/chip_main.cmake +++ b/examples/ota-requestor-app/ameba/chip_main.cmake @@ -91,8 +91,7 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++11 - -std=c++14 + -std=c++17 -fno-rtti ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) diff --git a/examples/persistent-storage/esp32/CMakeLists.txt b/examples/persistent-storage/esp32/CMakeLists.txt index 372d88c2729db1..86bf87b7a4a4d5 100644 --- a/examples/persistent-storage/esp32/CMakeLists.txt +++ b/examples/persistent-storage/esp32/CMakeLists.txt @@ -28,7 +28,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-persistent-storage) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/shell/esp32/CMakeLists.txt b/examples/shell/esp32/CMakeLists.txt index 1b1c919acef6ee..3b23f33624aeb6 100644 --- a/examples/shell/esp32/CMakeLists.txt +++ b/examples/shell/esp32/CMakeLists.txt @@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-shell) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various diff --git a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj index a7993016697d66..67692af8f88bc4 100644 --- a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj +++ b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj @@ -447,7 +447,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -508,7 +508,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index ba81628e65a01a..8dc126d5e24f2a 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -1686,7 +1686,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -1858,7 +1858,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/third_party/ti_simplelink_sdk/BUILD.gn b/third_party/ti_simplelink_sdk/BUILD.gn index 8f6c4806d2182a..363d94685955fe 100644 --- a/third_party/ti_simplelink_sdk/BUILD.gn +++ b/third_party/ti_simplelink_sdk/BUILD.gn @@ -110,7 +110,7 @@ config("ti_simplelink_freertos_config") { config("ti_simplelink_posix_config") { include_dirs = [ "${ti_simplelink_sdk_root}/source/ti/posix/gcc" ] cflags_c = [ "-std=c11" ] - cflags_cc = [ "-std=c++14" ] + cflags_cc = [ "-std=c++17" ] cflags = [ "-Wno-maybe-uninitialized", "-Wno-sign-compare", diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index 08ef9bd1c6fd8a..06c925ff8b0774 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -277,7 +277,7 @@ template("ti_simplelink_sdk") { config("${sdk_target_name}_posix_config") { include_dirs = [ "${ti_simplelink_sdk_root}/source/ti/posix/gcc" ] cflags_c = [ "-std=c11" ] - cflags_cc = [ "-std=c++14" ] + cflags_cc = [ "-std=c++17" ] cflags = [ "-Wno-maybe-uninitialized", "-Wno-sign-compare", From b9de4753b309a186046ca9102cdc2cb8a8953785 Mon Sep 17 00:00:00 2001 From: EricZijian_Siter Date: Wed, 26 Jul 2023 15:21:28 +0800 Subject: [PATCH 036/159] [SMCO] Assign five values to HIEST_PRI_ALARM (#28247) Co-authored-by: Hare --- .../certification/Test_TC_SMCO_2_6.yaml | 20 +++++++++++++++---- .../chip-tool/zap-generated/test/Commands.h | 16 +++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml b/src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml index 5d68637c3b5a46..0b13078763c4cb 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml @@ -60,6 +60,18 @@ config: HIEST_PRI_ALARM: type: int8u defaultValue: 1 + HIEST_PRI_ALARM_2: + type: int8u + defaultValue: 2 + HIEST_PRI_ALARM_3: + type: int8u + defaultValue: 7 + HIEST_PRI_ALARM_4: + type: int8u + defaultValue: 7 + HIEST_PRI_ALARM_5: + type: int8u + defaultValue: 3 tests: - label: "Commission DUT to TH" @@ -334,7 +346,7 @@ tests: command: "readAttribute" attribute: "ExpressedState" response: - value: HIEST_PRI_ALARM + value: HIEST_PRI_ALARM_2 constraints: type: enum8 @@ -371,7 +383,7 @@ tests: command: "readAttribute" attribute: "ExpressedState" response: - value: HIEST_PRI_ALARM + value: HIEST_PRI_ALARM_3 constraints: type: enum8 @@ -409,7 +421,7 @@ tests: command: "readAttribute" attribute: "ExpressedState" response: - value: HIEST_PRI_ALARM + value: HIEST_PRI_ALARM_4 constraints: type: enum8 @@ -447,7 +459,7 @@ tests: command: "readAttribute" attribute: "ExpressedState" response: - value: HIEST_PRI_ALARM + value: HIEST_PRI_ALARM_5 constraints: type: enum8 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index ce0c3be66f3523..e800416ec18db5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -63224,6 +63224,10 @@ class Test_TC_SMCO_2_6Suite : public TestCommand AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarm); AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarmClear); AddArgument("HIEST_PRI_ALARM", 0, UINT8_MAX, &mHiestPriAlarm); + AddArgument("HIEST_PRI_ALARM_2", 0, UINT8_MAX, &mHiestPriAlarm2); + AddArgument("HIEST_PRI_ALARM_3", 0, UINT8_MAX, &mHiestPriAlarm3); + AddArgument("HIEST_PRI_ALARM_4", 0, UINT8_MAX, &mHiestPriAlarm4); + AddArgument("HIEST_PRI_ALARM_5", 0, UINT8_MAX, &mHiestPriAlarm5); } ~Test_TC_SMCO_2_6Suite() {} @@ -63247,6 +63251,10 @@ class Test_TC_SMCO_2_6Suite : public TestCommand chip::Optional mTestEventTriggerInterconnectCoAlarm; chip::Optional mTestEventTriggerInterconnectCoAlarmClear; chip::Optional mHiestPriAlarm; + chip::Optional mHiestPriAlarm2; + chip::Optional mHiestPriAlarm3; + chip::Optional mHiestPriAlarm4; + chip::Optional mHiestPriAlarm5; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -63420,7 +63428,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand { chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); + VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm2.HasValue() ? mHiestPriAlarm2.Value() : 2U)); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; @@ -63442,7 +63450,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand { chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); + VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm3.HasValue() ? mHiestPriAlarm3.Value() : 7U)); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; @@ -63464,7 +63472,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand { chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); + VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm4.HasValue() ? mHiestPriAlarm4.Value() : 7U)); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; @@ -63486,7 +63494,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand { chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); + VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm5.HasValue() ? mHiestPriAlarm5.Value() : 3U)); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; From 1d49d9ef588c3ec4f0da829783e4b7c8885053b3 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 26 Jul 2023 10:36:21 +0100 Subject: [PATCH 037/159] Fix memory leak when destroying ModeBase delegates (#28267) * Fixes #28265 * Fixed typo. --- .../all-clusters-common/src/dishwasher-mode.cpp | 3 ++- .../all-clusters-common/src/laundry-washer-mode.cpp | 3 ++- .../all-clusters-app/all-clusters-common/src/rvc-modes.cpp | 6 ++++-- .../all-clusters-app/all-clusters-common/src/tcc-mode.cpp | 3 ++- src/app/clusters/mode-base-server/mode-base-server.h | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp index c96ec297a2e2d2..65de4f9dc6e85e 100644 --- a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp @@ -85,7 +85,8 @@ void DishwasherMode::Shutdown() } if (gDishwasherModeDelegate != nullptr) { - gDishwasherModeDelegate->~DishwasherModeDelegate(); + delete gDishwasherModeDelegate; + gDishwasherModeDelegate = nullptr; } } diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp index 9d05b4b58850e0..bf5337277ce430 100644 --- a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp @@ -84,7 +84,8 @@ void LaundryWasherMode::Shutdown() } if (gLaundryWasherModeDelegate != nullptr) { - gLaundryWasherModeDelegate->~LaundryWasherModeDelegate(); + delete gLaundryWasherModeDelegate; + gLaundryWasherModeDelegate = nullptr; } } diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 9a95054c26f8ab..81fa54965c2172 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -97,7 +97,8 @@ void RvcRunMode::Shutdown() } if (gRvcRunModeDelegate != nullptr) { - gRvcRunModeDelegate->~RvcRunModeDelegate(); + delete gRvcRunModeDelegate; + gRvcRunModeDelegate = nullptr; } } @@ -180,7 +181,8 @@ void RvcCleanMode::Shutdown() } if (gRvcCleanModeDelegate != nullptr) { - gRvcCleanModeDelegate->~RvcCleanModeDelegate(); + delete gRvcCleanModeDelegate; + gRvcCleanModeDelegate = nullptr; } } diff --git a/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp index 30b8c03075e2ea..8f3c865aecaf0e 100644 --- a/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp @@ -84,7 +84,8 @@ void RefrigeratorAndTemperatureControlledCabinetMode::Shutdown() } if (gTccModeDelegate != nullptr) { - gTccModeDelegate->~TccModeDelegate(); + delete gTccModeDelegate; + gTccModeDelegate = nullptr; } } diff --git a/src/app/clusters/mode-base-server/mode-base-server.h b/src/app/clusters/mode-base-server/mode-base-server.h index 3e1b77bcbf7e2a..b75eeb85e67481 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.h +++ b/src/app/clusters/mode-base-server/mode-base-server.h @@ -241,7 +241,7 @@ class Delegate // todo change once there is a clear public interface for the OnOff cluster data dependencies (#27508) static IntrusiveList gModeBaseAliasesInstances; -// This does not return a refernce to const IntrusiveList, because the caller might need +// This does not return a reference to const IntrusiveList, because the caller might need // to change the state of the instances in the list and const IntrusiveList only allows // access to const Instance. IntrusiveList & GetModeBaseInstanceList(); From bae8aff50036f939baa2b61a7ca1d895e94be3cf Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 26 Jul 2023 09:47:08 -0400 Subject: [PATCH 038/159] [cloudbuild] Fix CHEF builds for esp32. (#28295) Adds the workaround for gdbgui for chef builds as well. Chef failures were missed because we had a 'keep going' flag to builds. Removed that one as we should actually fix errors not ignore them. --- integrations/cloudbuild/chef.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 7e750750f5f76a..4ec78c51730b1a 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -16,8 +16,9 @@ steps: env: - PW_ENVIRONMENT_ROOT=/pwenv args: - - ./examples/chef/chef.py --build_all --keep_going --build_exclude - noip + - >- + perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt && + ./examples/chef/chef.py --build_all --build_exclude noip id: CompileAll waitFor: - Bootstrap @@ -30,7 +31,7 @@ steps: env: - PW_ENVIRONMENT_ROOT=/pwenv args: - - ./examples/chef/chef.py --build_all --keep_going --build_include + - ./examples/chef/chef.py --build_all --build_include linux_arm64_ipv6only.*noip id: CompileNoip waitFor: From 6c4368f1f59ca01d10516a07a94e36b8785edc1a Mon Sep 17 00:00:00 2001 From: shgutte <102281713+shgutte@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:35:53 +0530 Subject: [PATCH 039/159] [Silabs] BLE bug fixes for Wi-Fi devices (#27842) * ble bug fixes with NCP and SOC * Restyled by clang-format * Added changes for BLEManager event * Added changes according to comments * Added TODO for RSI_ERROR define * removed the semaphore changes * applied retyled patch --------- Co-authored-by: bhmanda-silabs Co-authored-by: Restyled.io --- src/platform/silabs/rs911x/BLEManagerImpl.cpp | 48 +++++++++++++++---- src/platform/silabs/rs911x/rsi_ble_config.h | 6 +++ 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 5719b816b95676..4f04daf464730f 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -60,8 +60,6 @@ extern "C" { #include #endif -extern uint16_t rsi_ble_measurement_hndl; -extern rsi_ble_event_conn_status_t conn_event_to_app; extern sl_wfx_msg_t event_msg; StaticTask_t rsiBLETaskStruct; @@ -589,8 +587,21 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) { ChipLogError(DeviceLayer, "rsi_ble_set_advertise_data() success: %ld", result); } - - // err = MapBLEError(result); + index = 0; + responseData[index++] = 0x02; // length + responseData[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags + responseData[index++] = CHIP_ADV_DATA_FLAGS; + responseData[index++] = CHIP_ADV_SHORT_UUID_LEN + 1; // AD length + responseData[index++] = CHIP_ADV_DATA_TYPE_UUID; // AD type : uuid + responseData[index++] = ShortUUID_CHIPoBLEService[0]; // AD value + responseData[index++] = ShortUUID_CHIPoBLEService[1]; + + responseData[index++] = static_cast(mDeviceNameLength + 1); // length + responseData[index++] = CHIP_ADV_DATA_TYPE_NAME; // AD type : name + memcpy(&responseData[index], mDeviceName, mDeviceNameLength); // AD value + index += mDeviceNameLength; + + rsi_ble_set_scan_response_data(responseData, index); ChipLogProgress(DeviceLayer, "ConfigureAdvertisingData End"); exit: @@ -659,8 +670,16 @@ int32_t BLEManagerImpl::SendBLEAdvertisementCommand(void) ble_adv.filter_type = RSI_BLE_ADV_FILTER_TYPE; ble_adv.direct_addr_type = RSI_BLE_ADV_DIR_ADDR_TYPE; rsi_ascii_dev_address_to_6bytes_rev(ble_adv.direct_addr, (int8_t *) RSI_BLE_ADV_DIR_ADDR); - ble_adv.adv_int_min = RSI_BLE_ADV_INT_MIN; - ble_adv.adv_int_max = RSI_BLE_ADV_INT_MAX; + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + ble_adv.adv_int_min = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN; + ble_adv.adv_int_max = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; + } + else + { + ble_adv.adv_int_min = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; + ble_adv.adv_int_max = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + } ble_adv.own_addr_type = LE_RANDOM_ADDRESS; ble_adv.adv_channel_map = RSI_BLE_ADV_CHANNEL_MAP; return rsi_ble_start_advertising_with_values(&ble_adv); @@ -781,6 +800,10 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(rsi_ble_event_write_t * evt) CHIP_ERROR err = CHIP_NO_ERROR; bool isIndicationEnabled = false; ChipDeviceEvent event; + CHIPoBLEConState * bleConnState; + + bleConnState = GetConnectionState(event_msg.connectionHandle); + VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); // Determine if the client is enabling or disabling notification/indication. if (evt->att_value[0] != 0) @@ -792,9 +815,12 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(rsi_ble_event_write_t * evt) if (isIndicationEnabled) { - // Post an event to the CHIP queue to process either a CHIPoBLE Subscribe or Unsubscribe based on - // whether the client is enabling or disabling indications. + // If indications are not already enabled for the connection... + if (!bleConnState->subscribed) { + bleConnState->subscribed = 1; + // Post an event to the CHIP queue to process either a CHIPoBLE Subscribe or Unsubscribe based on + // whether the client is enabling or disabling indications. event.Type = DeviceEventType::kCHIPoBLESubscribe; event.CHIPoBLESubscribe.ConId = 1; // TODO:: To be replaced by device mac address err = PlatformMgr().PostEvent(&event); @@ -802,10 +828,16 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(rsi_ble_event_write_t * evt) } else { + bleConnState->subscribed = 0; event.Type = DeviceEventType::kCHIPoBLEUnsubscribe; event.CHIPoBLESubscribe.ConId = 1; // TODO:: To be replaced by device mac address err = PlatformMgr().PostEvent(&event); } +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleTXCharCCCDWrite() failed: %s", ErrorStr(err)); + } } void BLEManagerImpl::HandleRXCharWrite(rsi_ble_event_write_t * evt) diff --git a/src/platform/silabs/rs911x/rsi_ble_config.h b/src/platform/silabs/rs911x/rsi_ble_config.h index 550e29fda03ed2..c308a391209a74 100644 --- a/src/platform/silabs/rs911x/rsi_ble_config.h +++ b/src/platform/silabs/rs911x/rsi_ble_config.h @@ -24,6 +24,12 @@ * * Macros * ******************************************************/ //! application event list +// TODO: remove this define after integration of the new wifi sdk +#ifndef RSI_FAILURE +// failure return value +#define RSI_FAILURE -1 +#endif + #define RSI_BLE_CONN_EVENT (0x01) #define RSI_BLE_DISCONN_EVENT (0x02) #define RSI_BLE_GATT_WRITE_EVENT (0x03) From 142b064517ea57a3ccf241a5f534b6536b4d9248 Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Wed, 26 Jul 2023 22:31:51 +0800 Subject: [PATCH 040/159] [OPSTATE] fix :optimize event api (#28285) * [feature]: optimize OPSTATE event api * Restyled by clang-format * optimize OPSTATE api * move the place of OPSTATE event class * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../operational-state-delegate.h | 15 --- .../operational-state-server.cpp | 96 +++++++++++++------ .../operational-state-server.h | 10 +- .../tests/TestOperationalStateDelegate.cpp | 37 ------- 4 files changed, 74 insertions(+), 84 deletions(-) diff --git a/src/app/clusters/operational-state-server/operational-state-delegate.h b/src/app/clusters/operational-state-server/operational-state-delegate.h index 6fd29bd7d48480..34bbe2d1ba10c0 100644 --- a/src/app/clusters/operational-state-server/operational-state-delegate.h +++ b/src/app/clusters/operational-state-server/operational-state-delegate.h @@ -187,21 +187,6 @@ struct GenericOperationalPhase char mPhaseNameBuffer[kOperationalPhaseNameMaxSize]; }; -/** - * A class which represents the operational completion of an Operational State cluster derivation instance. - */ -struct GenericOperationCompletion : public app::Clusters::OperationalState::Events::OperationCompletion::Type -{ - GenericOperationCompletion(uint8_t aCompletionErrorCode, - const Optional> & aTotalOperationalTime = NullOptional, - const Optional> & aPausedTime = NullOptional) - { - completionErrorCode = aCompletionErrorCode; - totalOperationalTime = aTotalOperationalTime; - pausedTime = aPausedTime; - } -}; - /** * A delegate to handle application logic of the Operational State aliased Cluster. * The delegate API assumes there will be separate delegate objects for each cluster instance. diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index a91f13d2f257a5..5fa7473f0e1641 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,55 @@ using namespace chip::app::Clusters::OperationalState::Attributes; using Status = Protocols::InteractionModel::Status; +/** + * A class which represents the operational error event of an Operational State cluster derivation instance. + */ +class GenericErrorEvent : private app::Clusters::OperationalState::Events::OperationalError::Type +{ + using super = app::Clusters::OperationalState::Events::OperationalError::Type; + +public: + GenericErrorEvent(ClusterId aClusterId, const Structs::ErrorStateStruct::Type & aError) : mClusterId(aClusterId) + { + errorState = aError; + } + using super::GetEventId; + using super::GetPriorityLevel; + ClusterId GetClusterId() const { return mClusterId; } + using super::Encode; + using super::kIsFabricScoped; + +private: + ClusterId mClusterId; +}; + +/** + * A class which represents the operational completion event of an Operational State cluster derivation instance. + */ +class GenericOperationCompletionEvent : private app::Clusters::OperationalState::Events::OperationCompletion::Type +{ + using super = app::Clusters::OperationalState::Events::OperationCompletion::Type; + +public: + GenericOperationCompletionEvent(ClusterId aClusterId, uint8_t aCompletionErrorCode, + const Optional> & aTotalOperationalTime = NullOptional, + const Optional> & aPausedTime = NullOptional) : + mClusterId(aClusterId) + { + completionErrorCode = aCompletionErrorCode; + totalOperationalTime = aTotalOperationalTime; + pausedTime = aPausedTime; + } + using super::GetEventId; + using super::GetPriorityLevel; + ClusterId GetClusterId() const { return mClusterId; } + using super::Encode; + using super::kIsFabricScoped; + +private: + ClusterId mClusterId; +}; + CHIP_ERROR OperationalStateServer::Init() { // Check if the cluster has been selected in zap @@ -302,44 +350,34 @@ CHIP_ERROR OperationalStateServer::Read(const ConcreteReadAttributePath & aPath, return CHIP_NO_ERROR; } -void OperationalStateServer::OnOperationalErrorDetect(const Structs::ErrorStateStruct::Type & aError) +void OperationalStateServer::OnOperationalErrorDetected(const Structs::ErrorStateStruct::Type & aError) { - ChipLogDetail(Zcl, "OperationalStateServer: OnOperationalErrorDetect"); - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, OperationalState::Attributes::OperationalState::Id); + ChipLogDetail(Zcl, "OperationalStateServer: OnOperationalErrorDetected"); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalState::Id); + GenericErrorEvent event(mClusterId, aError); EventNumber eventNumber; - Events::OperationalError::Type event{ aError }; - EventLogger eventData(event); - ConcreteEventPath path(mEndpointId, mClusterId, event.GetEventId()); - EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); - EventOptions eventOptions; - eventOptions.mPath = path; - eventOptions.mPriority = event.GetPriorityLevel(); - - CHIP_ERROR err = logMgmt.LogEvent(&eventData, eventOptions, eventNumber); - if (err != CHIP_NO_ERROR) + CHIP_ERROR error = app::LogEvent(event, mEndpointId, eventNumber); + + if (error != CHIP_NO_ERROR) { - ChipLogError(Zcl, "OperationalStateServer: Failed to record OperationalError event: %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(Zcl, "OperationalStateServer: Failed to record OperationalError event: %" CHIP_ERROR_FORMAT, error.Format()); } } -void OperationalStateServer::OnOperationCompletionDetect(const Events::OperationCompletion::Type & aEvent) +void OperationalStateServer::OnOperationCompletionDetected(uint8_t aCompletionErrorCode, + const Optional> & aTotalOperationalTime, + const Optional> & aPausedTime) { - ChipLogDetail(Zcl, "OperationalStateServer: OnOperationCompletionDetect"); - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, OperationalState::Attributes::OperationalState::Id); + ChipLogDetail(Zcl, "OperationalStateServer: OnOperationCompletionDetected"); + GenericOperationCompletionEvent event(mClusterId, aCompletionErrorCode, aTotalOperationalTime, aPausedTime); EventNumber eventNumber; - EventLogger eventData(aEvent); - ConcreteEventPath path(mEndpointId, mClusterId, aEvent.GetEventId()); - EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); - EventOptions eventOptions; - eventOptions.mPath = path; - eventOptions.mPriority = aEvent.GetPriorityLevel(); - - CHIP_ERROR err = logMgmt.LogEvent(&eventData, eventOptions, eventNumber); - if (err != CHIP_NO_ERROR) + CHIP_ERROR error = app::LogEvent(event, mEndpointId, eventNumber); + + if (error != CHIP_NO_ERROR) { - ChipLogError(Zcl, "OperationalStateServer: Failed to record OnOperationCompletionDetect event: %" CHIP_ERROR_FORMAT, - err.Format()); + ChipLogError(Zcl, "OperationalStateServer: Failed to record OperationCompletion event: %" CHIP_ERROR_FORMAT, + error.Format()); } } diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index 796fa4cc3640e4..5bb50d3b5df6ef 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -64,13 +64,17 @@ class OperationalStateServer : public CommandHandlerInterface, public AttributeA * @brief Called when the Node detects a OperationalError has been raised. * @param aError OperationalError which detects */ - void OnOperationalErrorDetect(const Structs::ErrorStateStruct::Type & aError); + void OnOperationalErrorDetected(const Structs::ErrorStateStruct::Type & aError); /** * @brief Called when the Node detects a OperationCompletion has been raised. - * @param aEvent OperationCompletion event + * @param aCompletionErrorCode CompletionErrorCode + * @param aTotalOperationalTime TotalOperationalTime + * @param aPausedTime PausedTime */ - void OnOperationCompletionDetect(const Events::OperationCompletion::Type & aEvent); + void OnOperationCompletionDetected(uint8_t aCompletionErrorCode, + const Optional> & aTotalOperationalTime = NullOptional, + const Optional> & aPausedTime = NullOptional); /** * Creates an operational state cluster instance. The Init() function needs to be called for this instance to be registered and diff --git a/src/app/tests/TestOperationalStateDelegate.cpp b/src/app/tests/TestOperationalStateDelegate.cpp index a4d5dce822bc8d..e82f80bbdaff84 100644 --- a/src/app/tests/TestOperationalStateDelegate.cpp +++ b/src/app/tests/TestOperationalStateDelegate.cpp @@ -542,42 +542,6 @@ void TestStructGenericOperationalPhaseCopyAssignment(nlTestSuite * inSuite, void memcmp(const_cast(phase.mPhaseName.Value().data()), phaseBuffer2, kOperationalPhaseNameMaxSize) == 0); } -void TestStructGenericOperationalCompletionConstructor(nlTestSuite * inSuite, void * inContext) -{ - using namespace chip::app; - using namespace chip::app::Clusters::OperationalState; - - // completion with only CompletionErrorCode - GenericOperationCompletion genericOperationCompletion(to_underlying(OperationalStateEnum::kError)); - NL_TEST_ASSERT(inSuite, genericOperationCompletion.completionErrorCode == to_underlying(OperationalStateEnum::kError)); - NL_TEST_ASSERT(inSuite, genericOperationCompletion.totalOperationalTime.HasValue() == false); - NL_TEST_ASSERT(inSuite, genericOperationCompletion.pausedTime.HasValue() == false); - - // completion with errorCode and TotalOperationalTime - uint32_t kTotalOperationalTime = 500; - GenericOperationCompletion genericOperationCompletion2( - to_underlying(OperationalStateEnum::kError), - Optional>(DataModel::Nullable(kTotalOperationalTime))); - NL_TEST_ASSERT(inSuite, genericOperationCompletion2.completionErrorCode == to_underlying(OperationalStateEnum::kError)); - - NL_TEST_ASSERT(inSuite, genericOperationCompletion2.totalOperationalTime.HasValue() == true); - NL_TEST_ASSERT(inSuite, genericOperationCompletion2.totalOperationalTime.Value().Value() == kTotalOperationalTime); - NL_TEST_ASSERT(inSuite, genericOperationCompletion2.pausedTime.HasValue() == false); - - // completion with errorCode, TotalOperationalTime and PausedTime - uint32_t kPausedTime = 2000; - GenericOperationCompletion genericOperationCompletion3( - to_underlying(OperationalStateEnum::kError), - Optional>(DataModel::Nullable(kTotalOperationalTime)), - Optional>(DataModel::Nullable(kPausedTime))); - NL_TEST_ASSERT(inSuite, genericOperationCompletion3.completionErrorCode == to_underlying(OperationalStateEnum::kError)); - - NL_TEST_ASSERT(inSuite, genericOperationCompletion3.totalOperationalTime.HasValue() == true); - NL_TEST_ASSERT(inSuite, genericOperationCompletion3.totalOperationalTime.Value().Value() == kTotalOperationalTime); - NL_TEST_ASSERT(inSuite, genericOperationCompletion3.pausedTime.HasValue() == true); - NL_TEST_ASSERT(inSuite, genericOperationCompletion3.pausedTime.Value().Value() == kPausedTime); -} - const nlTest sTests[] = { NL_TEST_DEF("Test struct GenericOperationalState: constructor with only StateID", TestStructGenericOperationalStateConstructorWithOnlyStateID), @@ -598,7 +562,6 @@ const nlTest sTests[] = { NL_TEST_DEF("Test struct GenericOperationalPhase: constructor", TestStructGenericOperationalPhaseConstructor), NL_TEST_DEF("Test struct GenericOperationalPhase: copy constructor", TestStructGenericOperationalPhaseCopyConstructor), NL_TEST_DEF("Test struct GenericOperationalPhase: copy assignment", TestStructGenericOperationalPhaseCopyAssignment), - NL_TEST_DEF("Test struct GenericOperationalCompletion: constructor", TestStructGenericOperationalCompletionConstructor), NL_TEST_SENTINEL() }; From 14bc386e23c8b9c9c837d383abfa95d35fe47b70 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 26 Jul 2023 10:40:11 -0400 Subject: [PATCH 041/159] Factor out secure channel type definitions into a separate static library. (#28248) This allows us to get rid of circular includes. --- src/credentials/BUILD.gn | 1 + src/lib/format/BUILD.gn | 1 + src/messaging/BUILD.gn | 1 + src/protocols/BUILD.gn | 6 +++++ src/protocols/secure_channel/BUILD.gn | 35 +++++++++++++++------------ src/setup_payload/BUILD.gn | 1 + src/transport/BUILD.gn | 1 + 7 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/credentials/BUILD.gn b/src/credentials/BUILD.gn index da66062ad93dc2..badfeaf6e4e4e7 100644 --- a/src/credentials/BUILD.gn +++ b/src/credentials/BUILD.gn @@ -92,6 +92,7 @@ static_library("credentials") { "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/platform", + "${chip_root}/src/protocols:type_definitions", "${nlassert_root}:nlassert", ] } diff --git a/src/lib/format/BUILD.gn b/src/lib/format/BUILD.gn index c75ecd084e1457..b593d88cf59d7a 100644 --- a/src/lib/format/BUILD.gn +++ b/src/lib/format/BUILD.gn @@ -64,6 +64,7 @@ source_set("protocol-decoder") { ":tlv-metadata-headers", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", + "${chip_root}/src/protocols:type_definitions", ] public_configs = [ "${chip_root}/src:includes" ] diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn index d5e51fc0f61056..3c64ef64ebd3f1 100644 --- a/src/messaging/BUILD.gn +++ b/src/messaging/BUILD.gn @@ -72,6 +72,7 @@ static_library("messaging") { "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/platform", + "${chip_root}/src/protocols/secure_channel:type_definitions", "${chip_root}/src/transport", "${chip_root}/src/transport/raw", ] diff --git a/src/protocols/BUILD.gn b/src/protocols/BUILD.gn index ed5b9dd94e3cd9..10b48fb7e46cc3 100644 --- a/src/protocols/BUILD.gn +++ b/src/protocols/BUILD.gn @@ -14,6 +14,10 @@ import("//build_overrides/chip.gni") +source_set("type_definitions") { + sources = [ "Protocols.h" ] +} + static_library("protocols") { output_name = "libChipProtocols" @@ -35,6 +39,7 @@ static_library("protocols") { public_deps = [ ":im_status", + ":type_definitions", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", @@ -52,6 +57,7 @@ static_library("im_status") { cflags = [ "-Wconversion" ] public_deps = [ + ":type_definitions", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", ] diff --git a/src/protocols/secure_channel/BUILD.gn b/src/protocols/secure_channel/BUILD.gn index 8cf46f9d334a1f..93997d0642b37f 100644 --- a/src/protocols/secure_channel/BUILD.gn +++ b/src/protocols/secure_channel/BUILD.gn @@ -1,5 +1,24 @@ import("//build_overrides/chip.gni") +static_library("type_definitions") { + output_name = "libSecureChannelTypes" + + sources = [ + "Constants.h", + "StatusReport.cpp", + "StatusReport.h", + ] + + cflags = [ "-Wconversion" ] + + public_deps = [ + "${chip_root}/src/protocols:type_definitions", + "${chip_root}/src/system", + ] + + deps = [ "${chip_root}/src/lib/support" ] +} + static_library("secure_channel") { output_name = "libSecureChannel" @@ -10,7 +29,6 @@ static_library("secure_channel") { "CASEServer.h", "CASESession.cpp", "CASESession.h", - "Constants.h", "DefaultSessionResumptionStorage.cpp", "DefaultSessionResumptionStorage.h", "PASESession.cpp", @@ -24,8 +42,6 @@ static_library("secure_channel") { "SessionResumptionStorage.h", "SimpleSessionResumptionStorage.cpp", "SimpleSessionResumptionStorage.h", - "StatusReport.cpp", - "StatusReport.h", "UnsolicitedStatusHandler.cpp", "UnsolicitedStatusHandler.h", ] @@ -33,6 +49,7 @@ static_library("secure_channel") { cflags = [ "-Wconversion" ] public_deps = [ + ":type_definitions", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", @@ -41,16 +58,4 @@ static_library("secure_channel") { "${chip_root}/src/tracing:macros", "${chip_root}/src/transport", ] - - # secure channel requires messaging so it can send messages (e.g. for - # CASE/PASE handshakes). messaging requires secure channel so that it can do - # things like send standalone acks, which are a secure channel concept. - # - # secure channel requires transport so it can deal with sessions. transport - # requires secure channel so it can detect control messages, which are a - # secure channel concept. - allow_circular_includes_from = [ - "${chip_root}/src/messaging", - "${chip_root}/src/transport", - ] } diff --git a/src/setup_payload/BUILD.gn b/src/setup_payload/BUILD.gn index 42fb1c848a0e3b..30b97ceca74349 100644 --- a/src/setup_payload/BUILD.gn +++ b/src/setup_payload/BUILD.gn @@ -42,6 +42,7 @@ source_set("additional_data_payload") { "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", + "${chip_root}/src/protocols:type_definitions", "${chip_root}/src/setup_payload:additional_data_payload_buildconfig", ] } diff --git a/src/transport/BUILD.gn b/src/transport/BUILD.gn index 66f19b95e223bd..f1f7ef534322a7 100644 --- a/src/transport/BUILD.gn +++ b/src/transport/BUILD.gn @@ -64,6 +64,7 @@ static_library("transport") { "${chip_root}/src/lib/dnssd", "${chip_root}/src/lib/support", "${chip_root}/src/platform", + "${chip_root}/src/protocols/secure_channel:type_definitions", "${chip_root}/src/setup_payload", "${chip_root}/src/tracing", "${chip_root}/src/tracing:macros", From 5268655b66b658d40ed2b4f31307cf0ca0cf7e03 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 26 Jul 2023 10:40:32 -0400 Subject: [PATCH 042/159] Make sure we clean up properly if StartWatchingSocket fails. (#28245) If StartWatchingSocket failed (e.g. due to us being out of socket watch pool space), we would leave the UDPEndPointImplSockets in a bad state where its destructor would try to treat the un-initialized mWatch value as a pointer. The fix is to make sure we clean up properly on StartWatchingSocket failure. --- src/inet/UDPEndPointImplSockets.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/inet/UDPEndPointImplSockets.cpp b/src/inet/UDPEndPointImplSockets.cpp index 5c9748d0cf32fb..b681a56fabe92f 100644 --- a/src/inet/UDPEndPointImplSockets.cpp +++ b/src/inet/UDPEndPointImplSockets.cpp @@ -469,7 +469,14 @@ CHIP_ERROR UDPEndPointImplSockets::GetSocket(IPAddressType addressType) { return CHIP_ERROR_POSIX(errno); } - ReturnErrorOnFailure(static_cast(&GetSystemLayer())->StartWatchingSocket(mSocket, &mWatch)); + CHIP_ERROR err = static_cast(&GetSystemLayer())->StartWatchingSocket(mSocket, &mWatch); + if (err != CHIP_NO_ERROR) + { + // Our mWatch is not valid; make sure we never use it. + close(mSocket); + mSocket = kInvalidSocketFd; + return err; + } mAddrType = addressType; From 3e5c9992ae43be001ab649d778286050fbdedb01 Mon Sep 17 00:00:00 2001 From: Misha Tkachenko <36621698+mishadesh@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:07:59 +0300 Subject: [PATCH 043/159] [Telink]: Replaced manual bootloader configuration by conf file (#28260) Replaced manual definition-based overlays by conf file Signed-off-by: Misha Tkachenko Co-authored-by: Alex Tsitsiura --- config/telink/app/bootloader.conf | 30 ++++++++++++++++++++++++ config/telink/chip-module/CMakeLists.txt | 8 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 config/telink/app/bootloader.conf diff --git a/config/telink/app/bootloader.conf b/config/telink/app/bootloader.conf new file mode 100644 index 00000000000000..5fb0182690cdaa --- /dev/null +++ b/config/telink/app/bootloader.conf @@ -0,0 +1,30 @@ +# +# 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. +# + +# Enable this option in case if restoring the slot0 partition is expected from slot1 +# partition in case if slot0 is not bootable or damaged +CONFIG_BOOT_BOOTSTRAP=n + +# Enable this option in case if SWAP_MOVE logic need to be used +CONFIG_BOOT_SWAP_USING_MOVE=y + +# Enable this option in case if SWAP_MOVE using scratch logic need to be used +# Enabling this option expecting the availability of scratch partition in DTS +CONFIG_BOOT_SWAP_USING_SCRATCH=n + +# Enable this option in case if the whole slot0 image need to be validated +# With disabled option the only image magic is validated +CONFIG_BOOT_VALIDATE_SLOT0=y diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index 8ff944fd1bfba2..26f0d58612abe8 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -143,11 +143,17 @@ else() unset(GLOBAL_DTC_OVERLAY_FILE) endif() +if(EXISTS "${CHIP_ROOT}/config/telink/app/bootloader.conf") + set(GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/telink/app/bootloader.conf") +else() + unset(GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE) +endif() + if (CONFIG_CHIP_OTA_IMAGE_BUILD) add_custom_target(build_mcuboot ALL COMMAND west build -b ${BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr - -- -DCONFIG_BOOT_SWAP_USING_MOVE=y -DDTC_OVERLAY_FILE=${GLOBAL_DTC_OVERLAY_FILE} + -- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE=${GLOBAL_DTC_OVERLAY_FILE} ) add_custom_target(merge_mcuboot ALL From ba05087325b03525ddad46d7cf815a014e83a85d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 26 Jul 2023 12:35:12 -0400 Subject: [PATCH 044/159] Update more build configs to c++17. (#28296) --- config/telink/app/zephyr.conf | 2 +- examples/all-clusters-app/nrfconnect/prj.conf | 2 +- examples/all-clusters-app/nrfconnect/prj_dfu.conf | 2 +- examples/all-clusters-app/nrfconnect/prj_release.conf | 2 +- examples/all-clusters-minimal-app/nrfconnect/prj.conf | 2 +- examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf | 2 +- examples/all-clusters-minimal-app/nrfconnect/prj_release.conf | 2 +- examples/bridge-app/esp32/main/CMakeLists.txt | 2 +- examples/chef/nrfconnect/prj.conf | 2 +- examples/light-switch-app/nrfconnect/prj.conf | 2 +- examples/light-switch-app/nrfconnect/prj_no_dfu.conf | 2 +- examples/light-switch-app/nrfconnect/prj_release.conf | 2 +- examples/lighting-app/nrfconnect/prj.conf | 2 +- examples/lighting-app/nrfconnect/prj_no_dfu.conf | 2 +- examples/lighting-app/nrfconnect/prj_release.conf | 2 +- examples/lock-app/nrfconnect/prj.conf | 2 +- examples/lock-app/nrfconnect/prj_no_dfu.conf | 2 +- examples/lock-app/nrfconnect/prj_release.conf | 2 +- examples/ota-provider-app/esp32/main/CMakeLists.txt | 2 +- examples/persistent-storage/esp32/main/CMakeLists.txt | 2 +- examples/pump-app/nrfconnect/prj.conf | 2 +- examples/pump-app/nrfconnect/prj_no_dfu.conf | 2 +- examples/pump-app/nrfconnect/prj_release.conf | 2 +- examples/pump-controller-app/nrfconnect/prj.conf | 2 +- examples/pump-controller-app/nrfconnect/prj_no_dfu.conf | 2 +- examples/pump-controller-app/nrfconnect/prj_release.conf | 2 +- examples/shell/nrfconnect/prj.conf | 2 +- examples/window-app/nrfconnect/prj.conf | 2 +- examples/window-app/nrfconnect/prj_no_dfu.conf | 2 +- examples/window-app/nrfconnect/prj_release.conf | 2 +- src/test_driver/nrfconnect/prj.conf | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index e7a211be69bd70..6948ce36b083d3 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -15,7 +15,7 @@ # CONFIG_CHIP=y -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Logging (set CONFIG_SERIAL to 'y' to enable logging and 'n' to disable logging) CONFIG_SERIAL=y diff --git a/examples/all-clusters-app/nrfconnect/prj.conf b/examples/all-clusters-app/nrfconnect/prj.conf index 51d5dd89c68a5f..527fae10089448 100644 --- a/examples/all-clusters-app/nrfconnect/prj.conf +++ b/examples/all-clusters-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # CHIP PID: 32769 == 0x8001 (all-clusters-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/prj_dfu.conf index c0d47e635ed406..e57438bf5c1aa5 100644 --- a/examples/all-clusters-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-app/nrfconnect/prj_dfu.conf @@ -22,7 +22,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # CHIP PID: 32769 == 0x8001 (all-clusters-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-app/nrfconnect/prj_release.conf b/examples/all-clusters-app/nrfconnect/prj_release.conf index b229f68b308b9d..fee661a740cccb 100644 --- a/examples/all-clusters-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # CHIP PID: 32769 == 0x8001 (all-clusters-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj.conf b/examples/all-clusters-minimal-app/nrfconnect/prj.conf index c33baaa8d79761..e1613a896fd6d8 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # CHIP PID: 32769 == 0x8001 (all-clusters-app-minimal) CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf index 6effabf6914a9b..a96c97d2517580 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # CHIP PID: 32769 == 0x8001 (all-clusters-minimal-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf index 8029f55a1e31f4..7f64115af32736 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # CHIP PID: 32769 == 0x8001 (all-clusters-app-minimal) CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/bridge-app/esp32/main/CMakeLists.txt b/examples/bridge-app/esp32/main/CMakeLists.txt index 432ce5a2dfe6cb..e2250f001799b5 100644 --- a/examples/bridge-app/esp32/main/CMakeLists.txt +++ b/examples/bridge-app/esp32/main/CMakeLists.txt @@ -58,7 +58,7 @@ include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake") chip_app_component_codegen("${CHIP_ROOT}/examples/bridge-app/bridge-common/bridge-app.matter") chip_app_component_zapgen("${CHIP_ROOT}/examples/bridge-app/bridge-common/bridge-app.zap") -set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" diff --git a/examples/chef/nrfconnect/prj.conf b/examples/chef/nrfconnect/prj.conf index 2f2fc49501d231..03c7e188675c95 100644 --- a/examples/chef/nrfconnect/prj.conf +++ b/examples/chef/nrfconnect/prj.conf @@ -15,7 +15,7 @@ # CONFIG_CHIP=y -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # This sample uses Kconfig.defaults to set options common for all # samples. This file should contain only options specific for this sample diff --git a/examples/light-switch-app/nrfconnect/prj.conf b/examples/light-switch-app/nrfconnect/prj.conf index 23fa257975fe64..726846ae48cee5 100644 --- a/examples/light-switch-app/nrfconnect/prj.conf +++ b/examples/light-switch-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32772 == 0x8004 (example light-switch-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32772 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/light-switch-app/nrfconnect/prj_no_dfu.conf b/examples/light-switch-app/nrfconnect/prj_no_dfu.conf index 145cb9b50f835e..df884ba56d4300 100644 --- a/examples/light-switch-app/nrfconnect/prj_no_dfu.conf +++ b/examples/light-switch-app/nrfconnect/prj_no_dfu.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32772 == 0x8004 (example light-switch-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32772 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/light-switch-app/nrfconnect/prj_release.conf b/examples/light-switch-app/nrfconnect/prj_release.conf index 520a280b1e18ab..e033650db1d427 100644 --- a/examples/light-switch-app/nrfconnect/prj_release.conf +++ b/examples/light-switch-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32772 == 0x8004 (example light-switch-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32772 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/lighting-app/nrfconnect/prj.conf b/examples/lighting-app/nrfconnect/prj.conf index ad67f13edf08e3..3419b5b0fc7087 100644 --- a/examples/lighting-app/nrfconnect/prj.conf +++ b/examples/lighting-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32773 == 0x8005 (example lighting-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Enable CHIP pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y diff --git a/examples/lighting-app/nrfconnect/prj_no_dfu.conf b/examples/lighting-app/nrfconnect/prj_no_dfu.conf index a2d0392c98b5a9..22cdc2b700ee9f 100644 --- a/examples/lighting-app/nrfconnect/prj_no_dfu.conf +++ b/examples/lighting-app/nrfconnect/prj_no_dfu.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32773 == 0x8005 (example lighting-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Enable CHIP pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y diff --git a/examples/lighting-app/nrfconnect/prj_release.conf b/examples/lighting-app/nrfconnect/prj_release.conf index 762b6d44f919c7..1977239abf0d4b 100644 --- a/examples/lighting-app/nrfconnect/prj_release.conf +++ b/examples/lighting-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32773 == 0x8005 (example lighting-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Enable CHIP pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y diff --git a/examples/lock-app/nrfconnect/prj.conf b/examples/lock-app/nrfconnect/prj.conf index 6b4864a2a486b7..3216fbc3190af9 100644 --- a/examples/lock-app/nrfconnect/prj.conf +++ b/examples/lock-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32774 == 0x8006 (example lock-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32774 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/lock-app/nrfconnect/prj_no_dfu.conf b/examples/lock-app/nrfconnect/prj_no_dfu.conf index a53431aa2dd9d7..68cd0ea04a0923 100644 --- a/examples/lock-app/nrfconnect/prj_no_dfu.conf +++ b/examples/lock-app/nrfconnect/prj_no_dfu.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32774 == 0x8006 (example lock-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32774 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/lock-app/nrfconnect/prj_release.conf b/examples/lock-app/nrfconnect/prj_release.conf index ba830806523ded..6f0c11ba41dd18 100644 --- a/examples/lock-app/nrfconnect/prj_release.conf +++ b/examples/lock-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32774 == 0x8006 (example lock-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32774 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/ota-provider-app/esp32/main/CMakeLists.txt b/examples/ota-provider-app/esp32/main/CMakeLists.txt index 2572149172141a..a63033f017d8b2 100644 --- a/examples/ota-provider-app/esp32/main/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/main/CMakeLists.txt @@ -62,7 +62,7 @@ chip_app_component_codegen("${CHIP_ROOT}/examples/ota-provider-app/ota-provider- chip_app_component_zapgen("${CHIP_ROOT}/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap") spiffs_create_partition_image(img_storage ${CMAKE_SOURCE_DIR}/spiffs_image FLASH_IN_PROJECT) -set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" diff --git a/examples/persistent-storage/esp32/main/CMakeLists.txt b/examples/persistent-storage/esp32/main/CMakeLists.txt index 2697a55dd39171..30c85accfbe36d 100644 --- a/examples/persistent-storage/esp32/main/CMakeLists.txt +++ b/examples/persistent-storage/esp32/main/CMakeLists.txt @@ -23,5 +23,5 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/persistent-storage" PRIV_REQUIRES chip nvs_flash) -set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") diff --git a/examples/pump-app/nrfconnect/prj.conf b/examples/pump-app/nrfconnect/prj.conf index 3013e7d7aec421..008a66be940be3 100644 --- a/examples/pump-app/nrfconnect/prj.conf +++ b/examples/pump-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32784 == 0x8010 (example pump-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-app/nrfconnect/prj_no_dfu.conf b/examples/pump-app/nrfconnect/prj_no_dfu.conf index a0d3f8b1a879c2..21cd8222c2c2e2 100644 --- a/examples/pump-app/nrfconnect/prj_no_dfu.conf +++ b/examples/pump-app/nrfconnect/prj_no_dfu.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32784 == 0x8010 (example pump-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-app/nrfconnect/prj_release.conf b/examples/pump-app/nrfconnect/prj_release.conf index 540c77354fa82f..fbcfe2fe16545e 100644 --- a/examples/pump-app/nrfconnect/prj_release.conf +++ b/examples/pump-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32784 == 0x8010 (example pump-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-controller-app/nrfconnect/prj.conf b/examples/pump-controller-app/nrfconnect/prj.conf index 5b9c2baff8ee9e..f8774b9f2f0f4b 100644 --- a/examples/pump-controller-app/nrfconnect/prj.conf +++ b/examples/pump-controller-app/nrfconnect/prj.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32785 == 0x8011 (example pump-controller-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32785 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf index d6632fe9172638..f4b60e647953ae 100644 --- a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf +++ b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf @@ -24,7 +24,7 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32785 == 0x8011 (example pump-controller-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32785 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-controller-app/nrfconnect/prj_release.conf b/examples/pump-controller-app/nrfconnect/prj_release.conf index fc3b092b655c8f..bd9e21dae49b03 100644 --- a/examples/pump-controller-app/nrfconnect/prj_release.conf +++ b/examples/pump-controller-app/nrfconnect/prj_release.conf @@ -24,7 +24,7 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32785 == 0x8011 (example pump-controller-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32785 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/shell/nrfconnect/prj.conf b/examples/shell/nrfconnect/prj.conf index c00eacaa34c0ae..4c8a3c2c95c58e 100644 --- a/examples/shell/nrfconnect/prj.conf +++ b/examples/shell/nrfconnect/prj.conf @@ -15,7 +15,7 @@ # CONFIG_CHIP=y -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # This sample uses Kconfig.defaults to set options common for all # samples. This file should contain only options specific for this sample diff --git a/examples/window-app/nrfconnect/prj.conf b/examples/window-app/nrfconnect/prj.conf index 0f941b5aa1e6e8..052d3fbe841572 100644 --- a/examples/window-app/nrfconnect/prj.conf +++ b/examples/window-app/nrfconnect/prj.conf @@ -19,7 +19,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32784 == 0x8010 (example window-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/window-app/nrfconnect/prj_no_dfu.conf b/examples/window-app/nrfconnect/prj_no_dfu.conf index b6caf7b75454e1..3183a0e518ac47 100644 --- a/examples/window-app/nrfconnect/prj_no_dfu.conf +++ b/examples/window-app/nrfconnect/prj_no_dfu.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32784 == 0x8010 (example window-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/window-app/nrfconnect/prj_release.conf b/examples/window-app/nrfconnect/prj_release.conf index bcf59cd9e35879..f2393649c1fe0c 100644 --- a/examples/window-app/nrfconnect/prj_release.conf +++ b/examples/window-app/nrfconnect/prj_release.conf @@ -23,7 +23,7 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" # 32784 == 0x8010 (example window-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/src/test_driver/nrfconnect/prj.conf b/src/test_driver/nrfconnect/prj.conf index f70a0d95063dc9..134b2abe55c7d7 100644 --- a/src/test_driver/nrfconnect/prj.conf +++ b/src/test_driver/nrfconnect/prj.conf @@ -84,7 +84,7 @@ CONFIG_INIT_STACKS=y CONFIG_REBOOT=n # Build as C++14 -CONFIG_STD_CPP14=y +CONFIG_STD_CPP17=y # CHIP configuration CONFIG_CHIP=y From a29c1316c4941ac7cfc4c394230de93dc944fe73 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 26 Jul 2023 13:13:45 -0400 Subject: [PATCH 045/159] Do not consider template a real device type for chef (#28303) --- examples/chef/chef.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 977d2775ef0ba3..aa594aef4c39fa 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -37,7 +37,7 @@ _REPO_BASE_PATH = os.path.join(_CHEF_SCRIPT_PATH, "../../") _DEVICE_FOLDER = os.path.join(_CHEF_SCRIPT_PATH, "devices") _DEVICE_LIST = [file[:-4] - for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap")] + for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap") and file != 'template.zap'] _CICD_CONFIG_FILE_NAME = os.path.join(_CHEF_SCRIPT_PATH, "cicd_config.json") _CD_STAGING_DIR = os.path.join(_CHEF_SCRIPT_PATH, "staging") From 7ab043c2082e073ed7f1d793ef04f0bee13b03d4 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Wed, 26 Jul 2023 13:21:05 -0400 Subject: [PATCH 046/159] [ICD]Move a trace that was being spammed in low active/idle interval. (#28292) * Move a trace that was being spammed in low active/idle interval. Now only reported on ICD mode update calls * add define to enable enforcing the SIT slow polling upper limit * Update src/app/icd/ICDManager.cpp Co-authored-by: Boris Zbarsky --------- Co-authored-by: Boris Zbarsky --- src/app/icd/ICDManager.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index f400a7e5801087..853fd044d36732 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -28,6 +28,11 @@ #include #include +#ifndef ICD_ENFORCE_SIT_SLOW_POLL_LIMIT +// Set to 1 to enforce SIT Slow Polling Max value to 15seconds (spec 9.16.1.5) +#define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0 +#endif + namespace chip { namespace app { @@ -93,6 +98,13 @@ void ICDManager::UpdateIcdMode() } } mICDMode = tempMode; + + // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. + if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold()) + { + ChipLogDetail(AppServer, "The Slow Polling Interval of an ICD in SIT mode should be <= %" PRIu32 " seconds", + (GetSITPollingThreshold().count() / 1000)); + } } void ICDManager::UpdateOperationState(OperationalState state) @@ -108,14 +120,14 @@ void ICDManager::UpdateOperationState(OperationalState state) DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(idleModeInterval), OnIdleModeDone, this); System::Clock::Milliseconds32 slowPollInterval = GetSlowPollingInterval(); + +#if ICD_ENFORCE_SIT_SLOW_POLL_LIMIT // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. - if (mICDMode == ICDMode::SIT && slowPollInterval > GetSITPollingThreshold()) + if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold()) { - ChipLogDetail(AppServer, "The Slow Polling Interval of an ICD in SIT mode should be <= %" PRIu32, - (GetSITPollingThreshold().count() / 1000)); - // TODO Spec to define this conformance as a SHALL - // slowPollInterval = GetSITPollingThreshold(); + slowPollInterval = GetSITPollingThreshold(); } +#endif CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(slowPollInterval); if (err != CHIP_NO_ERROR) From 832fbeafa7d058f90723b634851446aee6bb5841 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:20:57 -0400 Subject: [PATCH 047/159] update labeler (#28308) --- .github/labeler.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1062287b335043..31e310088a0a0b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -148,6 +148,10 @@ app: - src/app/* - src/app/**/* +icd: + - src/app/icd/* + - src/app/icd/**/* + transport: - src/transport/* - src/transport/**/* @@ -185,9 +189,9 @@ darwin: - examples/darwin-framework-tool/* - examples/darwin-framework-tool/**/* -efr32: - - src/platform/efr32/* - - src/platform/efr32/**/* +silabs: + - src/platform/silabs/* + - src/platform/silabs/**/* esp32: - src/platform/ESP32/* From dee360e856231eebc51acb3cb8c164e0b5e56894 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 26 Jul 2023 19:32:50 -0400 Subject: [PATCH 048/159] CommissioningWindowManager should only listen for platform events when a commissioning window is open. (#28311) Right now, a CommissioningWindowManager starts listening for platform events if a commissioning window is opened, and then never stops. That means it can end up reacting to fail-safe expirations that have nothing to do with a commissioning window (e.g. CASE updates of state that needs a fail-safe). The fix is to not listen for platform events if the commissioning window is closed. --- src/app/server/CommissioningWindowManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index b8fb6a54e6e629..c6287ab119e67d 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -129,6 +129,8 @@ void CommissioningWindowManager::ResetState() DeviceLayer::SystemLayer().CancelTimer(HandleCommissioningWindowTimeout, this); mCommissioningTimeoutTimerArmed = false; + + DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEventWrapper, reinterpret_cast(this)); } void CommissioningWindowManager::Cleanup() From d8aaa7ca7512f62cb750c8a1deb262565367be8d Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:48:01 -0700 Subject: [PATCH 049/159] AppDelegate updates: new callback and docs (#28240) * Adding OnCommissioningSessionEstablishmentError(err) to AppDelegate * Removed error param from OnCommissioningSessionStopped and added docs for all of AppDelegate * Addressing feedback from tcarmelveilleux@ * Revert "Addressing feedback from tcarmelveilleux@" This reverts commit 494bbc9161c00681effa8c19f02c4ea5154c3cab. * Addressing feedback from bzbarsky-apple@ * Update src/app/server/AppDelegate.h Co-authored-by: Boris Zbarsky * Restyled --------- Co-authored-by: Boris Zbarsky --- examples/all-clusters-app/esp32/main/main.cpp | 2 +- .../esp32/main/main.cpp | 2 +- .../telink/common/src/AppTaskCommon.cpp | 2 +- src/app/server/AppDelegate.h | 29 +++++++++++++++++-- src/app/server/CommissioningWindowManager.cpp | 9 +++++- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index 83d6abc102701f..ecca799c81d07b 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -87,7 +87,7 @@ class AppCallbacks : public AppDelegate public: void OnCommissioningSessionEstablishmentStarted() {} void OnCommissioningSessionStarted() override { bluetoothLED.Set(true); } - void OnCommissioningSessionStopped(CHIP_ERROR err) override + void OnCommissioningSessionStopped() override { bluetoothLED.Set(false); pairingWindowLED.Set(false); diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index 43c6faa51a2972..a673a706291a58 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -86,7 +86,7 @@ class AppCallbacks : public AppDelegate public: void OnCommissioningSessionEstablishmentStarted() {} void OnCommissioningSessionStarted() override { bluetoothLED.Set(true); } - void OnCommissioningSessionStopped(CHIP_ERROR err) override + void OnCommissioningSessionStopped() override { bluetoothLED.Set(false); pairingWindowLED.Set(false); diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index cd9fe12a60a0bc..a13e84ca527cad 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -140,7 +140,7 @@ class AppCallbacks : public AppDelegate public: void OnCommissioningSessionEstablishmentStarted() {} void OnCommissioningSessionStarted() override { isComissioningStarted = true; } - void OnCommissioningSessionStopped(CHIP_ERROR err) override { isComissioningStarted = false; } + void OnCommissioningSessionStopped() override { isComissioningStarted = false; } void OnCommissioningWindowClosed() override { if (!isComissioningStarted) diff --git a/src/app/server/AppDelegate.h b/src/app/server/AppDelegate.h index 24dcf2e3a92ec5..78aafd578ecb75 100644 --- a/src/app/server/AppDelegate.h +++ b/src/app/server/AppDelegate.h @@ -29,14 +29,33 @@ class AppDelegate public: virtual ~AppDelegate() {} /** - * This is called on start of session establishment process + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process */ virtual void OnCommissioningSessionEstablishmentStarted() {} + + /** + * This is called when the commissioning session has been established + */ virtual void OnCommissioningSessionStarted() {} - virtual void OnCommissioningSessionStopped(CHIP_ERROR err) {} + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner) + * + * @param err CHIP_ERROR indicating the error that occurred during session establishment or the error accompanying the fail-safe + * timeout. + */ + virtual void OnCommissioningSessionEstablishmentError(CHIP_ERROR err) {} + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ + virtual void OnCommissioningSessionStopped() {} /* - * This is called anytime a basic or enhanced commissioning window is opened. + * This is called any time a basic or enhanced commissioning window is opened. * * The type of the window can be retrieved by calling * CommissioningWindowManager::CommissioningWindowStatusForCluster(), but @@ -44,5 +63,9 @@ class AppDelegate * fact open. */ virtual void OnCommissioningWindowOpened() {} + + /* + * This is called any time a basic or enhanced commissioning window is closed. + */ virtual void OnCommissioningWindowClosed() {} }; diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index c6287ab119e67d..a8c6fe1cea462c 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -152,6 +152,8 @@ void CommissioningWindowManager::HandleFailedAttempt(CHIP_ERROR err) #if CONFIG_NETWORK_LAYER_BLE mServer->GetBleLayerObject()->CloseAllBleConnections(); #endif + + CHIP_ERROR prevErr = err; if (mFailedCommissioningAttempts < kMaxFailedCommissioningAttempts) { // If the number of commissioning attempts has not exceeded maximum @@ -159,6 +161,11 @@ void CommissioningWindowManager::HandleFailedAttempt(CHIP_ERROR err) err = AdvertiseAndListenForPASE(); } + if (mAppDelegate != nullptr) + { + mAppDelegate->OnCommissioningSessionEstablishmentError(prevErr); + } + if (err != CHIP_NO_ERROR) { // The commissioning attempts limit was exceeded, or listening for @@ -167,7 +174,7 @@ void CommissioningWindowManager::HandleFailedAttempt(CHIP_ERROR err) if (mAppDelegate != nullptr) { - mAppDelegate->OnCommissioningSessionStopped(err); + mAppDelegate->OnCommissioningSessionStopped(); } } } From 386cc5eb38c6fdc9229f97eb1e1347f73895ad3e Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:17:44 -0400 Subject: [PATCH 050/159] Bugfix Silabs LockApp (#28310) * Updated emberAF callbacks to match the door-lock-server callbacks signatures and added Unbolt function * Fix comment grammar --- .../lock-app/silabs/include/LockManager.h | 1 + examples/lock-app/silabs/src/LockManager.cpp | 5 +++++ examples/lock-app/silabs/src/ZclCallbacks.cpp | 20 +++++++++++++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/examples/lock-app/silabs/include/LockManager.h b/examples/lock-app/silabs/include/LockManager.h index fcc03abdce0f5d..901dfdbd06cb04 100644 --- a/examples/lock-app/silabs/include/LockManager.h +++ b/examples/lock-app/silabs/include/LockManager.h @@ -145,6 +145,7 @@ class LockManager bool Lock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err); bool Unlock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err); + bool Unbolt(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err); bool GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user); bool SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, diff --git a/examples/lock-app/silabs/src/LockManager.cpp b/examples/lock-app/silabs/src/LockManager.cpp index b66fca8ec874e6..f3c6dfe748ca35 100644 --- a/examples/lock-app/silabs/src/LockManager.cpp +++ b/examples/lock-app/silabs/src/LockManager.cpp @@ -298,6 +298,11 @@ bool LockManager::Unlock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err) +{ + return setLockState(endpointId, DlLockState::kUnlocked, pin, err); +} + bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) { VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed diff --git a/examples/lock-app/silabs/src/ZclCallbacks.cpp b/examples/lock-app/silabs/src/ZclCallbacks.cpp index 778637e250a5a5..f0316cb78fe8fc 100644 --- a/examples/lock-app/silabs/src/ZclCallbacks.cpp +++ b/examples/lock-app/silabs/src/ZclCallbacks.cpp @@ -58,7 +58,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) {} -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -70,7 +71,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); @@ -82,6 +84,20 @@ bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const return status; } +// TODO : Add helper function to call from the Unlock command if we establish Unbolt doesn't need a different behaviour than Unlock +bool emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + ChipLogProgress(Zcl, "Door Lock App: Unbolt Command endpoint=%d", endpointId); + bool status = LockMgr().Unlock(endpointId, pinCode, err); + if (status == true) + { + LockMgr().InitiateAction(AppEvent::kEventType_Lock, LockManager::UNLOCK_ACTION); + } + + return status; +} bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, EmberAfPluginDoorLockCredentialInfo & credential) From 426be9666c460e2a26ab78de72f5c212cf6374f3 Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:48:59 -0700 Subject: [PATCH 051/159] Reset the downloadedBytes and totalFileBytes in the OTAImageProgress params to 0 when we prepare for download for BDX (#28309) --- src/platform/Linux/OTAImageProcessorImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 4b6695f1fe7d13..4647a0df69fba0 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -127,6 +127,8 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) unlink(imageProcessor->mImageFile); + imageProcessor->mParams.downloadedBytes = 0; + imageProcessor->mParams.totalFileBytes = 0; imageProcessor->mHeaderParser.Init(); imageProcessor->mOfs.open(imageProcessor->mImageFile, std::ofstream::out | std::ofstream::ate | std::ofstream::app); if (!imageProcessor->mOfs.good()) From d2b1ea8c838e638331483ff98d651d83ba5cf887 Mon Sep 17 00:00:00 2001 From: Cliff Chung <116232729+cliffamzn@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:26:12 -0700 Subject: [PATCH 052/159] Modifying ReplacementProductListManager to be generic (#28185) * Modifying ReplacementProductListManager to be generic Addressing feedback from PR #28095 and also addressing #28148 This change simplifies the implementation of the ReplacementProductList and also introduces a DynamicReplacementProductList example which better represents devices fetching this product list from flash. It includes some simplifications to the structure of the code and a few additional unit tests to exercise the behavior. Tested to ensure functionality still works as expected using the all-clusters-app as well as the resource-monitoring-app --- .../include/resource-monitoring-instances.h | 20 +- .../src/resource-monitoring-instances.cpp | 53 ++-- examples/placeholder/linux/apps/app1/BUILD.gn | 1 + examples/placeholder/linux/apps/app2/BUILD.gn | 1 + .../include/resource-monitoring-instances.h | 63 ++++ .../linux/resource-monitoring-instances.cpp | 133 ++++++++ .../resource-monitoring-app/linux/BUILD.gn | 2 +- .../ImmutableReplacementProductListManager.h | 44 +++ .../StaticReplacementProductListManager.h | 9 +- .../src/ReplacementProductListManager.cpp | 77 +++++ .../StaticReplacementProductListManager.cpp | 38 --- .../ActivatedCarbonFilterMonitoring.cpp | 18 +- .../src/instances/HepafilterMonitoring.cpp | 18 +- .../replacement-product-list-manager.h | 17 +- .../resource-monitoring-cluster-objects.cpp | 16 - .../resource-monitoring-cluster-objects.h | 107 ++++--- .../resource-monitoring-server.cpp | 19 +- .../TestActivatedCarbonFilterMonitoring.yaml | 57 ++++ .../suites/TestHepaFilterMonitoring.yaml | 57 ++++ src/app/tests/suites/ciTests.json | 2 + .../chip-tool/zap-generated/test/Commands.h | 234 ++++++++++++++ .../zap-generated/test/Commands.h | 293 ++++++++++++++++++ 22 files changed, 1108 insertions(+), 171 deletions(-) create mode 100644 examples/placeholder/linux/include/resource-monitoring-instances.h create mode 100644 examples/placeholder/linux/resource-monitoring-instances.cpp create mode 100644 examples/resource-monitoring-app/resource-monitoring-common/include/ImmutableReplacementProductListManager.h create mode 100644 examples/resource-monitoring-app/resource-monitoring-common/src/ReplacementProductListManager.cpp delete mode 100644 examples/resource-monitoring-app/resource-monitoring-common/src/StaticReplacementProductListManager.cpp create mode 100644 src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml create mode 100644 src/app/tests/suites/TestHepaFilterMonitoring.yaml diff --git a/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h b/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h index c12a686735abba..276e423626c1d7 100644 --- a/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h +++ b/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h @@ -55,23 +55,9 @@ class HepaFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitor aResetConditionCommandSupported){}; }; -class StaticReplacementProductListManager : public chip::app::Clusters::ResourceMonitoring::ReplacementProductListManager +class ImmutableReplacementProductListManager : public chip::app::Clusters::ResourceMonitoring::ReplacementProductListManager { public: - uint8_t Size() override { return mReplacementProductListSize; }; - - CHIP_ERROR Next(chip::app::Clusters::ResourceMonitoring::Attributes::ReplacementProductStruct::Type & item) override; - - ~StaticReplacementProductListManager() {} - StaticReplacementProductListManager( - chip::app::Clusters::ResourceMonitoring::Attributes::ReplacementProductStruct::Type * aReplacementProductsList, - uint8_t aReplacementProductListSize) - { - mReplacementProductsList = aReplacementProductsList; - mReplacementProductListSize = aReplacementProductListSize; - } - -private: - chip::app::Clusters::ResourceMonitoring::Attributes::ReplacementProductStruct::Type * mReplacementProductsList; - uint8_t mReplacementProductListSize; + CHIP_ERROR + Next(chip::app::Clusters::ResourceMonitoring::ReplacementProductStruct & item) override; }; diff --git a/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp b/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp index de7b46d26d1c1a..dc4283539b437b 100644 --- a/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp @@ -36,20 +36,7 @@ constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Featu static HepaFilterMonitoringInstance * gHepaFilterInstance = nullptr; static ActivatedCarbonFilterMonitoringInstance * gActivatedCarbonFilterInstance = nullptr; - -static ResourceMonitoring::Attributes::ReplacementProductStruct::Type sReplacementProductsList[] = { - { .productIdentifierType = ProductIdentifierTypeEnum::kUpc, - .productIdentifierValue = CharSpan::fromCharString("111112222233") }, - { .productIdentifierType = ProductIdentifierTypeEnum::kGtin8, .productIdentifierValue = CharSpan::fromCharString("gtin8xxx") }, - { .productIdentifierType = ProductIdentifierTypeEnum::kEan, - .productIdentifierValue = CharSpan::fromCharString("4444455555666") }, - { .productIdentifierType = ProductIdentifierTypeEnum::kGtin14, - .productIdentifierValue = CharSpan::fromCharString("gtin14xxxxxxxx") }, - { .productIdentifierType = ProductIdentifierTypeEnum::kOem, - .productIdentifierValue = CharSpan::fromCharString("oem20xxxxxxxxxxxxxxx") }, -}; -StaticReplacementProductListManager sReplacementProductListManager(&sReplacementProductsList[0], - ArraySize(sReplacementProductsList)); +static ImmutableReplacementProductListManager sReplacementProductListManager; //-- Activated Carbon Filter Monitoring Instance methods CHIP_ERROR ActivatedCarbonFilterMonitoringInstance::AppInit() @@ -106,14 +93,40 @@ void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) gHepaFilterInstance->Init(); } -CHIP_ERROR StaticReplacementProductListManager::Next(Attributes::ReplacementProductStruct::Type & item) +CHIP_ERROR ImmutableReplacementProductListManager::Next(ReplacementProductStruct & item) { - if (mIndex < mReplacementProductListSize) + if (mIndex >= kReplacementProductListMaxSize) { - item = mReplacementProductsList[mIndex]; - mIndex++; - return CHIP_NO_ERROR; + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; } - return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + switch (mIndex) + { + case 0: { + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kUpc); + item.SetProductIdentifierValue(CharSpan::fromCharString("111112222233")); + break; + case 1: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8); + item.SetProductIdentifierValue(CharSpan::fromCharString("gtin8xxx")); + break; + case 2: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kEan); + item.SetProductIdentifierValue(CharSpan::fromCharString("4444455555666")); + break; + case 3: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14); + item.SetProductIdentifierValue(CharSpan::fromCharString("gtin14xxxxxxxx")); + break; + case 4: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kOem); + item.SetProductIdentifierValue(CharSpan::fromCharString("oem20xxxxxxxxxxxxxxx")); + break; + default: + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + break; + } + } + mIndex++; + return CHIP_NO_ERROR; } diff --git a/examples/placeholder/linux/apps/app1/BUILD.gn b/examples/placeholder/linux/apps/app1/BUILD.gn index 595a0b7563132c..99b3547b81e7c8 100644 --- a/examples/placeholder/linux/apps/app1/BUILD.gn +++ b/examples/placeholder/linux/apps/app1/BUILD.gn @@ -30,6 +30,7 @@ source_set("app1") { ] sources = [ + "../../resource-monitoring-instances.cpp", "../../src/bridged-actions-stub.cpp", "../../static-supported-modes-manager.cpp", ] diff --git a/examples/placeholder/linux/apps/app2/BUILD.gn b/examples/placeholder/linux/apps/app2/BUILD.gn index 7d8f30a8ea83ec..91777971875d15 100644 --- a/examples/placeholder/linux/apps/app2/BUILD.gn +++ b/examples/placeholder/linux/apps/app2/BUILD.gn @@ -30,6 +30,7 @@ source_set("app2") { ] sources = [ + "../../resource-monitoring-instances.cpp", "../../src/bridged-actions-stub.cpp", "../../static-supported-modes-manager.cpp", ] diff --git a/examples/placeholder/linux/include/resource-monitoring-instances.h b/examples/placeholder/linux/include/resource-monitoring-instances.h new file mode 100644 index 00000000000000..276e423626c1d7 --- /dev/null +++ b/examples/placeholder/linux/include/resource-monitoring-instances.h @@ -0,0 +1,63 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include + +/// This is an application level Instance to handle ActivatedCarbonfilterMonitoringInstance commands according to the specific +/// business logic. +class ActivatedCarbonFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitoring::Instance +{ +private: + CHIP_ERROR AppInit() override; + chip::Protocols::InteractionModel::Status PreResetCondition() override; + chip::Protocols::InteractionModel::Status PostResetCondition() override; + +public: + ActivatedCarbonFilterMonitoringInstance( + chip::EndpointId aEndpointId, uint32_t aFeature, + chip::app::Clusters::ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported) : + Instance(aEndpointId, chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id, aFeature, aDegradationDirection, + aResetConditionCommandSupported){}; +}; + +/// This is an application level instance to handle HepaFilterMonitoringInstance commands according to the specific business logic. +class HepaFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitoring::Instance +{ +private: + CHIP_ERROR AppInit() override; + chip::Protocols::InteractionModel::Status PreResetCondition() override; + chip::Protocols::InteractionModel::Status PostResetCondition() override; + +public: + HepaFilterMonitoringInstance( + chip::EndpointId aEndpointId, uint32_t aFeature, + chip::app::Clusters::ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported) : + Instance(aEndpointId, chip::app::Clusters::HepaFilterMonitoring::Id, aFeature, aDegradationDirection, + aResetConditionCommandSupported){}; +}; + +class ImmutableReplacementProductListManager : public chip::app::Clusters::ResourceMonitoring::ReplacementProductListManager +{ +public: + CHIP_ERROR + Next(chip::app::Clusters::ResourceMonitoring::ReplacementProductStruct & item) override; +}; diff --git a/examples/placeholder/linux/resource-monitoring-instances.cpp b/examples/placeholder/linux/resource-monitoring-instances.cpp new file mode 100644 index 00000000000000..a030beed78c7e6 --- /dev/null +++ b/examples/placeholder/linux/resource-monitoring-instances.cpp @@ -0,0 +1,133 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ResourceMonitoring; +using chip::Protocols::InteractionModel::Status; + +constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(Feature::kCondition) | + static_cast(Feature::kWarning) | + static_cast(Feature::kReplacementProductList) }; +constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Feature::kCondition) | + static_cast(Feature::kWarning) | + static_cast(Feature::kReplacementProductList) }; + +static HepaFilterMonitoringInstance * gHepaFilterInstance = nullptr; +static ActivatedCarbonFilterMonitoringInstance * gActivatedCarbonFilterInstance = nullptr; + +static ImmutableReplacementProductListManager sReplacementProductListManager; + +//-- Activated Carbon Filter Monitoring Instance methods +CHIP_ERROR ActivatedCarbonFilterMonitoringInstance::AppInit() +{ + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::Init()"); + SetReplacementProductListManagerInstance(&sReplacementProductListManager); + return CHIP_NO_ERROR; +} + +Status ActivatedCarbonFilterMonitoringInstance::PreResetCondition() +{ + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PreResetCondition()"); + return Status::Success; +} + +Status ActivatedCarbonFilterMonitoringInstance::PostResetCondition() +{ + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PostResetCondition()"); + return Status::Success; +} + +//-- Hepa Filter Monitoring instance methods +CHIP_ERROR HepaFilterMonitoringInstance::AppInit() +{ + ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::Init()"); + SetReplacementProductListManagerInstance(&sReplacementProductListManager); + return CHIP_NO_ERROR; +} + +Status HepaFilterMonitoringInstance::PreResetCondition() +{ + ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PreResetCondition()"); + return Status::Success; +} + +Status HepaFilterMonitoringInstance::PostResetCondition() +{ + ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PostResetCondition()"); + return Status::Success; +} + +void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) +{ + VerifyOrDie(gActivatedCarbonFilterInstance == nullptr); + gActivatedCarbonFilterInstance = new ActivatedCarbonFilterMonitoringInstance( + endpoint, static_cast(gActivatedCarbonFeatureMap.to_ulong()), DegradationDirectionEnum::kDown, true); + gActivatedCarbonFilterInstance->Init(); +} +void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) +{ + VerifyOrDie(gHepaFilterInstance == nullptr); + gHepaFilterInstance = new HepaFilterMonitoringInstance(endpoint, static_cast(gHepaFilterFeatureMap.to_ulong()), + DegradationDirectionEnum::kDown, true); + gHepaFilterInstance->Init(); +} + +CHIP_ERROR ImmutableReplacementProductListManager::Next(ReplacementProductStruct & item) +{ + if (mIndex >= kReplacementProductListMaxSize) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + switch (mIndex) + { + case 0: { + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kUpc); + item.SetProductIdentifierValue(CharSpan::fromCharString("111112222233")); + break; + case 1: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8); + item.SetProductIdentifierValue(CharSpan::fromCharString("gtin8xxx")); + break; + case 2: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kEan); + item.SetProductIdentifierValue(CharSpan::fromCharString("4444455555666")); + break; + case 3: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14); + item.SetProductIdentifierValue(CharSpan::fromCharString("gtin14xxxxxxxx")); + break; + case 4: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kOem); + item.SetProductIdentifierValue(CharSpan::fromCharString("oem20xxxxxxxxxxxxxxx")); + break; + default: + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + break; + } + } + mIndex++; + return CHIP_NO_ERROR; +} diff --git a/examples/resource-monitoring-app/linux/BUILD.gn b/examples/resource-monitoring-app/linux/BUILD.gn index c5e769a39ce4f7..e9d5e391def96c 100644 --- a/examples/resource-monitoring-app/linux/BUILD.gn +++ b/examples/resource-monitoring-app/linux/BUILD.gn @@ -30,7 +30,7 @@ config("includes") { executable("chip-resource-monitoring-app") { sources = [ - "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/StaticReplacementProductListManager.cpp", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/ReplacementProductListManager.cpp", "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp", "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepaFilterMonitoring.cpp", "include/CHIPProjectAppConfig.h", diff --git a/examples/resource-monitoring-app/resource-monitoring-common/include/ImmutableReplacementProductListManager.h b/examples/resource-monitoring-app/resource-monitoring-common/include/ImmutableReplacementProductListManager.h new file mode 100644 index 00000000000000..2dcbff41372866 --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/include/ImmutableReplacementProductListManager.h @@ -0,0 +1,44 @@ +/* + * + * 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. + * 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 +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace ResourceMonitoring { + +/** + * This implementation returns an immutable list of replacement products. + * It holds ReplacementProductListManager::kReplacementProductListMaxSize products in the list. + */ + +class ImmutableReplacementProductListManager : public ReplacementProductListManager +{ +public: + CHIP_ERROR Next(ReplacementProductStruct & item) override; +}; + +} // namespace ResourceMonitoring +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/resource-monitoring-app/resource-monitoring-common/include/StaticReplacementProductListManager.h b/examples/resource-monitoring-app/resource-monitoring-common/include/StaticReplacementProductListManager.h index cb83148302f8b6..26601a235fcb1d 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/include/StaticReplacementProductListManager.h +++ b/examples/resource-monitoring-app/resource-monitoring-common/include/StaticReplacementProductListManager.h @@ -34,20 +34,17 @@ namespace ResourceMonitoring { class StaticReplacementProductListManager : public ReplacementProductListManager { public: - uint8_t Size() override { return mReplacementProductListSize; }; - - CHIP_ERROR Next(Attributes::ReplacementProductStruct::Type & item) override; + CHIP_ERROR Next(ReplacementProductStruct & item) override; ~StaticReplacementProductListManager() {} - StaticReplacementProductListManager(Attributes::ReplacementProductStruct::Type * aReplacementProductsList, - uint8_t aReplacementProductListSize) + StaticReplacementProductListManager(ReplacementProductStruct * aReplacementProductsList, uint8_t aReplacementProductListSize) { mReplacementProductsList = aReplacementProductsList; mReplacementProductListSize = aReplacementProductListSize; } private: - Attributes::ReplacementProductStruct::Type * mReplacementProductsList; + ReplacementProductStruct * mReplacementProductsList; uint8_t mReplacementProductListSize; }; diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/ReplacementProductListManager.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/ReplacementProductListManager.cpp new file mode 100644 index 00000000000000..f450df6f380ef3 --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/ReplacementProductListManager.cpp @@ -0,0 +1,77 @@ +/* + * + * 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. + * 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. + */ + +#include +#include +#include +#include +#include +#include + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ResourceMonitoring; + +CHIP_ERROR StaticReplacementProductListManager::Next(ReplacementProductStruct & item) +{ + if (mIndex < mReplacementProductListSize) + { + item = mReplacementProductsList[mIndex]; + mIndex++; + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; +} + +CHIP_ERROR ImmutableReplacementProductListManager::Next(ReplacementProductStruct & item) +{ + if (mIndex >= kReplacementProductListMaxSize) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + switch (mIndex) + { + case 0: { + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kUpc); + item.SetProductIdentifierValue(CharSpan::fromCharString("111112222233")); + break; + case 1: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8); + item.SetProductIdentifierValue(CharSpan::fromCharString("gtin8xxx")); + break; + case 2: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kEan); + item.SetProductIdentifierValue(CharSpan::fromCharString("4444455555666")); + break; + case 3: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14); + item.SetProductIdentifierValue(CharSpan::fromCharString("gtin14xxxxxxxx")); + break; + case 4: + item.SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum::kOem); + item.SetProductIdentifierValue(CharSpan::fromCharString("oem20xxxxxxxxxxxxxxx")); + break; + default: + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + break; + } + } + mIndex++; + return CHIP_NO_ERROR; +} diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/StaticReplacementProductListManager.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/StaticReplacementProductListManager.cpp deleted file mode 100644 index 4c657ff05cc488..00000000000000 --- a/examples/resource-monitoring-app/resource-monitoring-common/src/StaticReplacementProductListManager.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - * 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. - */ - -#include -#include -#include -#include -#include - -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::ResourceMonitoring; - -CHIP_ERROR StaticReplacementProductListManager::Next(Attributes::ReplacementProductStruct::Type & item) -{ - if (mIndex < mReplacementProductListSize) - { - item = mReplacementProductsList[mIndex]; - mIndex++; - return CHIP_NO_ERROR; - } - - return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; -} diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp index 778bb9d6e22dd0..3ab33e675e02a9 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp @@ -32,19 +32,15 @@ using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; using namespace chip::app::Clusters::ResourceMonitoring; +using namespace chip::app::Clusters::ResourceMonitoring::Attributes; using chip::Protocols::InteractionModel::Status; -static ResourceMonitoring::Attributes::ReplacementProductStruct::Type sActivatedCarbonFilterReplacementProductsList[] = { - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kUpc, - .productIdentifierValue = CharSpan::fromCharString("111112222233") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8, - .productIdentifierValue = CharSpan::fromCharString("gtin8xca") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kEan, - .productIdentifierValue = CharSpan::fromCharString("4444455555666") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14, - .productIdentifierValue = CharSpan::fromCharString("gtin14xcarbonx") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kOem, - .productIdentifierValue = CharSpan::fromCharString("oem20xcarbonxxxxxxxx") }, +static ReplacementProductStruct sActivatedCarbonFilterReplacementProductsList[] = { + { ResourceMonitoring::ProductIdentifierTypeEnum::kUpc, CharSpan::fromCharString("111112222233") }, + { ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8, CharSpan::fromCharString("gtin8xca") }, + { ResourceMonitoring::ProductIdentifierTypeEnum::kEan, CharSpan::fromCharString("4444455555666") }, + { ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14, CharSpan::fromCharString("gtin14xcarbonx") }, + { ResourceMonitoring::ProductIdentifierTypeEnum::kOem, CharSpan::fromCharString("oem20xcarbonxxxxxxxx") }, }; StaticReplacementProductListManager sActivatedCarbonFilterReplacementProductListManager(&sActivatedCarbonFilterReplacementProductsList[0], diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp index c0ee95ed7c02ff..6404f973a95097 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include +#include #include #include #include @@ -31,22 +31,10 @@ using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ResourceMonitoring; +using namespace chip::app::Clusters::ResourceMonitoring::Attributes; using chip::Protocols::InteractionModel::Status; -static ResourceMonitoring::Attributes::ReplacementProductStruct::Type sHepaFilterReplacementProductsList[] = { - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kUpc, - .productIdentifierValue = CharSpan::fromCharString("111112222233") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kGtin8, - .productIdentifierValue = CharSpan::fromCharString("gtin8xhe") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kEan, - .productIdentifierValue = CharSpan::fromCharString("4444455555666") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kGtin14, - .productIdentifierValue = CharSpan::fromCharString("gtin14xhepaxxx") }, - { .productIdentifierType = ResourceMonitoring::ProductIdentifierTypeEnum::kOem, - .productIdentifierValue = CharSpan::fromCharString("oem20xhepaxxxxxxxxxx") }, -}; -StaticReplacementProductListManager sHepaFilterReplacementProductListManager(&sHepaFilterReplacementProductsList[0], - ArraySize(sHepaFilterReplacementProductsList)); +static ImmutableReplacementProductListManager sHepaFilterReplacementProductListManager; //-- Hepa filter Monitoring instance methods CHIP_ERROR HepaFilterMonitoringInstance::AppInit() diff --git a/src/app/clusters/resource-monitoring-server/replacement-product-list-manager.h b/src/app/clusters/resource-monitoring-server/replacement-product-list-manager.h index b252597306c21a..bd63dabca180c9 100644 --- a/src/app/clusters/resource-monitoring-server/replacement-product-list-manager.h +++ b/src/app/clusters/resource-monitoring-server/replacement-product-list-manager.h @@ -34,15 +34,24 @@ namespace ResourceMonitoring { class ReplacementProductListManager { public: + // The max replacement product list size as defined in the specification + static constexpr size_t kReplacementProductListMaxSize = 5u; + ReplacementProductListManager() {} virtual ~ReplacementProductListManager() = default; void Reset() { mIndex = 0; } - // Returns total size of Replacement Products List. - virtual uint8_t Size() = 0; - - virtual CHIP_ERROR Next(Attributes::ReplacementProductStruct::Type & item) = 0; + /** + * Iterates through the entries in the ReplacementProductListManager. Each call to this function copies the next item into + * the out param. Calls to this function will return CHIP_NO_ERROR if there are still valid elements in the list. The function + * will return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the end of the list has been reached. + * + * @param[out] item An out parameter that has a copy of the item retrieved in the list. + * @return CHIP_NO_ERROR if the pointer to the list element has moved to the next element and there are still valid remaining + * entries in the list. Otherwise returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the list has hit the last element. + */ + virtual CHIP_ERROR Next(ReplacementProductStruct & item) = 0; protected: uint8_t mIndex; diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.cpp index 932c95ce3a77ee..34388cba90c4d9 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.cpp @@ -44,22 +44,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace ResetCondition. } // namespace Commands -namespace Attributes { -namespace ReplacementProductStruct { - -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProductIdentifierType), productIdentifierType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProductIdentifierValue), productIdentifierValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -} // namespace ReplacementProductStruct -} // namespace Attributes - } // namespace ResourceMonitoring } // namespace Clusters } // namespace app diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h index 995f42b6dc4d7c..970a85c957bdf3 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h @@ -29,7 +29,9 @@ namespace app { namespace Clusters { namespace ResourceMonitoring { -static constexpr std::array AliasedClusters = { HepaFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Id }; +// max of 20 characters as defined by the constraint on the ProductIdentifierValue in the specification +static constexpr size_t kProductIdentifierValueMaxNameLength = 20u; +static constexpr std::array AliasedClusters = { HepaFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Id }; // Enum for ChangeIndicationEnum enum class ChangeIndicationEnum : uint8_t @@ -74,6 +76,74 @@ enum class ProductIdentifierTypeEnum : uint8_t kOem = 0x04 }; +// A struct used during reads of the ReplacementProductList to store a single list instance we request +// from the application. +// +// Inherit from an auto-generated struct to pick up the implementation bits, but make +// it private inheritance so people can't accidentally use this struct where the other +// is expected. +struct ReplacementProductStruct : private HepaFilterMonitoring::Structs::ReplacementProductStruct::Type +{ +private: + char productIdentifierValueBuffer[kProductIdentifierValueMaxNameLength]; + +public: + static constexpr bool kIsFabricScoped = false; + virtual ~ReplacementProductStruct() = default; + ReplacementProductStruct() {} + ReplacementProductStruct(ResourceMonitoring::ProductIdentifierTypeEnum aProductIdentifierType, + chip::CharSpan aProductIdentifierValue) + { + SetProductIdentifierType(aProductIdentifierType); + SetProductIdentifierValue(aProductIdentifierValue); + } + + ReplacementProductStruct & operator=(const ReplacementProductStruct & aReplacementProductStruct) + { + SetProductIdentifierType(aReplacementProductStruct.GetProductIdentifierType()); + SetProductIdentifierValue(aReplacementProductStruct.GetProductIdentifierValue()); + return *this; + } + + using HepaFilterMonitoring::Structs::ReplacementProductStruct::Type::Encode; + + /** + * Sets the product identifier type. + * + * @param aProductIdentifierType The product identifier type. + */ + void SetProductIdentifierType(ResourceMonitoring::ProductIdentifierTypeEnum aProductIdentifierType) + { + productIdentifierType = static_cast(aProductIdentifierType); + } + + /** + * Sets the product identifier value. + * This implementation will copy the argument into this struct's buffer. + * + * @param aProductIdentifierValue The value of the product identifier to set. + * @return CHIP_ERROR_INVALID_ARGUMENT when aProductIdentifierValue is invalid + * or the size exceeds kProductIdentifierValueMaxNameLength, returns CHIP_NO_ERROR + * otherwise. + */ + CHIP_ERROR SetProductIdentifierValue(chip::CharSpan aProductIdentifierValue) + { + VerifyOrReturnError(IsSpanUsable(aProductIdentifierValue), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(aProductIdentifierValue.size() <= sizeof(productIdentifierValueBuffer), CHIP_ERROR_INVALID_ARGUMENT); + + memcpy(productIdentifierValueBuffer, aProductIdentifierValue.data(), aProductIdentifierValue.size()); + productIdentifierValue = CharSpan(productIdentifierValueBuffer, aProductIdentifierValue.size()); + + return CHIP_NO_ERROR; + } + + ProductIdentifierTypeEnum GetProductIdentifierType() const + { + return static_cast(productIdentifierType); + }; + chip::CharSpan GetProductIdentifierValue() const { return productIdentifierValue; }; +}; + namespace Attributes { namespace Condition { @@ -141,42 +211,9 @@ struct TypeInfo }; } // namespace LastChangedTime -namespace ReplacementProductStruct { -enum class Fields : uint8_t -{ - kProductIdentifierType = 0, - kProductIdentifierValue = 1, -}; - -struct Type -{ -public: - ProductIdentifierTypeEnum productIdentifierType = static_cast(0); - chip::CharSpan productIdentifierValue; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; -}; - -using DecodableType = Type; - -} // namespace ReplacementProductStruct - namespace ReplacementProductList { static constexpr AttributeId Id = 0x00000005; -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr AttributeId GetAttributeId() { return Attributes::ReplacementProductList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ReplacementProductList +} namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp index 2cbcb433a23f42..c5687467d00ca0 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -244,10 +244,10 @@ CHIP_ERROR Instance::EnumerateAcceptedCommands(const ConcreteClusterPath & clust CHIP_ERROR Instance::ReadReplacableProductList(AttributeValueEncoder & aEncoder) { - CHIP_ERROR err; - if (Instance::HasFeature(ResourceMonitoring::Feature::kReplacementProductList)) + CHIP_ERROR err = CHIP_NO_ERROR; + if (HasFeature(ResourceMonitoring::Feature::kReplacementProductList)) { - ReplacementProductListManager * productListManagerInstance = Instance::GetReplacementProductListManagerInstance(); + ReplacementProductListManager * productListManagerInstance = GetReplacementProductListManagerInstance(); if (nullptr == productListManagerInstance) { aEncoder.EncodeEmptyList(); @@ -256,16 +256,19 @@ CHIP_ERROR Instance::ReadReplacableProductList(AttributeValueEncoder & aEncoder) productListManagerInstance->Reset(); - err = aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR { - Attributes::ReplacementProductStruct::Type replacementProductStruct; - while (productListManagerInstance->Next(replacementProductStruct) == CHIP_NO_ERROR) + err = aEncoder.EncodeList([productListManagerInstance](const auto & encoder) -> CHIP_ERROR { + ReplacementProductStruct replacementProductStruct; + CHIP_ERROR iteratorError = productListManagerInstance->Next(replacementProductStruct); + + while (CHIP_NO_ERROR == iteratorError) { ReturnErrorOnFailure(encoder.Encode(replacementProductStruct)); + iteratorError = productListManagerInstance->Next(replacementProductStruct); } - return CHIP_NO_ERROR; + return (CHIP_ERROR_PROVIDER_LIST_EXHAUSTED == iteratorError) ? CHIP_NO_ERROR : iteratorError; }); } - return CHIP_NO_ERROR; + return err; } // Implements the read functionality for non-standard attributes. diff --git a/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml b/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml new file mode 100644 index 00000000000000..c47e01fc473bf4 --- /dev/null +++ b/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml @@ -0,0 +1,57 @@ +# 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. + +name: Activated Carbon Filter Monitoring Cluster Tests + +config: + nodeId: 0x12344321 + cluster: "Activated Carbon Filter Monitoring" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read Replacement Product List" + command: "readAttribute" + attribute: "ReplacementProductList" + response: + value: + [ + { + ProductIdentifierType: 0, + ProductIdentifierValue: "111112222233", + }, + { + ProductIdentifierType: 1, + ProductIdentifierValue: "gtin8xxx", + }, + { + ProductIdentifierType: 2, + ProductIdentifierValue: "4444455555666", + }, + { + ProductIdentifierType: 3, + ProductIdentifierValue: "gtin14xxxxxxxx", + }, + { + ProductIdentifierType: 4, + ProductIdentifierValue: "oem20xxxxxxxxxxxxxxx", + }, + ] diff --git a/src/app/tests/suites/TestHepaFilterMonitoring.yaml b/src/app/tests/suites/TestHepaFilterMonitoring.yaml new file mode 100644 index 00000000000000..44b79eec8afc5c --- /dev/null +++ b/src/app/tests/suites/TestHepaFilterMonitoring.yaml @@ -0,0 +1,57 @@ +# 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. + +name: HEPA Filter Monitoring Cluster Tests + +config: + nodeId: 0x12344321 + cluster: "HEPA Filter Monitoring" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read Replacement Product List" + command: "readAttribute" + attribute: "ReplacementProductList" + response: + value: + [ + { + ProductIdentifierType: 0, + ProductIdentifierValue: "111112222233", + }, + { + ProductIdentifierType: 1, + ProductIdentifierValue: "gtin8xxx", + }, + { + ProductIdentifierType: 2, + ProductIdentifierValue: "4444455555666", + }, + { + ProductIdentifierType: 3, + ProductIdentifierValue: "gtin14xxxxxxxx", + }, + { + ProductIdentifierType: 4, + ProductIdentifierValue: "oem20xxxxxxxxxxxxxxx", + }, + ] diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 377dd568b2aea0..a22aea164ddc76 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -303,6 +303,8 @@ ], "Scenes": ["Test_TC_S_1_1"], "ResourceMonitoring": [ + "TestActivatedCarbonFilterMonitoring", + "TestHepaFilterMonitoring", "Test_TC_ACFREMON_1_1", "Test_TC_ACFREMON_2_1", "Test_TC_HEPAFREMON_1_1", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index e800416ec18db5..a07a8e2609fed0 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -322,6 +322,8 @@ class TestList : public Command printf("TestGroupKeyManagementCluster\n"); printf("Test_TC_G_1_1\n"); printf("Test_TC_G_2_1\n"); + printf("TestActivatedCarbonFilterMonitoring\n"); + printf("TestHepaFilterMonitoring\n"); printf("Test_TC_ACFREMON_1_1\n"); printf("Test_TC_ACFREMON_2_1\n"); printf("Test_TC_HEPAFREMON_1_1\n"); @@ -113646,6 +113648,236 @@ class Test_TC_G_2_1Suite : public TestCommand } }; +class TestActivatedCarbonFilterMonitoringSuite : public TestCommand +{ +public: + TestActivatedCarbonFilterMonitoringSuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("TestActivatedCarbonFilterMonitoring", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~TestActivatedCarbonFilterMonitoringSuite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 0)); + VerifyOrReturn( + CheckValue("replacementProductList[0].productIdentifierType", iter_0.GetValue().productIdentifierType, 0U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[0].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("111112222233", 12))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 1)); + VerifyOrReturn( + CheckValue("replacementProductList[1].productIdentifierType", iter_0.GetValue().productIdentifierType, 1U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[1].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, chip::CharSpan("gtin8xxx", 8))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 2)); + VerifyOrReturn( + CheckValue("replacementProductList[2].productIdentifierType", iter_0.GetValue().productIdentifierType, 2U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[2].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("4444455555666", 13))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 3)); + VerifyOrReturn( + CheckValue("replacementProductList[3].productIdentifierType", iter_0.GetValue().productIdentifierType, 3U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[3].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("gtin14xxxxxxxx", 14))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 4)); + VerifyOrReturn( + CheckValue("replacementProductList[4].productIdentifierType", iter_0.GetValue().productIdentifierType, 4U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[4].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("oem20xxxxxxxxxxxxxxx", 20))); + VerifyOrReturn(CheckNoMoreListItems("replacementProductList", iter_0, 5)); + } + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read Replacement Product List"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class TestHepaFilterMonitoringSuite : public TestCommand +{ +public: + TestHepaFilterMonitoringSuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("TestHepaFilterMonitoring", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~TestHepaFilterMonitoringSuite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 0)); + VerifyOrReturn( + CheckValue("replacementProductList[0].productIdentifierType", iter_0.GetValue().productIdentifierType, 0U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[0].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("111112222233", 12))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 1)); + VerifyOrReturn( + CheckValue("replacementProductList[1].productIdentifierType", iter_0.GetValue().productIdentifierType, 1U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[1].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, chip::CharSpan("gtin8xxx", 8))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 2)); + VerifyOrReturn( + CheckValue("replacementProductList[2].productIdentifierType", iter_0.GetValue().productIdentifierType, 2U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[2].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("4444455555666", 13))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 3)); + VerifyOrReturn( + CheckValue("replacementProductList[3].productIdentifierType", iter_0.GetValue().productIdentifierType, 3U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[3].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("gtin14xxxxxxxx", 14))); + VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 4)); + VerifyOrReturn( + CheckValue("replacementProductList[4].productIdentifierType", iter_0.GetValue().productIdentifierType, 4U)); + VerifyOrReturn(CheckValueAsString("replacementProductList[4].productIdentifierValue", + iter_0.GetValue().productIdentifierValue, + chip::CharSpan("oem20xxxxxxxxxxxxxxx", 20))); + VerifyOrReturn(CheckNoMoreListItems("replacementProductList", iter_0, 5)); + } + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read Replacement Product List"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::ReplacementProductList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_ACFREMON_1_1Suite : public TestCommand { public: @@ -144954,6 +145186,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 3d69b11871f7b8..125b3516ffbc3d 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -286,6 +286,8 @@ class TestList : public Command { printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); printf("Test_TC_G_1_1\n"); + printf("TestActivatedCarbonFilterMonitoring\n"); + printf("TestHepaFilterMonitoring\n"); printf("Test_TC_ACFREMON_1_1\n"); printf("Test_TC_ACFREMON_2_1\n"); printf("Test_TC_HEPAFREMON_1_1\n"); @@ -172696,6 +172698,295 @@ class Test_TC_G_1_1 : public TestCommandBridge { } }; +class TestActivatedCarbonFilterMonitoring : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestActivatedCarbonFilterMonitoring() + : TestCommandBridge("TestActivatedCarbonFilterMonitoring") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~TestActivatedCarbonFilterMonitoring() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestActivatedCarbonFilterMonitoring\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestActivatedCarbonFilterMonitoring\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read Replacement Product List\n"); + err = TestReadReplacementProductList_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadReplacementProductList_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Replacement Product List Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ReplacementProductList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[0]).productIdentifierType, + 0U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[0]).productIdentifierValue, + @"111112222233")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[1]).productIdentifierType, + 1U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[1]).productIdentifierValue, + @"gtin8xxx")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[2]).productIdentifierType, + 2U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[2]).productIdentifierValue, + @"4444455555666")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[3]).productIdentifierType, + 3U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[3]).productIdentifierValue, + @"gtin14xxxxxxxx")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[4]).productIdentifierType, + 4U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct *) actualValue[4]).productIdentifierValue, + @"oem20xxxxxxxxxxxxxxx")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class TestHepaFilterMonitoring : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestHepaFilterMonitoring() + : TestCommandBridge("TestHepaFilterMonitoring") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~TestHepaFilterMonitoring() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestHepaFilterMonitoring\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestHepaFilterMonitoring\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read Replacement Product List\n"); + err = TestReadReplacementProductList_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadReplacementProductList_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Replacement Product List Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ReplacementProductList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[0]).productIdentifierType, 0U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[0]).productIdentifierValue, + @"111112222233")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[1]).productIdentifierType, 1U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[1]).productIdentifierValue, + @"gtin8xxx")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[2]).productIdentifierType, 2U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[2]).productIdentifierValue, + @"4444455555666")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[3]).productIdentifierType, 3U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[3]).productIdentifierValue, + @"gtin14xxxxxxxx")); + VerifyOrReturn(CheckValue("ProductIdentifierType", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[4]).productIdentifierType, 4U)); + VerifyOrReturn(CheckValueAsString("ProductIdentifierValue", + ((MTRHEPAFilterMonitoringClusterReplacementProductStruct *) actualValue[4]).productIdentifierValue, + @"oem20xxxxxxxxxxxxxxx")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_ACFREMON_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -174471,6 +174762,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), From 0a7cc298f366d9399e230c37bafa7801d081dea1 Mon Sep 17 00:00:00 2001 From: EricZijian_Siter Date: Thu, 27 Jul 2023 20:26:02 +0800 Subject: [PATCH 053/159] [SMOKECO] Updated tests as per document (#28315) * Rename SMCO to SMOKECO * Add optional guards in TC_SMOKECO_2.6 * Restyled by prettier-yaml * Regen zap --------- Co-authored-by: Hare Co-authored-by: Restyled.io --- .../templates/tests/ciTests.json | 14 +- scripts/tests/chiptest/__init__.py | 10 +- src/app/tests/suites/certification/PICS.yaml | 72 +- ...SMCO_1_1.yaml => Test_TC_SMOKECO_1_1.yaml} | 2 +- ...SMCO_2_1.yaml => Test_TC_SMOKECO_2_1.yaml} | 2 +- ...SMCO_2_2.yaml => Test_TC_SMOKECO_2_2.yaml} | 3 +- ...SMCO_2_3.yaml => Test_TC_SMOKECO_2_3.yaml} | 3 +- ...SMCO_2_4.yaml => Test_TC_SMOKECO_2_4.yaml} | 3 +- ...SMCO_2_5.yaml => Test_TC_SMOKECO_2_5.yaml} | 4 +- ...SMCO_2_6.yaml => Test_TC_SMOKECO_2_6.yaml} | 12 +- .../tests/suites/certification/ci-pics-values | 68 +- src/app/tests/suites/ciTests.json | 14 +- .../chip-tool/zap-generated/test/Commands.h | 85 +- .../zap-generated/test/Commands.h | 2850 +++++++++++++++++ 14 files changed, 3000 insertions(+), 142 deletions(-) rename src/app/tests/suites/certification/{Test_TC_SMCO_1_1.yaml => Test_TC_SMOKECO_1_1.yaml} (99%) rename src/app/tests/suites/certification/{Test_TC_SMCO_2_1.yaml => Test_TC_SMOKECO_2_1.yaml} (98%) rename src/app/tests/suites/certification/{Test_TC_SMCO_2_2.yaml => Test_TC_SMOKECO_2_2.yaml} (98%) rename src/app/tests/suites/certification/{Test_TC_SMCO_2_3.yaml => Test_TC_SMOKECO_2_3.yaml} (98%) rename src/app/tests/suites/certification/{Test_TC_SMCO_2_4.yaml => Test_TC_SMOKECO_2_4.yaml} (99%) rename src/app/tests/suites/certification/{Test_TC_SMCO_2_5.yaml => Test_TC_SMOKECO_2_5.yaml} (99%) rename src/app/tests/suites/certification/{Test_TC_SMCO_2_6.yaml => Test_TC_SMOKECO_2_6.yaml} (98%) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 83adb93e91fffc..597af3c96270d8 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -35,17 +35,13 @@ "Test_TC_BINFO_2_2", "Test_TC_ACL_2_5", "Test_TC_ACL_2_6", + "Test_TC_SMOKECO_2_2", + "Test_TC_SMOKECO_2_3", + "Test_TC_SMOKECO_2_4", + "Test_TC_SMOKECO_2_5", "Disabled because the power source configuration cluster is now deprecated and not present in all-clusters", "Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1", - "Test_TC_PSCFG_2_2", - "Disabled due to SmokeCOAlarm not being enabled in Matter.framework for now:", - "Test_TC_SMCO_1_1", - "Test_TC_SMCO_2_1", - "Test_TC_SMCO_2_2", - "Test_TC_SMCO_2_3", - "Test_TC_SMCO_2_4", - "Test_TC_SMCO_2_5", - "Test_TC_SMCO_2_6" + "Test_TC_PSCFG_2_2" ] } diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 26aed1ddc34138..2b761d95684baf 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -143,11 +143,11 @@ def _GetInDevelopmentTests() -> Set[str]: "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters "Test_TC_PSCFG_2_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters "Test_TC_PSCFG_2_2.yaml", # Power source configuration cluster is deprecated and removed from all-clusters - "Test_TC_SMCO_2_2.yaml", # chip-repl does not support timeout (07/20/2023) - "Test_TC_SMCO_2_3.yaml", # chip-repl does not support timeout (07/20/2023) - "Test_TC_SMCO_2_4.yaml", # chip-repl does not support timeout (07/20/2023) - "Test_TC_SMCO_2_5.yaml", # chip-repl does not support timeout (07/20/2023) - "Test_TC_SMCO_2_6.yaml", # chip-repl does not support timeout (07/20/2023) + "Test_TC_SMOKECO_2_2.yaml", # chip-repl does not support local timeout (07/20/2023) + "Test_TC_SMOKECO_2_3.yaml", # chip-repl does not support local timeout (07/20/2023) + "Test_TC_SMOKECO_2_4.yaml", # chip-repl does not support local timeout (07/20/2023) + "Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) + "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) } diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 80bb8f62da70f7..d42e181b430c28 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -9375,107 +9375,107 @@ PICS: id: OPSTATE.S.C04.Tx # Smoke CO Alarm Cluster Test Plan - - label: "Does the device implement the SMCO cluster as a server?" - id: SMCO.S + - label: "Does the device implement the SMOKECO cluster as a server?" + id: SMOKECO.S - - label: "Does the device implement the SMCO cluster as a client?" - id: SMCO.C + - label: "Does the device implement the SMOKECO cluster as a client?" + id: SMOKECO.C # # server / features # - label: "Does the device support this specific cluster feature?" - id: SMCO.S.F00 + id: SMOKECO.S.F00 - label: "Does the device support this specific cluster feature?" - id: SMCO.S.F01 + id: SMOKECO.S.F01 # # server / attributes # - label: "Does the device implement the ExpressedState attribute?" - id: SMCO.S.A0000 + id: SMOKECO.S.A0000 - label: "Does the device implement the SmokeState attribute?" - id: SMCO.S.A0001 + id: SMOKECO.S.A0001 - label: "Does the device implement the COState attribute?" - id: SMCO.S.A0002 + id: SMOKECO.S.A0002 - label: "Does the device implement the BatteryAlert attribute?" - id: SMCO.S.A0003 + id: SMOKECO.S.A0003 - label: "Does the device implement the DeviceMuted attribute?" - id: SMCO.S.A0004 + id: SMOKECO.S.A0004 - label: "Does the device implement the TestInProgress attribute?" - id: SMCO.S.A0005 + id: SMOKECO.S.A0005 - label: "Does the device implement the HardwareFaultAlert attribute?" - id: SMCO.S.A0006 + id: SMOKECO.S.A0006 - label: "Does the device implement the EndOfServiceAlert attribute?" - id: SMCO.S.A0007 + id: SMOKECO.S.A0007 - label: "Does the device implement the InterconnectSmokeAlarm attribute?" - id: SMCO.S.A0008 + id: SMOKECO.S.A0008 - label: "Does the device implement the InterconnectCOAlarm attribute?" - id: SMCO.S.A0009 + id: SMOKECO.S.A0009 - label: "Does the device implement the ContaminationState attribute?" - id: SMCO.S.A0010 + id: SMOKECO.S.A0010 - label: "Does the device implement the SensitivityLevel attribute?" - id: SMCO.S.A0011 + id: SMOKECO.S.A0011 - label: "Does the device implement the ExpiryDate attribute?" - id: SMCO.S.A0012 + id: SMOKECO.S.A0012 - label: "Does the device implement the ContaminationState attribute?" - id: SMCO.S.A000a + id: SMOKECO.S.A000a - label: "Does the device implement the SensitivityLevel attribute?" - id: SMCO.S.A000b + id: SMOKECO.S.A000b - label: "Does the device implement the ExpiryDate attribute?" - id: SMCO.S.A000c + id: SMOKECO.S.A000c # # server / Events # - label: "Does the device implement the SmokeAlarm event?" - id: SMCO.S.E00 + id: SMOKECO.S.E00 - label: "Does the device implement the COAlarm event?" - id: SMCO.S.E01 + id: SMOKECO.S.E01 - label: "Does the device implement the LowBattery event?" - id: SMCO.S.E02 + id: SMOKECO.S.E02 - label: "Does the device implement the HardwareFault event?" - id: SMCO.S.E03 + id: SMOKECO.S.E03 - label: "Does the device implement the EndOfService event?" - id: SMCO.S.E04 + id: SMOKECO.S.E04 - label: "Does the device implement the SelfTestComplete event?" - id: SMCO.S.E05 + id: SMOKECO.S.E05 - label: "Does the device implement the AlarmMuted event?" - id: SMCO.S.E06 + id: SMOKECO.S.E06 - label: "Does the device implement the MuteEnded event?" - id: SMCO.S.E07 + id: SMOKECO.S.E07 - label: "Does the device implement the InterconnectSmokeAlarm event?" - id: SMCO.S.E08 + id: SMOKECO.S.E08 - label: "Does the device implement the InterconnectCOAlarm event?" - id: SMCO.S.E09 + id: SMOKECO.S.E09 - label: "Does the device implement the AllClear event?" - id: SMCO.S.E10 + id: SMOKECO.S.E10 # # server / manually @@ -9483,18 +9483,18 @@ PICS: - label: "Can the TestInProgress attribute be changed by physical control at the device?" - id: SMCO.M.ManuallyControlledTest + id: SMOKECO.M.ManuallyControlledTest - label: "Can the DeviceMuted attribute be changed by physical control at the device?" - id: SMCO.M.ManuallyControlledMute + id: SMOKECO.M.ManuallyControlledMute # # server / commandsReceived # - label: "Does the device implement receiving the SelfTestRequest command?" - id: SMCO.S.C00.Rsp + id: SMOKECO.S.C00.Rsp # Laundry Washer Mode Cluster diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_SMCO_1_1.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml index 07730f59f0e57d..9e19aa2e4228a5 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 4.1.1. [TC-SMCO-1.1] Global Attributes with DUT as Server +name: 4.1.1. [TC-SMOKECO-1.1] Global Attributes with DUT as Server PICS: - SMOKECO.S diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_SMCO_2_1.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml index 5eeb7084800ab7..5959a3d6da1dc5 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 4.2.1. [TC-SMCO-2.1] Attributes with DUT as Server +name: 4.2.1. [TC-SMOKECO-2.1] Attributes with DUT as Server PICS: - SMOKECO.S diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_SMCO_2_2.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml index a36cb1a46944cf..0e44017c4df7ec 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml @@ -13,7 +13,8 @@ # limitations under the License. name: - 4.2.2. [TC-SMCO-2.2] Primary Functionality - Smoke Alarm with DUT as Server + 4.2.2. [TC-SMOKECO-2.2] Primary Functionality - Smoke Alarm with DUT as + Server PICS: - SMOKECO.S diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_SMCO_2_3.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml index 96d3f41e2047d8..eed913616c10cd 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 4.2.3. [TC-SMCO-2.3] Primary Functionality - CO Alarm with DUT as Server +name: + 4.2.3. [TC-SMOKECO-2.3] Primary Functionality - CO Alarm with DUT as Server PICS: - SMOKECO.S diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_4.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_SMCO_2_4.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml index 353826179b1d74..5326a83d5fe16b 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml @@ -13,7 +13,8 @@ # limitations under the License. name: - 4.2.4. [TC-SMCO-2.4] Secondary Functionality - Mandatory with DUT as Server + 4.2.4. [TC-SMOKECO-2.4] Secondary Functionality - Mandatory with DUT as + Server PICS: - SMOKECO.S diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_5.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_SMCO_2_5.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml index edb7e6d8cf3021..3607665b0c8f46 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 4.2.5. [TC-SMCO-2.5] Secondary Functionality - Optional with DUT as Server +name: + 4.2.5. [TC-SMOKECO-2.5] Secondary Functionality - Optional with DUT as + Server PICS: - SMOKECO.S diff --git a/src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml rename to src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml index 0b13078763c4cb..6aba1c9adf70da 100644 --- a/src/app/tests/suites/certification/Test_TC_SMCO_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml @@ -13,8 +13,8 @@ # limitations under the License. name: - 4.2.6. [TC-SMCO-2.6] ExpressedState Attribute - Multiple Alarms with DUT as - Server + 4.2.6. [TC-SMOKECO-2.6] ExpressedState Attribute - Multiple Alarms with DUT + as Server PICS: - SMOKECO.S @@ -195,7 +195,7 @@ tests: PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event" - PICS: DGGEN.S.C00.Rsp + PICS: SMOKECO.S.A0008 && DGGEN.S.C00.Rsp cluster: "General Diagnostics" endpoint: 0 command: "TestEventTrigger" @@ -224,7 +224,7 @@ tests: Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event" - PICS: DGGEN.S.C00.Rsp + PICS: SMOKECO.S.A0009 && DGGEN.S.C00.Rsp cluster: "General Diagnostics" endpoint: 0 command: "TestEventTrigger" @@ -393,7 +393,7 @@ tests: PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear" - PICS: DGGEN.S.C00.Rsp + PICS: SMOKECO.S.A0009 && DGGEN.S.C00.Rsp cluster: "General Diagnostics" endpoint: 0 command: "TestEventTrigger" @@ -431,7 +431,7 @@ tests: PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear" - PICS: DGGEN.S.C00.Rsp + PICS: SMOKECO.S.A0008 && DGGEN.S.C00.Rsp cluster: "General Diagnostics" endpoint: 0 command: "TestEventTrigger" diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index fec8d2be4b5d1d..e1ed9239dd0752 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2751,40 +2751,40 @@ RVCCLEANMS.S.C01.Rsp=1 RVCCLEANMS.S.C03.Tx=1 # Smoke CO Alarm Cluster -SMCO.S=1 -SMCO.S.F00=1 -SMCO.S.F01=1 -SMCO.S.A0000=1 -SMCO.S.A0001=1 -SMCO.S.A0002=1 -SMCO.S.A0003=1 -SMCO.S.A0004=1 -SMCO.S.A0005=1 -SMCO.S.A0006=1 -SMCO.S.A0007=1 -SMCO.S.A0008=1 -SMCO.S.A0009=1 -SMCO.S.A0010=1 -SMCO.S.A0011=1 -SMCO.S.A0012=1 -SMCO.S.A000a=1 -SMCO.S.A000b=1 -SMCO.S.A000c=1 -SMCO.S.E00=1 -SMCO.S.E01=1 -SMCO.S.E02=1 -SMCO.S.E03=1 -SMCO.S.E04=1 -SMCO.S.E05=1 -SMCO.S.E06=1 -SMCO.S.E07=1 -SMCO.S.E08=1 -SMCO.S.E09=1 -SMCO.S.E10=1 -SMCO.M.ManuallyControlledTest=1 -SMCO.M.ManuallyControlledMute=1 -SMCO.S.C00.Rsp=1 -SMCO.C=1 +SMOKECO.S=1 +SMOKECO.S.F00=1 +SMOKECO.S.F01=1 +SMOKECO.S.A0000=1 +SMOKECO.S.A0001=1 +SMOKECO.S.A0002=1 +SMOKECO.S.A0003=1 +SMOKECO.S.A0004=1 +SMOKECO.S.A0005=1 +SMOKECO.S.A0006=1 +SMOKECO.S.A0007=1 +SMOKECO.S.A0008=1 +SMOKECO.S.A0009=1 +SMOKECO.S.A0010=1 +SMOKECO.S.A0011=1 +SMOKECO.S.A0012=1 +SMOKECO.S.A000a=1 +SMOKECO.S.A000b=1 +SMOKECO.S.A000c=1 +SMOKECO.S.E00=1 +SMOKECO.S.E01=1 +SMOKECO.S.E02=1 +SMOKECO.S.E03=1 +SMOKECO.S.E04=1 +SMOKECO.S.E05=1 +SMOKECO.S.E06=1 +SMOKECO.S.E07=1 +SMOKECO.S.E08=1 +SMOKECO.S.E09=1 +SMOKECO.S.E10=1 +SMOKECO.M.ManuallyControlledTest=1 +SMOKECO.M.ManuallyControlledMute=1 +SMOKECO.S.C00.Rsp=1 +SMOKECO.C=1 #Temperature Controlled Cabinet Mode Cluster TCCM.S=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index a22aea164ddc76..7db3d988af0d3b 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -178,13 +178,13 @@ "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], "SecureChannel": [], "SmokeCOAlarm": [ - "Test_TC_SMCO_1_1", - "Test_TC_SMCO_2_1", - "Test_TC_SMCO_2_2", - "Test_TC_SMCO_2_3", - "Test_TC_SMCO_2_4", - "Test_TC_SMCO_2_5", - "Test_TC_SMCO_2_6" + "Test_TC_SMOKECO_1_1", + "Test_TC_SMOKECO_2_1", + "Test_TC_SMOKECO_2_2", + "Test_TC_SMOKECO_2_3", + "Test_TC_SMOKECO_2_4", + "Test_TC_SMOKECO_2_5", + "Test_TC_SMOKECO_2_6" ], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], "TemperatureMeasurement": ["Test_TC_TMP_1_1", "Test_TC_TMP_2_1"], diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index a07a8e2609fed0..94784a6ee76f92 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -209,13 +209,13 @@ class TestList : public Command printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); - printf("Test_TC_SMCO_1_1\n"); - printf("Test_TC_SMCO_2_1\n"); - printf("Test_TC_SMCO_2_2\n"); - printf("Test_TC_SMCO_2_3\n"); - printf("Test_TC_SMCO_2_4\n"); - printf("Test_TC_SMCO_2_5\n"); - printf("Test_TC_SMCO_2_6\n"); + printf("Test_TC_SMOKECO_1_1\n"); + printf("Test_TC_SMOKECO_2_1\n"); + printf("Test_TC_SMOKECO_2_2\n"); + printf("Test_TC_SMOKECO_2_3\n"); + printf("Test_TC_SMOKECO_2_4\n"); + printf("Test_TC_SMOKECO_2_5\n"); + printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); @@ -59243,10 +59243,11 @@ class Test_TC_RH_2_1Suite : public TestCommand } }; -class Test_TC_SMCO_1_1Suite : public TestCommand +class Test_TC_SMOKECO_1_1Suite : public TestCommand { public: - Test_TC_SMCO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_1_1", 25, credsIssuerConfig) + Test_TC_SMOKECO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_1_1", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -59254,7 +59255,7 @@ class Test_TC_SMCO_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SMCO_1_1Suite() {} + ~Test_TC_SMOKECO_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -59680,10 +59681,11 @@ class Test_TC_SMCO_1_1Suite : public TestCommand } }; -class Test_TC_SMCO_2_1Suite : public TestCommand +class Test_TC_SMOKECO_2_1Suite : public TestCommand { public: - Test_TC_SMCO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_2_1", 14, credsIssuerConfig) + Test_TC_SMOKECO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -59691,7 +59693,7 @@ class Test_TC_SMCO_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SMCO_2_1Suite() {} + ~Test_TC_SMOKECO_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -59949,10 +59951,11 @@ class Test_TC_SMCO_2_1Suite : public TestCommand } }; -class Test_TC_SMCO_2_2Suite : public TestCommand +class Test_TC_SMOKECO_2_2Suite : public TestCommand { public: - Test_TC_SMCO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_2_2", 20, credsIssuerConfig) + Test_TC_SMOKECO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_2", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -59965,7 +59968,7 @@ class Test_TC_SMCO_2_2Suite : public TestCommand AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); } - ~Test_TC_SMCO_2_2Suite() {} + ~Test_TC_SMOKECO_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(990)); } @@ -60352,10 +60355,11 @@ class Test_TC_SMCO_2_2Suite : public TestCommand } }; -class Test_TC_SMCO_2_3Suite : public TestCommand +class Test_TC_SMOKECO_2_3Suite : public TestCommand { public: - Test_TC_SMCO_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_2_3", 20, credsIssuerConfig) + Test_TC_SMOKECO_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_3", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -60368,7 +60372,7 @@ class Test_TC_SMCO_2_3Suite : public TestCommand AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); } - ~Test_TC_SMCO_2_3Suite() {} + ~Test_TC_SMOKECO_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(990)); } @@ -60754,10 +60758,11 @@ class Test_TC_SMCO_2_3Suite : public TestCommand } }; -class Test_TC_SMCO_2_4Suite : public TestCommand +class Test_TC_SMOKECO_2_4Suite : public TestCommand { public: - Test_TC_SMCO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_2_4", 50, credsIssuerConfig) + Test_TC_SMOKECO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_4", 50, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -60774,7 +60779,7 @@ class Test_TC_SMCO_2_4Suite : public TestCommand AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); } - ~Test_TC_SMCO_2_4Suite() {} + ~Test_TC_SMOKECO_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(2910)); } @@ -61713,10 +61718,11 @@ class Test_TC_SMCO_2_4Suite : public TestCommand } }; -class Test_TC_SMCO_2_5Suite : public TestCommand +class Test_TC_SMOKECO_2_5Suite : public TestCommand { public: - Test_TC_SMCO_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_2_5", 75, credsIssuerConfig) + Test_TC_SMOKECO_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_5", 75, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -61745,7 +61751,7 @@ class Test_TC_SMCO_2_5Suite : public TestCommand AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); } - ~Test_TC_SMCO_2_5Suite() {} + ~Test_TC_SMOKECO_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(6090)); } @@ -63204,10 +63210,11 @@ class Test_TC_SMCO_2_5Suite : public TestCommand } }; -class Test_TC_SMCO_2_6Suite : public TestCommand +class Test_TC_SMOKECO_2_6Suite : public TestCommand { public: - Test_TC_SMCO_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SMCO_2_6", 34, credsIssuerConfig) + Test_TC_SMOKECO_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_6", 34, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -63232,7 +63239,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand AddArgument("HIEST_PRI_ALARM_5", 0, UINT8_MAX, &mHiestPriAlarm5); } - ~Test_TC_SMCO_2_6Suite() {} + ~Test_TC_SMOKECO_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(3090)); } @@ -63620,7 +63627,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " "Interconnect Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; value.enableKey = mTestEventTriggerKey.HasValue() @@ -63645,7 +63652,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " "Interconnect CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; value.enableKey = mTestEventTriggerKey.HasValue() @@ -63783,7 +63790,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " "Interconnect CO Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; value.enableKey = mTestEventTriggerKey.HasValue() @@ -63814,7 +63821,7 @@ class Test_TC_SMCO_2_6Suite : public TestCommand "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " "Interconnect Smoke Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; value.enableKey = mTestEventTriggerKey.HasValue() @@ -145073,13 +145080,13 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 125b3516ffbc3d..22b20b80ff9eb9 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -192,6 +192,9 @@ class TestList : public Command { printf("Test_TC_PCC_2_4\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); + printf("Test_TC_SMOKECO_1_1\n"); + printf("Test_TC_SMOKECO_2_1\n"); + printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -87607,6 +87610,2850 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; +class Test_TC_SMOKECO_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SMOKECO_1_1() + : TestCommandBridge("Test_TC_SMOKECO_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SMOKECO_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the FeatureMap attribute\n"); + if (ShouldSkip("!SMOKECO.S.F00 && !SMOKECO.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheFeatureMapAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the FeatureMap attribute(Smoke Alarm)\n"); + if (ShouldSkip("SMOKECO.S.F00 && !SMOKECO.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarm_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the FeatureMap attribute(CO Alarm)\n"); + if (ShouldSkip("SMOKECO.S.F01 && !SMOKECO.S.F00")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheFeatureMapAttributeCOAlarm_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm)\n"); + if (ShouldSkip("SMOKECO.S.F00 && SMOKECO.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarmCoAlarm_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AttributeList attribute\n"); + err = TestThReadsFromTheDutTheAttributeListAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AttributeList attribute(SmokeState)\n"); + if (ShouldSkip("SMOKECO.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeSmokeState_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the AttributeList attribute(COState)\n"); + if (ShouldSkip("SMOKECO.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeCOState_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the AttributeList attribute(DeviceMuted)\n"); + if (ShouldSkip("SMOKECO.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm)\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm)\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : TH reads from the DUT the AttributeList attribute(ContaminationState)\n"); + if (ShouldSkip("SMOKECO.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeContaminationState_12(); + break; + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel)\n"); + if (ShouldSkip("SMOKECO.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads from the DUT the AttributeList attribute(ExpiryDate)\n"); + if (ShouldSkip("SMOKECO.S.A000c")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAttributeListAttributeExpiryDate_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads from the DUT the EventList attribute\n"); + NextTest(); + return; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads from the DUT the EventList attribute(SmokeAlarm)\n"); + if (ShouldSkip("SMOKECO.S.E00")) { + NextTest(); + return; + } + NextTest(); + return; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads from the DUT the EventList attribute(COAlarm)\n"); + if (ShouldSkip("SMOKECO.S.E01")) { + NextTest(); + return; + } + NextTest(); + return; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads from the DUT the EventList attribute(AlarmMuted)\n"); + if (ShouldSkip("SMOKECO.S.E06")) { + NextTest(); + return; + } + NextTest(); + return; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads from the DUT the EventList attribute(MuteEnded)\n"); + if (ShouldSkip("SMOKECO.S.E07")) { + NextTest(); + return; + } + NextTest(); + return; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)\n"); + if (ShouldSkip("SMOKECO.S.E08")) { + NextTest(); + return; + } + NextTest(); + return; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads from the DUT the EventList attribute(InterconnectCOAlarm)\n"); + if (ShouldSkip("SMOKECO.S.E09")) { + NextTest(); + return; + } + NextTest(); + return; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads from the DUT the AcceptedCommandList attribute\n"); + if (ShouldSkip("!SMOKECO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAcceptedCommandListAttribute_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads from the DUT the AcceptedCommandList attribute\n"); + if (ShouldSkip("SMOKECO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheAcceptedCommandListAttribute_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads from the DUT the GeneratedCommandList attribute\n"); + err = TestThReadsFromTheDutTheGeneratedCommandListAttribute_24(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 25; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestCommissionDutToTh_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the FeatureMap attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarm_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the FeatureMap attribute(Smoke Alarm) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttributeCOAlarm_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the FeatureMap attribute(CO Alarm) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarmCoAlarm_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeSmokeState_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(SmokeState) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeCOState_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(COState) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(DeviceMuted) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeContaminationState_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(ContaminationState) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeExpiryDate_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AttributeList attribute(ExpiryDate) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAcceptedCommandListAttribute_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AcceptedCommandList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheAcceptedCommandListAttribute_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the AcceptedCommandList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheGeneratedCommandListAttribute_24() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the GeneratedCommandList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SMOKECO_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SMOKECO_2_1() + : TestCommandBridge("Test_TC_SMOKECO_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SMOKECO_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the ExpressedState attribute\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheExpressedStateAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the SmokeState attribute\n"); + if (ShouldSkip("SMOKECO.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheSmokeStateAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the COState attribute\n"); + if (ShouldSkip("SMOKECO.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheCOStateAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the BatteryAlert attribute\n"); + if (ShouldSkip("SMOKECO.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheBatteryAlertAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the DeviceMuted attribute\n"); + if (ShouldSkip("SMOKECO.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheDeviceMutedAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the TestInProgress attribute\n"); + if (ShouldSkip("SMOKECO.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheTestInProgressAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the HardwareFaultAlert attribute\n"); + if (ShouldSkip("SMOKECO.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheHardwareFaultAlertAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EndOfServiceAlert attribute\n"); + if (ShouldSkip("SMOKECO.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEndOfServiceAlertAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the InterconnectSmokeAlarm attribute\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheInterconnectSmokeAlarmAttribute_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the InterconnectCOAlarm attribute\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheInterconnectCOAlarmAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads from the DUT the ContaminationState attribute\n"); + if (ShouldSkip("SMOKECO.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheContaminationStateAttribute_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads from the DUT the SmokeSensitivityLevel attribute\n"); + if (ShouldSkip("SMOKECO.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheSmokeSensitivityLevelAttribute_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads from the DUT the ExpiryDate attribute\n"); + if (ShouldSkip("SMOKECO.S.A000c")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheExpiryDateAttribute_13(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 14; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestCommissionDutToTh_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsFromTheDutTheExpressedStateAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the ExpressedState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("expressedState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("expressedState", [value unsignedCharValue], 8U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheSmokeStateAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the SmokeState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("smokeState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("smokeState", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheCOStateAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the COState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("COState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("COState", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheBatteryAlertAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the BatteryAlert attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("batteryAlert", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batteryAlert", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheDeviceMutedAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the DeviceMuted attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("deviceMuted", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("deviceMuted", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("deviceMuted", [value unsignedCharValue], 1U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheTestInProgressAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the TestInProgress attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("testInProgress", "boolean", "boolean")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheHardwareFaultAlertAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the HardwareFaultAlert attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("hardwareFaultAlert", "boolean", "boolean")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEndOfServiceAlertAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EndOfServiceAlert attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("endOfServiceAlert", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endOfServiceAlert", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endOfServiceAlert", [value unsignedCharValue], 1U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheInterconnectSmokeAlarmAttribute_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the InterconnectSmokeAlarm attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("interconnectSmokeAlarm", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("interconnectSmokeAlarm", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheInterconnectCOAlarmAttribute_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the InterconnectCOAlarm attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("interconnectCOAlarm", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("interconnectCOAlarm", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheContaminationStateAttribute_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the ContaminationState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("contaminationState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("contaminationState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("contaminationState", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheSmokeSensitivityLevelAttribute_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the SmokeSensitivityLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("smokeSensitivityLevel", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("smokeSensitivityLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("smokeSensitivityLevel", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheExpiryDateAttribute_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the ExpiryDate attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("expiryDate", "epoch_s", "epoch_s")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SMOKECO_2_6 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SMOKECO_2_6() + : TestCommandBridge("Test_TC_SMOKECO_2_6") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); + AddArgument("TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningSmokeAlarm); + AddArgument("TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerSmokeAlarmClear); + AddArgument("TEST_EVENT_TRIGGER_WARNING_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningCoAlarm); + AddArgument("TEST_EVENT_TRIGGER_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerCoAlarmClear); + AddArgument("TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerWarningBatteryAlert); + AddArgument("TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerBatteryAlertClear); + AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectSmokeAlarm); + AddArgument( + "TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectSmokeAlarmClear); + AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarm); + AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarmClear); + AddArgument("HIEST_PRI_ALARM", 0, UINT8_MAX, &mHiestPriAlarm); + AddArgument("HIEST_PRI_ALARM_2", 0, UINT8_MAX, &mHiestPriAlarm2); + AddArgument("HIEST_PRI_ALARM_3", 0, UINT8_MAX, &mHiestPriAlarm3); + AddArgument("HIEST_PRI_ALARM_4", 0, UINT8_MAX, &mHiestPriAlarm4); + AddArgument("HIEST_PRI_ALARM_5", 0, UINT8_MAX, &mHiestPriAlarm5); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SMOKECO_2_6() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_2_6\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_2_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Report: TH subscribes to BatteryAlert attribute from DUT\n"); + err = TestReportThSubscribesToBatteryAlertAttributeFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH subscribes to BatteryAlert attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0003")) { + NextTest(); + return; + } + err = TestThSubscribesToBatteryAlertAttributeFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Report: TH subscribes to InterconnectSmokeAlarm attribute from DUT\n"); + err = TestReportThSubscribesToInterconnectSmokeAlarmAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH subscribes to InterconnectSmokeAlarm attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestThSubscribesToInterconnectSmokeAlarmAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Report: TH subscribes to InterconnectCOAlarm attribute from DUT\n"); + err = TestReportThSubscribesToInterconnectCOAlarmAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH subscribes to InterconnectCOAlarm attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { + NextTest(); + return; + } + err = TestThSubscribesToInterconnectCOAlarmAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Report: TH subscribes to COState attribute from DUT\n"); + err = TestReportThSubscribesToCOStateAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH subscribes to COState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0002")) { + NextTest(); + return; + } + err = TestThSubscribesToCOStateAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Report: TH subscribes to SmokeState attribute from DUT\n"); + err = TestReportThSubscribesToSmokeStateAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH subscribes to SmokeState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0001")) { + NextTest(); + return; + } + err = TestThSubscribesToSmokeStateAttributeFromDut_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster\n"); + if (ShouldSkip("DGGEN.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsTestEventTriggersEnabledAttributeFromGeneralDiagnosticsCluster_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Battery Alert Test Event\n"); + if (ShouldSkip("DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningBatteryAlertTestEvent_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds\n"); + if (ShouldSkip("SMOKECO.S.A0003")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_14(); + break; + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event\n"); + if (ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEvent_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 " + "seconds\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event\n"); + if (ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEvent_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 " + "seconds\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event\n"); + if (ShouldSkip("DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningCoAlarmTestEvent_19(); + break; + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH waits for a report of COState attribute from DUT with a timeout of 300 seconds\n"); + if (ShouldSkip("SMOKECO.S.A0002")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_20(); + break; + case 21: + ChipLogProgress(chipTool, + " ***** Test Step 21 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event\n"); + if (ShouldSkip("DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningSmokeAlarmTestEvent_21(); + break; + case 22: + ChipLogProgress(chipTool, + " ***** Test Step 22 : TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds\n"); + if (ShouldSkip("SMOKECO.S.A0001")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear\n"); + if (ShouldSkip("DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForSmokeAlarmTestEventClear_24(); + break; + case 25: + ChipLogProgress(chipTool, + " ***** Test Step 25 : TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds\n"); + if (ShouldSkip("SMOKECO.S.A0001")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_26(); + break; + case 27: + ChipLogProgress(chipTool, + " ***** Test Step 27 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event clear\n"); + if (ShouldSkip("DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForCoAlarmTestEventClear_27(); + break; + case 28: + ChipLogProgress(chipTool, + " ***** Test Step 28 : TH waits for a report of COState attribute from DUT with a timeout of 300 seconds\n"); + if (ShouldSkip("SMOKECO.S.A0002")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_29(); + break; + case 30: + ChipLogProgress(chipTool, + " ***** Test Step 30 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear\n"); + if (ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEventClear_30(); + break; + case 31: + ChipLogProgress(chipTool, + " ***** Test Step 31 : TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 " + "seconds\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_32(); + break; + case 33: + ChipLogProgress(chipTool, + " ***** Test Step 33 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear\n"); + if (ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEventClear_33(); + break; + case 34: + ChipLogProgress(chipTool, + " ***** Test Step 34 : TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 " + "seconds\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_35(); + break; + case 36: + ChipLogProgress(chipTool, + " ***** Test Step 36 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Battery Alert Test Event Clear\n"); + if (ShouldSkip("DGGEN.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForBatteryAlertTestEventClear_36(); + break; + case 37: + ChipLogProgress(chipTool, + " ***** Test Step 37 : TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds\n"); + if (ShouldSkip("SMOKECO.S.A0003")) { + NextTest(); + return; + } + err = TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads ExpressedState attribute from DUT\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsExpressedStateAttributeFromDut_38(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(3090)); } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 39; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + chip::Optional mTestEventTriggerKey; + chip::Optional mTestEventTriggerWarningSmokeAlarm; + chip::Optional mTestEventTriggerSmokeAlarmClear; + chip::Optional mTestEventTriggerWarningCoAlarm; + chip::Optional mTestEventTriggerCoAlarmClear; + chip::Optional mTestEventTriggerWarningBatteryAlert; + chip::Optional mTestEventTriggerBatteryAlertClear; + chip::Optional mTestEventTriggerInterconnectSmokeAlarm; + chip::Optional mTestEventTriggerInterconnectSmokeAlarmClear; + chip::Optional mTestEventTriggerInterconnectCoAlarm; + chip::Optional mTestEventTriggerInterconnectCoAlarmClear; + chip::Optional mHiestPriAlarm; + chip::Optional mHiestPriAlarm2; + chip::Optional mHiestPriAlarm3; + chip::Optional mHiestPriAlarm4; + chip::Optional mHiestPriAlarm5; + + CHIP_ERROR TestCommissionDutToTh_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ExpressedState", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + bool testSendClusterTest_TC_SMOKECO_2_6_2_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = nil; + + CHIP_ERROR TestReportThSubscribesToBatteryAlertAttributeFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: TH subscribes to BatteryAlert attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("BatteryAlert", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); + testSendClusterTest_TC_SMOKECO_2_6_2_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSubscribesToBatteryAlertAttributeFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 3U; + uint16_t maxIntervalArgument = 30U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = true; + [cluster subscribeAttributeBatteryAlertWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_SMOKECO_2_6_2_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH subscribes to BatteryAlert attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported != nil) { + ResponseHandler callback = test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported; + test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + bool testSendClusterTest_TC_SMOKECO_2_6_4_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = nil; + + CHIP_ERROR TestReportThSubscribesToInterconnectSmokeAlarmAttributeFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: TH subscribes to InterconnectSmokeAlarm attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("InterconnectSmokeAlarm", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); + testSendClusterTest_TC_SMOKECO_2_6_4_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSubscribesToInterconnectSmokeAlarmAttributeFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 3U; + uint16_t maxIntervalArgument = 30U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = false; + [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_SMOKECO_2_6_4_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH subscribes to InterconnectSmokeAlarm attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported != nil) { + ResponseHandler callback = test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported; + test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + bool testSendClusterTest_TC_SMOKECO_2_6_6_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = nil; + + CHIP_ERROR TestReportThSubscribesToInterconnectCOAlarmAttributeFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: TH subscribes to InterconnectCOAlarm attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("InterconnectCOAlarm", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); + testSendClusterTest_TC_SMOKECO_2_6_6_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSubscribesToInterconnectCOAlarmAttributeFromDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 3U; + uint16_t maxIntervalArgument = 30U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = false; + [cluster subscribeAttributeInterconnectCOAlarmWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_SMOKECO_2_6_6_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH subscribes to InterconnectCOAlarm attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported != nil) { + ResponseHandler callback = test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported; + test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + bool testSendClusterTest_TC_SMOKECO_2_6_8_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_COState_Reported = nil; + + CHIP_ERROR TestReportThSubscribesToCOStateAttributeFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_COState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: TH subscribes to COState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("COState", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); + testSendClusterTest_TC_SMOKECO_2_6_8_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSubscribesToCOStateAttributeFromDut_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 3U; + uint16_t maxIntervalArgument = 30U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = false; + [cluster subscribeAttributeCOStateWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn( + testSendClusterTest_TC_SMOKECO_2_6_8_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH subscribes to COState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_SMOKECO_2_6_COState_Reported != nil) { + ResponseHandler callback = test_Test_TC_SMOKECO_2_6_COState_Reported; + test_Test_TC_SMOKECO_2_6_COState_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + bool testSendClusterTest_TC_SMOKECO_2_6_10_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_SmokeState_Reported = nil; + + CHIP_ERROR TestReportThSubscribesToSmokeStateAttributeFromDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_SmokeState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Report: TH subscribes to SmokeState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("SmokeState", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); + testSendClusterTest_TC_SMOKECO_2_6_10_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSubscribesToSmokeStateAttributeFromDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 3U; + uint16_t maxIntervalArgument = 30U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) + maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = false; + [cluster subscribeAttributeSmokeStateWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn(testSendClusterTest_TC_SMOKECO_2_6_10_WaitForReport_Fulfilled, + SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH subscribes to SmokeState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_Test_TC_SMOKECO_2_6_SmokeState_Reported != nil) { + ResponseHandler callback = test_Test_TC_SMOKECO_2_6_SmokeState_Reported; + test_Test_TC_SMOKECO_2_6_SmokeState_Reported = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTestEventTriggersEnabledAttributeFromGeneralDiagnosticsCluster_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TestEventTriggersEnabled", actualValue, 1)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningBatteryAlertTestEvent_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerWarningBatteryAlert.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerWarningBatteryAlert.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff00000095ULL]; + [cluster + testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Battery Alert Test Event Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("BatteryAlert", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEvent_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerInterconnectSmokeAlarm.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectSmokeAlarm.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff00000092ULL]; + [cluster + testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog( + @"TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("interconnectSmokeAlarm", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("interconnectSmokeAlarm", [value unsignedCharValue], 2U)); + + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEvent_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerInterconnectCoAlarm.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectCoAlarm.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff00000094ULL]; + [cluster + testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("interconnectCOAlarm", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("interconnectCOAlarm", [value unsignedCharValue], 2U)); + + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningCoAlarmTestEvent_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerWarningCoAlarm.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerWarningCoAlarm.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff00000091ULL]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " + @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_COState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of COState attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("COState", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningSmokeAlarmTestEvent_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerWarningSmokeAlarm.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerWarningSmokeAlarm.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff00000090ULL]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " + @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_SmokeState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("SmokeState", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ExpressedState", actualValue, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForSmokeAlarmTestEventClear_24() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerSmokeAlarmClear.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerSmokeAlarmClear.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a0ULL]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " + @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_25() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_SmokeState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("SmokeState", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_26() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("ExpressedState", actualValue, mHiestPriAlarm2.HasValue() ? mHiestPriAlarm2.Value() : 2U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForCoAlarmTestEventClear_27() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerCoAlarmClear.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerCoAlarmClear.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a1ULL]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " + @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event clear Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_COState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of COState attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("COState", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_29() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("ExpressedState", actualValue, mHiestPriAlarm3.HasValue() ? mHiestPriAlarm3.Value() : 7U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEventClear_30() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerInterconnectCoAlarmClear.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectCoAlarmClear.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a4ULL]; + [cluster + testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_31() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("InterconnectCOAlarm", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_32() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("ExpressedState", actualValue, mHiestPriAlarm4.HasValue() ? mHiestPriAlarm4.Value() : 7U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEventClear_33() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerInterconnectSmokeAlarmClear.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectSmokeAlarmClear.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a2ULL]; + [cluster + testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " + @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_34() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog( + @"TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("InterconnectSmokeAlarm", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_35() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("ExpressedState", actualValue, mHiestPriAlarm5.HasValue() ? mHiestPriAlarm5.Value() : 3U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForBatteryAlertTestEventClear_36() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.enableKey = mTestEventTriggerKey.HasValue() + ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] + : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; + params.eventTrigger = mTestEventTriggerBatteryAlertClear.HasValue() + ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerBatteryAlertClear.Value()] + : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a5ULL]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " + @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " + @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Battery Alert Test Event Clear Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_37() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("BatteryAlert", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); + NextTest(); + }; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_38() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ExpressedState", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_SWTCH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -174668,6 +177515,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), From f733eaaa6409fc5126b1e33bb53c810ff31fe04d Mon Sep 17 00:00:00 2001 From: akash1-kumar <115205462+akash1-kumar@users.noreply.github.com> Date: Thu, 27 Jul 2023 20:37:06 +0530 Subject: [PATCH 054/159] [Tizen] Add full wifi scan for empty ssid (#28318) * [Tizen] Add full wifi scan for empty ssid This patch: - Adds logic to do the full wifi scan when ssid sent from TizenWiFiDriver::ScanNetworks is empty. Signed-off-by: Akash Kumar * Restyled commit Signed-off-by: Akash Kumar --------- Signed-off-by: Akash Kumar --- src/platform/Tizen/WiFiManager.cpp | 88 ++++++++++++++++++++---------- src/platform/Tizen/WiFiManager.h | 7 ++- 2 files changed, 64 insertions(+), 31 deletions(-) diff --git a/src/platform/Tizen/WiFiManager.cpp b/src/platform/Tizen/WiFiManager.cpp index b13657e0d66c03..cc0369120b11b0 100644 --- a/src/platform/Tizen/WiFiManager.cpp +++ b/src/platform/Tizen/WiFiManager.cpp @@ -344,29 +344,42 @@ void WiFiManager::_ScanToConnectFinishedCb(wifi_manager_error_e wifiErr, void * } } -void WiFiManager::_ScanFinishedCb(wifi_manager_error_e wifiErr, void * userData) +void WiFiManager::_UpdateScanCallback(void * scanCbData) { - if (wifiErr == WIFI_MANAGER_ERROR_NONE) - { - std::vector networkScanned; - int err = wifi_manager_foreach_found_specific_ap(sInstance.mWiFiManagerHandle, _FoundAPOnScanCb, &networkScanned); - - VerifyOrReturn(err == WIFI_MANAGER_ERROR_NONE, - ChipLogError(DeviceLayer, "FAIL: get scan list [%s]", get_error_message(err))); + auto networkScanned = static_cast *>(scanCbData); - chip::DeviceLayer::PlatformMgr().LockChipStack(); - if (sInstance.mpScanCallback != nullptr) - { - TizenScanResponseIterator iter(&networkScanned); - sInstance.mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter); - sInstance.mpScanCallback = nullptr; - } - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - } - else + chip::DeviceLayer::PlatformMgr().LockChipStack(); + if (sInstance.mpScanCallback != nullptr) { - ChipLogError(DeviceLayer, "FAIL: scan WiFi [%s]", get_error_message(wifiErr)); + TizenScanResponseIterator iter(networkScanned); + sInstance.mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter); + sInstance.mpScanCallback = nullptr; } + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); +} + +void WiFiManager::_SpecificScanFinishedCb(wifi_manager_error_e wifiErr, void * userData) +{ + VerifyOrReturn(wifiErr == WIFI_MANAGER_ERROR_NONE, + ChipLogError(DeviceLayer, "FAIL: scan WiFi [%s]", get_error_message(wifiErr))); + + std::vector networkScanned; + int err = wifi_manager_foreach_found_specific_ap(sInstance.mWiFiManagerHandle, _FoundAPOnScanCb, &networkScanned); + + VerifyOrReturn(err == WIFI_MANAGER_ERROR_NONE, ChipLogError(DeviceLayer, "FAIL: get scan list [%s]", get_error_message(err))); + _UpdateScanCallback(&networkScanned); +} + +void WiFiManager::_FullScanFinishedCb(wifi_manager_error_e wifiErr, void * userData) +{ + VerifyOrReturn(wifiErr == WIFI_MANAGER_ERROR_NONE, + ChipLogError(DeviceLayer, "FAIL: scan WiFi [%s]", get_error_message(wifiErr))); + + std::vector networkScanned; + int err = wifi_manager_foreach_found_ap(sInstance.mWiFiManagerHandle, _FoundAPOnScanCb, &networkScanned); + + VerifyOrReturn(err == WIFI_MANAGER_ERROR_NONE, ChipLogError(DeviceLayer, "FAIL: get scan list [%s]", get_error_message(err))); + _UpdateScanCallback(&networkScanned); } bool WiFiManager::_FoundAPOnScanCb(wifi_manager_ap_h ap, void * userData) @@ -577,15 +590,26 @@ CHIP_ERROR WiFiManager::_WiFiScanToConnect(gpointer userData) return CHIP_NO_ERROR; } -CHIP_ERROR WiFiManager::_WiFiScan(gpointer userData) +CHIP_ERROR WiFiManager::_WiFiSpecificScan(gpointer userData) { - int wifiErr; + int wifiErr = + wifi_manager_scan_specific_ap(sInstance.mWiFiManagerHandle, sInstance.mInterestedSSID, _SpecificScanFinishedCb, nullptr); - wifiErr = wifi_manager_scan_specific_ap(sInstance.mWiFiManagerHandle, sInstance.mInterestedSSID, _ScanFinishedCb, nullptr); VerifyOrReturnError(wifiErr == WIFI_MANAGER_ERROR_NONE, CHIP_ERROR_INTERNAL, ChipLogError(DeviceLayer, "FAIL: request WiFi scan [%s]", get_error_message(wifiErr))); - ChipLogProgress(DeviceLayer, "WiFi scan is requested"); + ChipLogProgress(DeviceLayer, "WiFi specific scan is requested"); + return CHIP_NO_ERROR; +} + +CHIP_ERROR WiFiManager::_WiFiFullScan(gpointer userData) +{ + int wifiErr = wifi_manager_scan(sInstance.mWiFiManagerHandle, _FullScanFinishedCb, nullptr); + + VerifyOrReturnError(wifiErr == WIFI_MANAGER_ERROR_NONE, CHIP_ERROR_INTERNAL, + ChipLogError(DeviceLayer, "FAIL: request WiFi scan [%s]", get_error_message(wifiErr))); + + ChipLogProgress(DeviceLayer, "WiFi full scan is requested"); return CHIP_NO_ERROR; } @@ -919,19 +943,25 @@ CHIP_ERROR WiFiManager::StartWiFiScan(ByteSpan ssid, DeviceLayer::NetworkCommiss int wifiErr = WIFI_MANAGER_ERROR_NONE; bool isWiFiActivated = false; - memcpy(sInstance.mInterestedSSID, ssid.data(), ssid.size()); - sInstance.mInterestedSSID[ssid.size()] = '\0'; - wifiErr = wifi_manager_is_activated(sInstance.mWiFiManagerHandle, &isWiFiActivated); VerifyOrExit(wifiErr == WIFI_MANAGER_ERROR_NONE, err = CHIP_ERROR_INCORRECT_STATE; ChipLogError(DeviceLayer, "FAIL: check whether WiFi is activated [%s]", get_error_message(wifiErr))); VerifyOrExit(isWiFiActivated == true, ChipLogProgress(DeviceLayer, "WiFi is deactivated")); - sInstance.mpScanCallback = callback; - err = PlatformMgrImpl().GLibMatterContextInvokeSync(_WiFiScan, static_cast(nullptr)); - SuccessOrExit(err); + if (ssid.size() > 0) + { + memcpy(sInstance.mInterestedSSID, ssid.data(), ssid.size()); + sInstance.mInterestedSSID[ssid.size()] = '\0'; + err = PlatformMgrImpl().GLibMatterContextInvokeSync(_WiFiSpecificScan, static_cast(nullptr)); + } + else + { + err = PlatformMgrImpl().GLibMatterContextInvokeSync(_WiFiFullScan, static_cast(nullptr)); + } + + SuccessOrExit(err); exit: return err; } diff --git a/src/platform/Tizen/WiFiManager.h b/src/platform/Tizen/WiFiManager.h index b9b21bb6ab761a..8e24b6636763c3 100644 --- a/src/platform/Tizen/WiFiManager.h +++ b/src/platform/Tizen/WiFiManager.h @@ -70,16 +70,19 @@ class WiFiManager static void _ActivateCb(wifi_manager_error_e wifiErr, void * userData); static void _DeactivateCb(wifi_manager_error_e wifiErr, void * userData); static void _ScanToConnectFinishedCb(wifi_manager_error_e wifiErr, void * userData); - static void _ScanFinishedCb(wifi_manager_error_e wifiErr, void * userData); + static void _SpecificScanFinishedCb(wifi_manager_error_e wifiErr, void * userData); + static void _FullScanFinishedCb(wifi_manager_error_e wifiErr, void * userData); static bool _FoundAPOnScanCb(wifi_manager_ap_h ap, void * userData); static bool _FoundAPCb(wifi_manager_ap_h ap, void * userData); static void _ConnectedCb(wifi_manager_error_e wifiErr, void * userData); static bool _ConfigListCb(const wifi_manager_config_h config, void * userData); + static void _UpdateScanCallback(void * scanCbData); static CHIP_ERROR _WiFiInitialize(gpointer userData); static CHIP_ERROR _WiFiActivate(gpointer userData); static CHIP_ERROR _WiFiDeactivate(gpointer userData); - static CHIP_ERROR _WiFiScan(gpointer userData); + static CHIP_ERROR _WiFiSpecificScan(gpointer userData); + static CHIP_ERROR _WiFiFullScan(gpointer userData); static CHIP_ERROR _WiFiScanToConnect(gpointer userData); static CHIP_ERROR _WiFiConnect(wifi_manager_ap_h ap); From d7a7dee7ede44ef03f9cd4ad23768c5ab8c75863 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 27 Jul 2023 11:16:38 -0400 Subject: [PATCH 055/159] Allow failure for noip builds for chef (#28331) --- integrations/cloudbuild/chef.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 4ec78c51730b1a..d725de837b0fb2 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -33,6 +33,12 @@ steps: args: - ./examples/chef/chef.py --build_all --build_include linux_arm64_ipv6only.*noip + # Temporarely allow failure since this is known to fail: + # AppMain tries to setup commissioning in general (even if all things are + # disabled, ethernet assumes network commissioning cluster) and link fails + # when the cluster is fully disabled + # TODO: completely remove this target or fix compilation + allowFailure: true id: CompileNoip waitFor: - CompileAll From 2b76339faa2590a090281896c6dfd8222076749c Mon Sep 17 00:00:00 2001 From: chulspro Date: Fri, 28 Jul 2023 00:35:04 +0900 Subject: [PATCH 056/159] [Android] Apply 'AppDelegate' for android app server (#28286) * Apply 'AppDelegate' for android app server * Add 'starAppWithDelegate' api * Add 'ChipAppServerDelegate' interface Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format Signed-off-by: Charles Kim * Restyled by google-java-format Signed-off-by: Charles Kim --------- Signed-off-by: Jaehoon You Signed-off-by: Charles Kim Co-authored-by: Jaehoon You Co-authored-by: Restyled.io --- .../device/app/core/matter/MatterApp.kt | 48 ++++++ .../server/java/AndroidAppServerWrapper.cpp | 7 +- src/app/server/java/AndroidAppServerWrapper.h | 3 +- src/app/server/java/BUILD.gn | 3 + src/app/server/java/CHIPAppServer-JNI.cpp | 25 +++ src/app/server/java/ChipAppServerDelegate.cpp | 159 ++++++++++++++++++ src/app/server/java/ChipAppServerDelegate.h | 44 +++++ .../src/chip/appserver/ChipAppServer.java | 2 + .../chip/appserver/ChipAppServerDelegate.java | 32 ++++ 9 files changed, 321 insertions(+), 2 deletions(-) create mode 100644 examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt create mode 100644 src/app/server/java/ChipAppServerDelegate.cpp create mode 100644 src/app/server/java/ChipAppServerDelegate.h create mode 100644 src/app/server/java/src/chip/appserver/ChipAppServerDelegate.java diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt new file mode 100644 index 00000000000000..19d73cced0f04b --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt @@ -0,0 +1,48 @@ +package com.matter.virtual.device.app.core.matter + +import chip.appserver.ChipAppServer +import chip.appserver.ChipAppServerDelegate +import javax.inject.Inject +import javax.inject.Singleton +import timber.log.Timber + +@Singleton +class MatterApp @Inject constructor() { + + private var chipAppServer: ChipAppServer? = null + + fun start() { + chipAppServer = ChipAppServer() + chipAppServer?.startAppWithDelegate( + object : ChipAppServerDelegate { + override fun onCommissioningSessionEstablishmentStarted() { + Timber.d("onCommissioningSessionEstablishmentStarted()") + } + + override fun onCommissioningSessionStarted() { + Timber.d("onCommissioningSessionStarted()") + } + + override fun onCommissioningSessionEstablishmentError(errorCode: Int) { + Timber.d("onCommissioningSessionEstablishmentError():$errorCode") + } + + override fun onCommissioningSessionStopped() { + Timber.d("onCommissioningSessionStopped()") + } + + override fun onCommissioningWindowOpened() { + Timber.d("onCommissioningWindowOpened()") + } + + override fun onCommissioningWindowClosed() { + Timber.d("onCommissioningWindowClosed()") + } + } + ) + } + + fun stop() { + chipAppServer?.stopApp() + } +} diff --git a/src/app/server/java/AndroidAppServerWrapper.cpp b/src/app/server/java/AndroidAppServerWrapper.cpp index 58eaa76bcbb7fb..ab88729d6f1d9b 100644 --- a/src/app/server/java/AndroidAppServerWrapper.cpp +++ b/src/app/server/java/AndroidAppServerWrapper.cpp @@ -38,7 +38,7 @@ using namespace chip::Inet; using namespace chip::Transport; using namespace chip::DeviceLayer; -CHIP_ERROR ChipAndroidAppInit(void) +CHIP_ERROR ChipAndroidAppInit(AppDelegate * appDelegate) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -50,6 +50,11 @@ CHIP_ERROR ChipAndroidAppInit(void) // Init ZCL Data Model and CHIP App Server static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); + if (appDelegate != nullptr) + { + initParams.appDelegate = appDelegate; + } + initParams.operationalServicePort = CHIP_PORT; initParams.userDirectedCommissioningPort = CHIP_UDC_PORT; diff --git a/src/app/server/java/AndroidAppServerWrapper.h b/src/app/server/java/AndroidAppServerWrapper.h index ef530de60e232c..19088b9913ada1 100644 --- a/src/app/server/java/AndroidAppServerWrapper.h +++ b/src/app/server/java/AndroidAppServerWrapper.h @@ -17,10 +17,11 @@ */ #pragma once +#include #include #include -CHIP_ERROR ChipAndroidAppInit(void); +CHIP_ERROR ChipAndroidAppInit(AppDelegate * appDelegate = nullptr); void ChipAndroidAppShutdown(void); diff --git a/src/app/server/java/BUILD.gn b/src/app/server/java/BUILD.gn index a99d98ebb842fd..c25548eb112549 100644 --- a/src/app/server/java/BUILD.gn +++ b/src/app/server/java/BUILD.gn @@ -27,6 +27,8 @@ static_library("jni") { "AndroidAppServerWrapper.cpp", "AndroidAppServerWrapper.h", "CHIPAppServer-JNI.cpp", + "ChipAppServerDelegate.cpp", + "ChipAppServerDelegate.h", "ChipFabricProvider-JNI.cpp", "ChipFabricProvider-JNI.h", "ChipThreadWork.cpp", @@ -62,6 +64,7 @@ android_library("java") { sources = [ "src/chip/appserver/ChipAppServer.java", + "src/chip/appserver/ChipAppServerDelegate.java", "src/chip/appserver/ChipAppServerException.java", "src/chip/appserver/ChipFabricProvider.java", "src/chip/appserver/Fabric.java", diff --git a/src/app/server/java/CHIPAppServer-JNI.cpp b/src/app/server/java/CHIPAppServer-JNI.cpp index de7109a7245165..1b486f1bd3ac82 100644 --- a/src/app/server/java/CHIPAppServer-JNI.cpp +++ b/src/app/server/java/CHIPAppServer-JNI.cpp @@ -22,6 +22,7 @@ * */ #include "AndroidAppServerWrapper.h" +#include "ChipAppServerDelegate.h" #include "ChipFabricProvider-JNI.h" #include "ChipThreadWork.h" #include @@ -53,6 +54,7 @@ namespace { JavaVM * sJVM; pthread_t sIOThread = PTHREAD_NULL; jclass sChipAppServerExceptionCls = NULL; +ChipAppServerDelegate sChipAppServerDelegate; } // namespace jint AndroidAppServerJNI_OnLoad(JavaVM * jvm, void * reserved) @@ -134,6 +136,29 @@ JNI_METHOD(jboolean, startApp)(JNIEnv * env, jobject self) return JNI_TRUE; } +JNI_METHOD(jboolean, startAppWithDelegate)(JNIEnv * env, jobject self, jobject appDelegate) +{ + chip::DeviceLayer::StackLock lock; + + CHIP_ERROR err = sChipAppServerDelegate.InitializeWithObjects(appDelegate); + SuccessOrExit(err); + + err = ChipAndroidAppInit(&sChipAppServerDelegate); + SuccessOrExit(err); + + if (sIOThread == PTHREAD_NULL) + { + pthread_create(&sIOThread, NULL, IOThreadAppMain, NULL); + } + +exit: + if (err != CHIP_NO_ERROR) + { + return JNI_FALSE; + } + return JNI_TRUE; +} + JNI_METHOD(jboolean, stopApp)(JNIEnv * env, jobject self) { chip::ThreadWork::ChipMainThreadScheduleAndWait([] { ChipAndroidAppShutdown(); }); diff --git a/src/app/server/java/ChipAppServerDelegate.cpp b/src/app/server/java/ChipAppServerDelegate.cpp new file mode 100644 index 00000000000000..50d76c63d59423 --- /dev/null +++ b/src/app/server/java/ChipAppServerDelegate.cpp @@ -0,0 +1,159 @@ +/* + * + * 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. + */ + +#include "ChipAppServerDelegate.h" +#include +#include + +using namespace chip; + +void ChipAppServerDelegate::OnCommissioningSessionEstablishmentStarted() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(AppServer, "JNIEnv is nullptr")); + VerifyOrReturn(mOnCommissioningSessionEstablishmentStartedMethod != nullptr, + ChipLogError(AppServer, "mOnCommissioningSessionEstablishmentStartedMethod is nullptr")); + + env->ExceptionClear(); + env->CallVoidMethod(mChipAppServerDelegateObject, mOnCommissioningSessionEstablishmentStartedMethod); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in OnCommissioningSessionEstablishmentStartedMethod"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} + +void ChipAppServerDelegate::OnCommissioningSessionStarted() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(AppServer, "JNIEnv is nullptr")); + VerifyOrReturn(mOnCommissioningSessionStartedMethod != nullptr, + ChipLogError(AppServer, "mOnCommissioningSessionStartedMethod is nullptr")); + + env->ExceptionClear(); + env->CallVoidMethod(mChipAppServerDelegateObject, mOnCommissioningSessionStartedMethod); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in OnCommissioningSessionStartedMethod"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} + +void ChipAppServerDelegate::OnCommissioningSessionEstablishmentError(CHIP_ERROR err) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(AppServer, "JNIEnv is nullptr")); + VerifyOrReturn(mOnCommissioningSessionEstablishmentErrorMethod != nullptr, + ChipLogError(AppServer, "mOnCommissioningSessionEstablishmentErrorMethod is nullptr")); + + env->ExceptionClear(); + env->CallVoidMethod(mChipAppServerDelegateObject, mOnCommissioningSessionEstablishmentErrorMethod, + static_cast(err.AsInteger())); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in OnCommissioningSessionEstablishmentErrorMethod"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} + +void ChipAppServerDelegate::OnCommissioningSessionStopped() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(AppServer, "JNIEnv is nullptr")); + VerifyOrReturn(mOnCommissioningSessionStoppedMethod != nullptr, + ChipLogError(AppServer, "mOnCommissioningSessionStoppedMethod is nullptr")); + + env->ExceptionClear(); + env->CallVoidMethod(mChipAppServerDelegateObject, mOnCommissioningSessionStoppedMethod); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in OnCommissioningSessionStoppedMethod"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} + +void ChipAppServerDelegate::OnCommissioningWindowOpened() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(AppServer, "JNIEnv is nullptr")); + VerifyOrReturn(mOnCommissioningWindowOpenedMethod != nullptr, + ChipLogError(AppServer, "mOnCommissioningWindowOpenedMethod is nullptr")); + + env->ExceptionClear(); + env->CallVoidMethod(mChipAppServerDelegateObject, mOnCommissioningWindowOpenedMethod); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in OnCommissioningWindowOpenedMethod"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} + +void ChipAppServerDelegate::OnCommissioningWindowClosed() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(AppServer, "JNIEnv is nullptr")); + VerifyOrReturn(mOnCommissioningWindowClosedMethod != nullptr, + ChipLogError(AppServer, "mOnCommissioningWindowClosedMethod is nullptr")); + + env->ExceptionClear(); + env->CallVoidMethod(mChipAppServerDelegateObject, mOnCommissioningWindowClosedMethod); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in OnCommissioningWindowClosedMethod"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} + +CHIP_ERROR ChipAppServerDelegate::InitializeWithObjects(jobject appDelegateObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnLogError(env != nullptr, CHIP_JNI_ERROR_NO_ENV); + + mChipAppServerDelegateObject = env->NewGlobalRef(appDelegateObject); + VerifyOrReturnLogError(mChipAppServerDelegateObject != nullptr, CHIP_JNI_ERROR_NULL_OBJECT); + + jclass chipAppServerDelegateClass = env->GetObjectClass(mChipAppServerDelegateObject); + VerifyOrReturnLogError(chipAppServerDelegateClass != nullptr, CHIP_JNI_ERROR_JAVA_ERROR); + + mOnCommissioningSessionEstablishmentStartedMethod = + env->GetMethodID(chipAppServerDelegateClass, "onCommissioningSessionEstablishmentStarted", "()V"); + VerifyOrReturnLogError(mOnCommissioningSessionEstablishmentStartedMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + mOnCommissioningSessionStartedMethod = env->GetMethodID(chipAppServerDelegateClass, "onCommissioningSessionStarted", "()V"); + VerifyOrReturnLogError(mOnCommissioningSessionStartedMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + mOnCommissioningSessionEstablishmentErrorMethod = + env->GetMethodID(chipAppServerDelegateClass, "onCommissioningSessionEstablishmentError", "(I)V"); + VerifyOrReturnLogError(mOnCommissioningSessionEstablishmentErrorMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + mOnCommissioningSessionStoppedMethod = env->GetMethodID(chipAppServerDelegateClass, "onCommissioningSessionStopped", "()V"); + VerifyOrReturnLogError(mOnCommissioningSessionStoppedMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + mOnCommissioningWindowOpenedMethod = env->GetMethodID(chipAppServerDelegateClass, "onCommissioningWindowOpened", "()V"); + VerifyOrReturnLogError(mOnCommissioningWindowOpenedMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + mOnCommissioningWindowClosedMethod = env->GetMethodID(chipAppServerDelegateClass, "onCommissioningWindowClosed", "()V"); + VerifyOrReturnLogError(mOnCommissioningWindowClosedMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + return CHIP_NO_ERROR; +} diff --git a/src/app/server/java/ChipAppServerDelegate.h b/src/app/server/java/ChipAppServerDelegate.h new file mode 100644 index 00000000000000..42df60605de39a --- /dev/null +++ b/src/app/server/java/ChipAppServerDelegate.h @@ -0,0 +1,44 @@ +/* + * + * 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 +#include +#include + +class ChipAppServerDelegate : public AppDelegate +{ +public: + void OnCommissioningSessionEstablishmentStarted() override; + void OnCommissioningSessionStarted() override; + void OnCommissioningSessionEstablishmentError(CHIP_ERROR err) override; + void OnCommissioningSessionStopped() override; + void OnCommissioningWindowOpened() override; + void OnCommissioningWindowClosed() override; + + CHIP_ERROR InitializeWithObjects(jobject appDelegateObject); + +private: + jobject mChipAppServerDelegateObject = nullptr; + jmethodID mOnCommissioningSessionEstablishmentStartedMethod = nullptr; + jmethodID mOnCommissioningSessionStartedMethod = nullptr; + jmethodID mOnCommissioningSessionEstablishmentErrorMethod = nullptr; + jmethodID mOnCommissioningSessionStoppedMethod = nullptr; + jmethodID mOnCommissioningWindowOpenedMethod = nullptr; + jmethodID mOnCommissioningWindowClosedMethod = nullptr; +}; diff --git a/src/app/server/java/src/chip/appserver/ChipAppServer.java b/src/app/server/java/src/chip/appserver/ChipAppServer.java index 4b414070a12fcf..e501329085522f 100644 --- a/src/app/server/java/src/chip/appserver/ChipAppServer.java +++ b/src/app/server/java/src/chip/appserver/ChipAppServer.java @@ -36,5 +36,7 @@ public ChipFabricProvider getFabricProvider() { public native boolean startApp(); + public native boolean startAppWithDelegate(ChipAppServerDelegate appDelegate); + public native boolean stopApp(); } diff --git a/src/app/server/java/src/chip/appserver/ChipAppServerDelegate.java b/src/app/server/java/src/chip/appserver/ChipAppServerDelegate.java new file mode 100644 index 00000000000000..28daed388331c9 --- /dev/null +++ b/src/app/server/java/src/chip/appserver/ChipAppServerDelegate.java @@ -0,0 +1,32 @@ +/* + * 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. + * 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. + * + */ +package chip.appserver; + +public interface ChipAppServerDelegate { + void onCommissioningSessionEstablishmentStarted(); + + void onCommissioningSessionStarted(); + + void onCommissioningSessionEstablishmentError(int errorCode); + + void onCommissioningSessionStopped(); + + void onCommissioningWindowOpened(); + + void onCommissioningWindowClosed(); +} From 0da4af6ad8f23139e8be7e27e0243c6e446ce006 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 27 Jul 2023 12:20:59 -0400 Subject: [PATCH 057/159] Timesync commissioner: Fix TrustedTimeSource. (#28284) Turns out I never set it, and the tests didn't catch it because I was so preocupied with validating the state machine that I never checked the actual values. Whoops. Test: Please see test included in PR. --- src/controller/CHIPDeviceController.cpp | 2 +- .../TestCommissioningTimeSync.py | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 037c058d033786..babc6688ad45c1 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -2678,7 +2678,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio return; } TimeSynchronization::Commands::SetTrustedTimeSource::Type request; - request.trustedTimeSource.SetNull(); + request.trustedTimeSource = params.GetTrustedTimeSource().Value(); SendCommand(proxy, request, OnBasicSuccess, OnBasicFailure, endpoint, timeout); break; } diff --git a/src/python_testing/TestCommissioningTimeSync.py b/src/python_testing/TestCommissioningTimeSync.py index 5ff06e4271fbe6..efbb77ebdbfdfc 100644 --- a/src/python_testing/TestCommissioningTimeSync.py +++ b/src/python_testing/TestCommissioningTimeSync.py @@ -117,7 +117,8 @@ async def commission_stages(self, time_zone: bool, dst: bool, default_ntp: bool, self.commissioner.SetTimeZone(offset=3600, validAt=0) if dst: six_months = 1.577e+13 # in us - self.commissioner.SetDSTOffset(offset=3600, validStarting=0, validUntil=utc_time_in_matter_epoch() + int(six_months)) + dst_valid_until = utc_time_in_matter_epoch() + int(six_months) + self.commissioner.SetDSTOffset(offset=3600, validStarting=0, validUntil=dst_valid_until) if default_ntp: self.commissioner.SetDefaultNTP("fe80::1") if trusted_time_source: @@ -130,7 +131,6 @@ async def commission_stages(self, time_zone: bool, dst: bool, default_ntp: bool, should_set_default_ntp = bool(self.supports_default_ntp and default_ntp) should_set_trusted_time = bool(self.supports_trusted_time_source and trusted_time_source) - print(f'{should_set_time_zone} {should_set_dst} {should_set_default_ntp} {should_set_trusted_time}') asserts.assert_equal(self.commissioner.CheckStageSuccessful(kConfigureTimeZone), should_set_time_zone, 'Incorrect value for time zone stage check') asserts.assert_equal(self.commissioner.CheckStageSuccessful(kConfigureDSTOffset), @@ -140,6 +140,29 @@ async def commission_stages(self, time_zone: bool, dst: bool, default_ntp: bool, asserts.assert_equal(self.commissioner.CheckStageSuccessful(kConfigureTrustedTimeSource), should_set_trusted_time, 'Incorrect value for kConfigureTrustedTimeSource stage') + if should_set_time_zone: + received = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.TimeZone) + expected = [Clusters.TimeSynchronization.Structs.TimeZoneStruct(offset=3600, validAt=0)] + asserts.assert_equal(received, expected, "Time zone was not correctly set by commissioner") + + if should_set_dst: + received = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.DSTOffset) + expected = [Clusters.TimeSynchronization.Structs.DSTOffsetStruct( + offset=3600, validStarting=0, validUntil=dst_valid_until)] + asserts.assert_equal(received, expected, "DST was not set correctly by the commissioner") + + if should_set_trusted_time: + fabric_idx = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.CurrentFabricIndex, dev_ctrl=self.commissioner) + received = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.TrustedTimeSource) + expected = Clusters.TimeSynchronization.Structs.TrustedTimeSourceStruct( + fabricIndex=fabric_idx, nodeID=self.commissioner.nodeId, endpoint=0) + asserts.assert_equal(received, expected, "Trusted Time source was not set properly") + + if should_set_default_ntp: + received = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.DefaultNTP) + expected = "fe80::1" + asserts.assert_equal(received, expected, "Default NTP was not set properly") + @async_test_body async def test_CommissioningAllBasic(self): # We want to assess all combos (ie, all flags in the range of 0b0000 to 0b1111) From 30eb0c4861c32c2daa99e863c7b7bde1e129b55e Mon Sep 17 00:00:00 2001 From: Matt Hazley Date: Thu, 27 Jul 2023 19:37:43 +0100 Subject: [PATCH 058/159] Add Air Purifer device to `chef` (#28336) * Adding Air Purifier and Air Quality Sensor devices into the chef support code * Adding zapfile and matter file for an Air Purifier with all optional endpoints --- ...umiditysensor_thermostat_56de3d5f45.matter | 2358 ++ ...r_humiditysensor_thermostat_56de3d5f45.zap | 17754 ++++++++++++++++ .../sample_app_util/matter_device_types.json | 4 +- 3 files changed, 20115 insertions(+), 1 deletion(-) create mode 100644 examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter create mode 100644 examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter new file mode 100644 index 00000000000000..8219da431bdf80 --- /dev/null +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -0,0 +1,2358 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + 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 access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 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; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + 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 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. */ +server cluster AccessControl = 31 { + 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) 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. */ +server cluster BasicInformation = 40 { + 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 char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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 is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + 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; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + 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; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + 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 int8u scanMaxTimeSeconds = 2; + readonly attribute 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 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; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 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 RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** 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. */ +server cluster GeneralDiagnostics = 51 { + 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; + } + + 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 int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute 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; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +server cluster Switch = 59 { + bitmap Feature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 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; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u 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 salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + 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. */ +server cluster OperationalCredentials = 62 { + 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 attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + 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; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes for reporting air quality classification */ +server cluster AirQuality = 91 { + enum AirQualityEnum : ENUM8 { + kUnknown = 0; + kGood = 1; + kFair = 2; + kModerate = 3; + kPoor = 4; + kVeryPoor = 5; + kExtremelyPoor = 6; + } + + bitmap Feature : BITMAP32 { + kFair = 0x1; + kModerate = 0x2; + kVeryPoor = 0x4; + kExtremelyPoor = 0x8; + } + + readonly attribute AirQualityEnum airQuality = 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; +} + +/** Attributes and commands for monitoring HEPA filters in a device */ +server cluster HepaFilterMonitoring = 113 { + enum ChangeIndicationEnum : ENUM8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum DegradationDirectionEnum : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum ProductIdentifierTypeEnum : ENUM8 { + kUPC = 0; + kGTIN8 = 1; + kEAN = 2; + kGTIN14 = 3; + kOEM = 4; + } + + bitmap Feature : BITMAP32 { + kCondition = 0x1; + kWarning = 0x2; + kReplacementProductList = 0x3; + } + + struct ReplacementProductStruct { + ProductIdentifierTypeEnum productIdentifierType = 0; + char_string<20> productIdentifierValue = 1; + } + + readonly attribute percent condition = 0; + readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute ChangeIndicationEnum changeIndication = 2; + readonly attribute boolean inPlaceIndicator = 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; +} + +/** Attributes and commands for monitoring activated carbon filters in a device */ +server cluster ActivatedCarbonFilterMonitoring = 114 { + enum ChangeIndicationEnum : ENUM8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum DegradationDirectionEnum : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum ProductIdentifierTypeEnum : ENUM8 { + kUPC = 0; + kGTIN8 = 1; + kEAN = 2; + kGTIN14 = 3; + kOEM = 4; + } + + bitmap Feature : BITMAP32 { + kCondition = 0x1; + kWarning = 0x2; + kReplacementProductList = 0x3; + } + + struct ReplacementProductStruct { + ProductIdentifierTypeEnum productIdentifierType = 0; + char_string<20> productIdentifierValue = 1; + } + + readonly attribute percent condition = 0; + readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute ChangeIndicationEnum changeIndication = 2; + readonly attribute boolean inPlaceIndicator = 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; +} + +/** An interface for configuring and controlling the functionality of a thermostat. */ +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum ThermostatControlSequence : ENUM8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum ThermostatRunningMode : ENUM8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + enum ThermostatSystemMode : ENUM8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeat = 5; + kPrecooling = 6; + kFanOnly = 7; + kDry = 8; + kSleep = 9; + } + + bitmap DayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap Feature : BITMAP32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap ModeForSequence : BITMAP8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + + readonly attribute nullable int16s localTemperature = 0; + attribute int16s occupiedHeatingSetpoint = 18; + attribute access(write: manage) int16s minHeatSetpointLimit = 21; + attribute access(write: manage) int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; + attribute access(write: manage) enum8 systemMode = 28; + 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 SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +/** An interface for controlling a fan in a heating/cooling system. */ +server cluster FanControl = 514 { + enum AirflowDirectionEnum : ENUM8 { + kForward = 0; + kReverse = 1; + } + + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; + } + + enum FanModeSequenceEnum : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; + } + + bitmap Feature : BITMAP32 { + kMultiSpeed = 0x1; + kAuto = 0x2; + kRocking = 0x4; + kWind = 0x8; + kStep = 0x10; + kAirflowDirection = 0x20; + } + + bitmap RockBitmap : BITMAP8 { + kRockLeftRight = 0x1; + kRockUpDown = 0x2; + kRockRound = 0x4; + } + + bitmap WindBitmap : BITMAP8 { + kSleepWind = 0x1; + kNaturalWind = 0x2; + } + + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; + readonly attribute int8u speedMax = 4; + attribute nullable int8u speedSetting = 5; + readonly attribute int8u speedCurrent = 6; + readonly attribute RockBitmap rockSupport = 7; + attribute RockBitmap rockSetting = 8; + readonly attribute WindBitmap windSupport = 9; + attribute WindBitmap windSetting = 10; + attribute AirflowDirectionEnum airflowDirection = 11; + 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; +} + +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ +server cluster TemperatureMeasurement = 1026 { + readonly attribute nullable int16s measuredValue = 0; + readonly attribute nullable int16s minMeasuredValue = 1; + readonly attribute nullable int16s maxMeasuredValue = 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; +} + +/** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ +server cluster RelativeHumidityMeasurement = 1029 { + readonly attribute nullable int16u measuredValue = 0; + readonly attribute nullable int16u minMeasuredValue = 1; + readonly attribute nullable int16u maxMeasuredValue = 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; +} + +/** Attributes for reporting carbon monoxide concentration measurements */ +server cluster CarbonMonoxideConcentrationMeasurement = 1036 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting carbon dioxide concentration measurements */ +server cluster CarbonDioxideConcentrationMeasurement = 1037 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting nitrogen dioxide concentration measurements */ +server cluster NitrogenDioxideConcentrationMeasurement = 1043 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting ozone concentration measurements */ +server cluster OzoneConcentrationMeasurement = 1045 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting PM2.5 concentration measurements */ +server cluster Pm25ConcentrationMeasurement = 1066 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting formaldehyde concentration measurements */ +server cluster FormaldehydeConcentrationMeasurement = 1067 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting PM1 concentration measurements */ +server cluster Pm1ConcentrationMeasurement = 1068 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting PM10 concentration measurements */ +server cluster Pm10ConcentrationMeasurement = 1069 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting total volatile organic compounds concentration measurements */ +server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +/** Attributes for reporting radon concentration measurements */ +server cluster RadonConcentrationMeasurement = 1071 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute nullable single peakMeasuredValue = 3; + readonly attribute elapsed_s peakMeasuredValueWindow = 4; + readonly attribute nullable single averageMeasuredValue = 5; + readonly attribute elapsed_s averageMeasuredValueWindow = 6; + readonly attribute MeasurementUnitEnum measurementUnit = 8; + readonly attribute MeasurementMediumEnum measurementMedium = 9; + readonly attribute LevelValueEnum levelValue = 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; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 45, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster HepaFilterMonitoring { + callback attribute condition default = 100; + callback attribute degradationDirection default = 1; + callback attribute changeIndication default = 0; + callback attribute inPlaceIndicator default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster ActivatedCarbonFilterMonitoring { + callback attribute condition default = 100; + callback attribute degradationDirection default = 1; + callback attribute changeIndication default = 0; + callback attribute inPlaceIndicator default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster FanControl { + ram attribute fanMode default = 0; + ram attribute fanModeSequence default = 2; + ram attribute percentSetting default = 0; + ram attribute percentCurrent default = 0; + ram attribute speedMax default = 10; + ram attribute speedSetting default = 0; + ram attribute speedCurrent default = 0; + ram attribute rockSupport default = 0x01; + ram attribute rockSetting default = 0x00; + ram attribute windSupport default = 0x03; + ram attribute windSetting default = 0x00; + ram attribute airflowDirection default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } +} +endpoint 2 { + device type anonymousEndpointType = 44, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster AirQuality { + ram attribute airQuality default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster CarbonMonoxideConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster CarbonDioxideConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster NitrogenDioxideConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OzoneConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Pm25ConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster FormaldehydeConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Pm1ConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Pm10ConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster RadonConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + ram attribute peakMeasuredValue; + ram attribute peakMeasuredValueWindow default = 1; + ram attribute averageMeasuredValue; + ram attribute averageMeasuredValueWindow default = 1; + ram attribute measurementUnit default = 0; + ram attribute measurementMedium default = 0; + ram attribute levelValue default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } +} +endpoint 3 { + device type anonymousEndpointType = 770, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TemperatureMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue default = 0x8000; + ram attribute maxMeasuredValue default = 0x8000; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 4 { + device type anonymousEndpointType = 775, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RelativeHumidityMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } +} +endpoint 5 { + device type anonymousEndpointType = 769, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster Thermostat { + ram attribute localTemperature; + ram attribute occupiedHeatingSetpoint default = 2000; + ram attribute minHeatSetpointLimit default = 1700; + ram attribute maxHeatSetpointLimit default = 3000; + ram attribute controlSequenceOfOperation default = 0x02; + ram attribute systemMode default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 5; + } +} + + diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap new file mode 100644 index 00000000000000..33e807fc0b5906 --- /dev/null +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -0,0 +1,17754 @@ +{ + "featureLevel": 97, + "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": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "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": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "", + "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": "", + "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": "", + "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": "", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "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": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "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": "10", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "XX", + "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": "0", + "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": "", + "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": "0", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "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": "1", + "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": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "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": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "OTAUpdateStateEnum", + "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": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "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": "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": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "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": "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 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 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": "", + "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": "0", + "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": "0", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 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": "", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0001", + "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": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0", + "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": "0x0000", + "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": "0x0000000000000000", + "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": "", + "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": "0x0000000000000000", + "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": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-air-purifier", + "deviceTypeCode": 45, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "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": "0", + "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": "0", + "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": "", + "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": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "0", + "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": "0", + "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": "0", + "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": "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": "0", + "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": "0", + "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": "", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "HEPA Filter Monitoring", + "code": 113, + "mfgCode": null, + "define": "HEPA_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "HEPA Filter Monitoring", + "code": 113, + "mfgCode": null, + "define": "HEPA_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReplacementProductList", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Activated Carbon Filter Monitoring", + "code": 114, + "mfgCode": null, + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Activated Carbon Filter Monitoring", + "code": 114, + "mfgCode": null, + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReplacementProductList", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "0x0001", + "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": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "FanMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "FanModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FanModeSequence", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "FanModeSequenceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentSetting", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentCurrent", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedMax", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "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": "SpeedCurrent", + "code": 6, + "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": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSupport", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AirflowDirection", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "AirflowDirectionEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "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": "0", + "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": "0", + "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": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-air-quality-sensor", + "deviceTypeCode": 44, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Air Quality", + "code": 91, + "mfgCode": null, + "define": "AIR_QUALITY_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Air Quality", + "code": 91, + "mfgCode": null, + "define": "AIR_QUALITY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "AirQuality", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AirQualityEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Monoxide Concentration Measurement", + "code": 1036, + "mfgCode": null, + "define": "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Monoxide Concentration Measurement", + "code": 1036, + "mfgCode": null, + "define": "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Dioxide Concentration Measurement", + "code": 1037, + "mfgCode": null, + "define": "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Dioxide Concentration Measurement", + "code": 1037, + "mfgCode": null, + "define": "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Nitrogen Dioxide Concentration Measurement", + "code": 1043, + "mfgCode": null, + "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Nitrogen Dioxide Concentration Measurement", + "code": 1043, + "mfgCode": null, + "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ozone Concentration Measurement", + "code": 1045, + "mfgCode": null, + "define": "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ozone Concentration Measurement", + "code": 1045, + "mfgCode": null, + "define": "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM2.5 Concentration Measurement", + "code": 1066, + "mfgCode": null, + "define": "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM2.5 Concentration Measurement", + "code": 1066, + "mfgCode": null, + "define": "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Formaldehyde Concentration Measurement", + "code": 1067, + "mfgCode": null, + "define": "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Formaldehyde Concentration Measurement", + "code": 1067, + "mfgCode": null, + "define": "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM1 Concentration Measurement", + "code": 1068, + "mfgCode": null, + "define": "PM1_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM1 Concentration Measurement", + "code": 1068, + "mfgCode": null, + "define": "PM1_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM10 Concentration Measurement", + "code": 1069, + "mfgCode": null, + "define": "PM10_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM10 Concentration Measurement", + "code": 1069, + "mfgCode": null, + "define": "PM10_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Total Volatile Organic Compounds Concentration Measurement", + "code": 1070, + "mfgCode": null, + "define": "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Total Volatile Organic Compounds Concentration Measurement", + "code": 1070, + "mfgCode": null, + "define": "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Radon Concentration Measurement", + "code": 1071, + "mfgCode": null, + "define": "RADON_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Radon Concentration Measurement", + "code": 1071, + "mfgCode": null, + "define": "RADON_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-tempsensor", + "deviceTypeCode": 770, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-humiditysensor", + "deviceTypeCode": 775, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-thermostat", + "deviceTypeCode": 769, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LocalTemperature", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OutdoorTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Occupancy", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinHeatSetpointLimit", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxHeatSetpointLimit", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinCoolSetpointLimit", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxCoolSetpointLimit", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3200", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PICoolingDemand", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIHeatingDemand", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HVACSystemTypeConfiguration", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalTemperatureCalibration", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedCoolingSetpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedHeatingSetpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedCoolingSetpoint", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedHeatingSetpoint", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinHeatSetpointLimit", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxHeatSetpointLimit", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCoolSetpointLimit", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCoolSetpointLimit", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3200", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinSetpointDeadBand", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "25", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemoteSensing", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ControlSequenceOfOperation", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "ThermostatControlSequence", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x02", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SystemMode", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningMode", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartOfWeek", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeeklyTransitions", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfDailyTransitions", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHold", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHoldDuration", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatProgrammingOperationMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningState", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSource", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeAmount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSourceTimestamp", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetback", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMin", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMax", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetback", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMin", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMax", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EmergencyHeatDelta", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACType", + "code": 64, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacity", + "code": 65, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACRefrigerantType", + "code": 66, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCompressorType", + "code": 67, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACErrorCode", + "code": 68, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACLouverPosition", + "code": 69, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCoilTemperature", + "code": 70, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacityformat", + "code": 71, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "1", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 45 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 44 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 770 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 4, + "profileId": 259, + "endpointId": 4, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 775 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 5, + "profileId": 259, + "endpointId": 5, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 769 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index a5dd0745b1e312..b09cbf7fe26778 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -39,5 +39,7 @@ "Basic Video Player": 40, "Casting Video Client": 41, "Video Remote Control": 42, - "Mode Select": 39 + "Mode Select": 39, + "Air Purifier": 45, + "Air Quality Sensor": 44 } From 361dd82c19ec0a3544df0f8215a5ecb09a25a177 Mon Sep 17 00:00:00 2001 From: Marc Mikolits Date: Thu, 27 Jul 2023 20:47:55 +0200 Subject: [PATCH 059/159] Updated emberAf callbacks to match the door-lock-server callbacks signature (#28328) * Updated emberAF callbacks to match the door-lock-server callbacks signature * add namespace for Nullable --- .../nrfconnect/main/ZclDoorLockCallbacks.cpp | 9 +++++++-- .../telink/src/ZclDoorLockCallbacks.cpp | 9 +++++++-- examples/chef/common/stubs.cpp | 10 ++++++++-- .../lock-app/cc13x2x7_26x2x7/src/ZclCallbacks.cpp | 9 +++++++-- examples/lock-app/cc13x4_26x4/src/ZclCallbacks.cpp | 9 +++++++-- examples/lock-app/genio/src/ZclCallbacks.cpp | 9 +++++++-- .../lock-app/infineon/cyw30739/src/ZclCallbacks.cpp | 9 +++++++-- examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp | 9 +++++++-- .../lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp | 3 +++ examples/lock-app/nrfconnect/main/ZclCallbacks.cpp | 11 +++++++++-- .../lock-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp | 10 ++++++++-- examples/lock-app/qpg/src/ZclCallbacks.cpp | 9 +++++++-- examples/lock-app/silabs/src/ZclCallbacks.cpp | 3 +++ examples/lock-app/telink/src/ZclCallbacks.cpp | 11 +++++++++-- examples/platform/esp32/lock/ZclCallbacks.cpp | 11 ++++++++--- 15 files changed, 104 insertions(+), 27 deletions(-) diff --git a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp index 068b990444b4f5..2d3a6e4e32f270 100644 --- a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp +++ b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp @@ -20,11 +20,14 @@ #include #include #include +#include +#include #include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); @@ -32,13 +35,15 @@ LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); // to simulate DoorLock endpoint for All-Clusters-App example // without using kUser|kAccessSchedules|kRfidCredential|kPinCredential -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { return true; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { return true; diff --git a/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp index 068b990444b4f5..2d3a6e4e32f270 100644 --- a/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp +++ b/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp @@ -20,11 +20,14 @@ #include #include #include +#include +#include #include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); @@ -32,13 +35,15 @@ LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); // to simulate DoorLock endpoint for All-Clusters-App example // without using kUser|kAccessSchedules|kRfidCredential|kPinCredential -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { return true; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { return true; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 75b45cbb1b38bb..2d2b15ca93b4cd 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -1,6 +1,10 @@ #include #include +#include #include +#include + +using chip::app::DataModel::Nullable; // Include door lock callbacks only when the server is enabled #ifdef EMBER_AF_PLUGIN_DOOR_LOCK_SERVER @@ -188,14 +192,16 @@ class LockManager Endpoint endpoints[kNumEndpoints]; }; -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const chip::Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const chip::Optional & pinCode, chip::app::Clusters::DoorLock::OperationErrorEnum & err) { err = OperationErrorEnum::kUnspecified; return DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kLocked); } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const chip::Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const chip::Optional & pinCode, chip::app::Clusters::DoorLock::OperationErrorEnum & err) { err = OperationErrorEnum::kUnspecified; diff --git a/examples/lock-app/cc13x2x7_26x2x7/src/ZclCallbacks.cpp b/examples/lock-app/cc13x2x7_26x2x7/src/ZclCallbacks.cpp index 0fb673f020c5c5..1777326dc4d017 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/src/ZclCallbacks.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/src/ZclCallbacks.cpp @@ -27,10 +27,13 @@ #include #include #include +#include +#include #include using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; +using ::chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -56,7 +59,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) {} -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -68,7 +72,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); diff --git a/examples/lock-app/cc13x4_26x4/src/ZclCallbacks.cpp b/examples/lock-app/cc13x4_26x4/src/ZclCallbacks.cpp index 0fb673f020c5c5..1777326dc4d017 100644 --- a/examples/lock-app/cc13x4_26x4/src/ZclCallbacks.cpp +++ b/examples/lock-app/cc13x4_26x4/src/ZclCallbacks.cpp @@ -27,10 +27,13 @@ #include #include #include +#include +#include #include using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; +using ::chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -56,7 +59,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) {} -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -68,7 +72,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); diff --git a/examples/lock-app/genio/src/ZclCallbacks.cpp b/examples/lock-app/genio/src/ZclCallbacks.cpp index 91a867bc38c25e..12688358f0feee 100644 --- a/examples/lock-app/genio/src/ZclCallbacks.cpp +++ b/examples/lock-app/genio/src/ZclCallbacks.cpp @@ -28,11 +28,14 @@ #include #include #include +#include +#include #include using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -100,7 +103,8 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) } } -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -112,7 +116,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); diff --git a/examples/lock-app/infineon/cyw30739/src/ZclCallbacks.cpp b/examples/lock-app/infineon/cyw30739/src/ZclCallbacks.cpp index 7d3eeed7bcf1b6..b8f581c21c9ead 100644 --- a/examples/lock-app/infineon/cyw30739/src/ZclCallbacks.cpp +++ b/examples/lock-app/infineon/cyw30739/src/ZclCallbacks.cpp @@ -19,6 +19,8 @@ #include "LockManager.h" #include +#include +#include #include #include #include @@ -26,6 +28,7 @@ using namespace chip; using namespace chip::app::Clusters; using namespace chip::DeviceLayer; +using chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -40,7 +43,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & } } -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -52,7 +56,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); diff --git a/examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp b/examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp index 91936419d458a6..95b552324aaf38 100644 --- a/examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp +++ b/examples/lock-app/infineon/psoc6/src/ZclCallbacks.cpp @@ -28,11 +28,14 @@ #include #include #include +#include +#include #include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; +using ::chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -58,7 +61,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfOnOffClusterInitCallback(EndpointId endpoint) {} -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -70,7 +74,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); diff --git a/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp b/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp index 2b649db7443d42..2b0b8810f4ff6e 100644 --- a/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp +++ b/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp @@ -17,13 +17,16 @@ */ #include +#include #include +#include #include "LockManager.h" using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::DoorLock; +using chip::app::DataModel::Nullable; // App handles physical aspects of locking but not locking logic. That is it // should wait for door to be locked on lock command and return success) but // door lock server should check pin before even calling the lock-door diff --git a/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp b/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp index 49cdbfb84e754a..624bac3c73e5aa 100644 --- a/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp @@ -23,11 +23,14 @@ #include #include #include +#include +#include #include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); @@ -75,7 +78,9 @@ bool emberAfPluginDoorLockSetCredential(EndpointId endpointId, uint16_t credenti return BoltLockMgr().SetCredential(credentialIndex, creator, modifier, credentialStatus, credentialType, secret); } -bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Optional & pinCode, OperationErrorEnum & err) +bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) { bool result = BoltLockMgr().ValidatePIN(pinCode, err); @@ -88,7 +93,9 @@ bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Optiona return result; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(EndpointId endpointId, const Optional & pinCode, OperationErrorEnum & err) +bool emberAfPluginDoorLockOnDoorUnlockCommand(EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) { bool result = BoltLockMgr().ValidatePIN(pinCode, err); diff --git a/examples/lock-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp b/examples/lock-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp index 9033f40aaeff7e..b888db03861c7f 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp @@ -20,24 +20,30 @@ #include "AppTask.h" #include "BoltLockManager.h" +#include #include #include #include +#include #include #include +#include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { return BoltLockMgr().InitiateAction(0, BoltLockManager::LOCK_ACTION); } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { return BoltLockMgr().InitiateAction(0, BoltLockManager::UNLOCK_ACTION); diff --git a/examples/lock-app/qpg/src/ZclCallbacks.cpp b/examples/lock-app/qpg/src/ZclCallbacks.cpp index 98942e62a4654a..25a06b533c5cad 100644 --- a/examples/lock-app/qpg/src/ZclCallbacks.cpp +++ b/examples/lock-app/qpg/src/ZclCallbacks.cpp @@ -23,12 +23,15 @@ #include #include #include +#include #include +#include #include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value) { @@ -73,7 +76,8 @@ bool emberAfPluginDoorLockSetCredential(EndpointId endpointId, uint16_t credenti return BoltLockMgr().SetCredential(credentialIndex, creator, modifier, credentialStatus, credentialType, secret); } -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { bool returnValue = false; @@ -87,7 +91,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return returnValue; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { bool returnValue = false; diff --git a/examples/lock-app/silabs/src/ZclCallbacks.cpp b/examples/lock-app/silabs/src/ZclCallbacks.cpp index f0316cb78fe8fc..dc5d60915218ae 100644 --- a/examples/lock-app/silabs/src/ZclCallbacks.cpp +++ b/examples/lock-app/silabs/src/ZclCallbacks.cpp @@ -27,10 +27,13 @@ #include #include #include +#include +#include #include using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; +using ::chip::app::DataModel::Nullable; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) diff --git a/examples/lock-app/telink/src/ZclCallbacks.cpp b/examples/lock-app/telink/src/ZclCallbacks.cpp index b304dc51e68cb5..327db43125a035 100644 --- a/examples/lock-app/telink/src/ZclCallbacks.cpp +++ b/examples/lock-app/telink/src/ZclCallbacks.cpp @@ -23,11 +23,14 @@ #include #include #include +#include +#include #include using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; +using ::chip::app::DataModel::Nullable; LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); @@ -75,7 +78,9 @@ bool emberAfPluginDoorLockSetCredential(EndpointId endpointId, uint16_t credenti return BoltLockMgr().SetCredential(credentialIndex, creator, modifier, credentialStatus, credentialType, secret); } -bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Optional & pinCode, OperationErrorEnum & err) +bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) { bool result = BoltLockMgr().ValidatePIN(pinCode, err); @@ -88,7 +93,9 @@ bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Optiona return result; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(EndpointId endpointId, const Optional & pinCode, OperationErrorEnum & err) +bool emberAfPluginDoorLockOnDoorUnlockCommand(EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) { bool result = BoltLockMgr().ValidatePIN(pinCode, err); diff --git a/examples/platform/esp32/lock/ZclCallbacks.cpp b/examples/platform/esp32/lock/ZclCallbacks.cpp index 02c2a2a75f58a0..40ac8a4de76347 100644 --- a/examples/platform/esp32/lock/ZclCallbacks.cpp +++ b/examples/platform/esp32/lock/ZclCallbacks.cpp @@ -20,17 +20,20 @@ * This file implements the handler for data model messages. */ -//#include "AppConfig.h" +// #include "AppConfig.h" #include "BoltLockManager.h" #include #include #include #include +#include +#include #include using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; +using ::chip::app::DataModel::Nullable; /** @brief DoorLock Cluster Init * @@ -43,7 +46,8 @@ using namespace ::chip::DeviceLayer::Internal; */ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) {} -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); @@ -55,7 +59,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O return status; } -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, OperationErrorEnum & err) { ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); From 0b506e5d2f30f1f7cb991e9a456515f4db7561c3 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 27 Jul 2023 15:07:28 -0400 Subject: [PATCH 060/159] Python tests: fix tests flag (#28298) * Tests flag got missed in the config TEST: tested with --tests flag, saw only requested test run * python: proof why we need stronly typed languages --- src/python_testing/matter_testing_support.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 7570f3ddcbe415..008848177b3271 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -818,6 +818,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig: config.paa_trust_store_path = args.paa_trust_store_path config.ble_interface_id = args.ble_interface_id config.pics = {} if args.PICS is None else read_pics_from_file(args.PICS) + config.tests = [] if args.tests is None else args.tests config.controller_node_id = args.controller_node_id config.trace_to = args.trace_to From 41d5d52a57e7918f18ed50d23731a1a5d2d319e4 Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Fri, 28 Jul 2023 03:36:08 +0800 Subject: [PATCH 061/159] fix dishwasher mode select file depended error (#28262) --- src/app/zap_cluster_list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index f88948ef7d7c5a..1212b7b28ab8ff 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -146,7 +146,7 @@ "DEVICE_TEMP_CLUSTER": [], "DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"], "DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"], - "DISHWASHER_MODE_CLUSTER": ["mode-select-server"], + "DISHWASHER_MODE_CLUSTER": ["mode-base-server"], "DOOR_LOCK_CLUSTER": ["door-lock-server"], "ELECTRICAL_MEASUREMENT_CLUSTER": [], "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [ From 0085e7b9e5dafd5db5ea6756338dfeab750d0e7a Mon Sep 17 00:00:00 2001 From: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Thu, 27 Jul 2023 17:11:53 -0400 Subject: [PATCH 062/159] Silicon Labs: Attestation credentials now remain upon factory reset. (#27966) --- .../silabs/SilabsDeviceAttestationCreds.cpp | 132 ++++++++++++------ .../silabs/SilabsDeviceAttestationCreds.h | 2 + .../silabs/KeyValueStoreManagerImpl.cpp | 9 ++ .../silabs/KeyValueStoreManagerImpl.h | 4 - src/platform/silabs/MigrationManager.cpp | 6 +- src/platform/silabs/MigrationManager.h | 9 +- src/platform/silabs/SilabsConfig.h | 18 +-- 7 files changed, 118 insertions(+), 62 deletions(-) diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp index 01f54cc36506c8..92248fb8b6373d 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp @@ -26,6 +26,8 @@ using namespace chip::DeviceLayer::Internal; +using chip::DeviceLayer::Internal::SilabsConfig; + extern uint8_t linker_nvm_end[]; static uint8_t * _credentials_address = (uint8_t *) linker_nvm_end; @@ -44,21 +46,8 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider public: CHIP_ERROR GetCertificationDeclaration(MutableByteSpan & out_span) override { - uint32_t offset = SILABS_CREDENTIALS_CD_OFFSET; - uint32_t size = SILABS_CREDENTIALS_CD_SIZE; - - if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_CD_Offset) && - SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_CD_Size)) - { - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_CD_Offset, offset)); - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_CD_Size, size)); - } - - uint8_t * address = _credentials_address + offset; - ByteSpan cd_span(address, size); - ChipLogProgress(DeviceLayer, "GetCertificationDeclaration, addr:%p, size:%lu", address, size); - ChipLogByteSpan(DeviceLayer, ByteSpan(cd_span.data(), kDebugLength > cd_span.size() ? cd_span.size() : kDebugLength)); - return CopySpanToMutableSpan(cd_span, out_span); + return GetFile("GetCertificationDeclaration", SilabsConfig::kConfigKey_Creds_CD_Offset, SILABS_CREDENTIALS_CD_OFFSET, + SilabsConfig::kConfigKey_Creds_CD_Size, SILABS_CREDENTIALS_CD_SIZE, out_span); } CHIP_ERROR GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) override @@ -70,40 +59,15 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & out_span) override { - uint32_t offset = SILABS_CREDENTIALS_DAC_OFFSET; - uint32_t size = SILABS_CREDENTIALS_DAC_SIZE; - - if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_DAC_Offset) && - SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_DAC_Size)) - { - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_DAC_Offset, offset)); - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_DAC_Size, size)); - } - - uint8_t * address = _credentials_address + offset; - ByteSpan cert_span(address, size); - ChipLogProgress(DeviceLayer, "GetDeviceAttestationCert, addr:%p, size:%lu", address, size); - ChipLogByteSpan(DeviceLayer, ByteSpan(cert_span.data(), kDebugLength > cert_span.size() ? cert_span.size() : kDebugLength)); - return CopySpanToMutableSpan(cert_span, out_span); + return GetFile("GetDeviceAttestationCert", SilabsConfig::kConfigKey_Creds_DAC_Offset, SILABS_CREDENTIALS_DAC_OFFSET, + SilabsConfig::kConfigKey_Creds_DAC_Size, SILABS_CREDENTIALS_DAC_SIZE, out_span); } CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & out_span) override { - uint32_t offset = SILABS_CREDENTIALS_PAI_OFFSET; - uint32_t size = SILABS_CREDENTIALS_PAI_SIZE; - - if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_PAI_Offset) && - SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_PAI_Size)) - { - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_PAI_Offset, offset)); - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_PAI_Size, size)); - } - - uint8_t * address = _credentials_address + offset; - ByteSpan cert_span(address, size); - ChipLogProgress(DeviceLayer, "GetProductAttestationIntermediateCert, addr:%p, size:%lu", address, size); - ChipLogByteSpan(DeviceLayer, ByteSpan(cert_span.data(), kDebugLength > cert_span.size() ? cert_span.size() : kDebugLength)); - return CopySpanToMutableSpan(cert_span, out_span); + return GetFile("GetProductAttestationIntermediateCert", SilabsConfig::kConfigKey_Creds_PAI_Offset, + SILABS_CREDENTIALS_PAI_OFFSET, SilabsConfig::kConfigKey_Creds_PAI_Size, SILABS_CREDENTIALS_PAI_SIZE, + out_span); } CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & message_to_sign, MutableByteSpan & out_span) override @@ -126,6 +90,45 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider return CopySpanToMutableSpan(ByteSpan(signature, signature_size), out_span); } + +private: + CHIP_ERROR GetFile(const char * description, uint32_t offset_key, uint32_t offset_default, uint32_t size_key, + uint32_t size_default, MutableByteSpan & out_span) + { + uint8_t * address = nullptr; + uint32_t offset = offset_default; + if (SilabsConfig::ConfigValueExists(offset_key)) + { + // NVM-provided offset + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(offset_key, offset)); + } + + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_Base_Addr)) + { + // NVM-provided location + uint32_t base_addr = 0; + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_Base_Addr, base_addr)); + address = (uint8_t *) (base_addr + offset); + } + else + { + // Default location + address = _credentials_address + offset; + } + + // Size + uint32_t size = size_default; + if (SilabsConfig::ConfigValueExists(size_key)) + { + // NVM-provided size + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(size_key, size)); + } + + ByteSpan span(address, size); + ChipLogProgress(DeviceLayer, "%s, addr:%p, size:%lu", description, address, size); + ChipLogByteSpan(DeviceLayer, ByteSpan(span.data(), kDebugLength > span.size() ? span.size() : kDebugLength)); + return CopySpanToMutableSpan(span, out_span); + } }; } // namespace @@ -138,4 +141,43 @@ DeviceAttestationCredentialsProvider * GetSilabsDacProvider() } // namespace Silabs } // namespace Credentials + +namespace DeviceLayer { +namespace Silabs { +namespace { + +void MigrateUint32(uint32_t old_key, uint32_t new_key) +{ + uint32_t value = 0; + if (SilabsConfig::ConfigValueExists(old_key) && (CHIP_NO_ERROR == SilabsConfig::ReadConfigValue(old_key, value))) + { + SilabsConfig::WriteConfigValue(new_key, value); + } +} + +} // namespace + +void MigrateDacProvider(void) +{ + constexpr uint32_t kOldKey_Creds_KeyId = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x21); + constexpr uint32_t kOldKey_Creds_Base_Addr = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x22); + constexpr uint32_t kOldKey_Creds_DAC_Offset = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x23); + constexpr uint32_t kOldKey_Creds_DAC_Size = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x24); + constexpr uint32_t kOldKey_Creds_PAI_Offset = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x25); + constexpr uint32_t kOldKey_Creds_PAI_Size = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x26); + constexpr uint32_t kOldKey_Creds_CD_Offset = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x27); + constexpr uint32_t kOldKey_Creds_CD_Size = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x28); + + MigrateUint32(kOldKey_Creds_KeyId, SilabsConfig::kConfigKey_Creds_KeyId); + MigrateUint32(kOldKey_Creds_Base_Addr, SilabsConfig::kConfigKey_Creds_Base_Addr); + MigrateUint32(kOldKey_Creds_DAC_Offset, SilabsConfig::kConfigKey_Creds_DAC_Offset); + MigrateUint32(kOldKey_Creds_DAC_Size, SilabsConfig::kConfigKey_Creds_DAC_Size); + MigrateUint32(kOldKey_Creds_PAI_Offset, SilabsConfig::kConfigKey_Creds_PAI_Offset); + MigrateUint32(kOldKey_Creds_PAI_Size, SilabsConfig::kConfigKey_Creds_PAI_Size); + MigrateUint32(kOldKey_Creds_CD_Offset, SilabsConfig::kConfigKey_Creds_CD_Offset); + MigrateUint32(kOldKey_Creds_CD_Size, SilabsConfig::kConfigKey_Creds_CD_Size); +} + +} // namespace Silabs +} // namespace DeviceLayer } // namespace chip diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.h b/examples/platform/silabs/SilabsDeviceAttestationCreds.h index ad98fbbbe6760b..c4f437c20f4b44 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.h +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.h @@ -34,6 +34,8 @@ namespace Silabs { */ DeviceAttestationCredentialsProvider * GetSilabsDacProvider(); +void SilabsDacProviderMigration(void); + } // namespace Silabs } // namespace Credentials } // namespace chip diff --git a/src/platform/silabs/KeyValueStoreManagerImpl.cpp b/src/platform/silabs/KeyValueStoreManagerImpl.cpp index 88b494d9771448..d78e957d2f40bc 100644 --- a/src/platform/silabs/KeyValueStoreManagerImpl.cpp +++ b/src/platform/silabs/KeyValueStoreManagerImpl.cpp @@ -300,5 +300,14 @@ void KeyValueStoreManagerImpl::KvsMapMigration(void) } } // namespace PersistedStorage + +namespace Silabs { + +void MigrateKvsMap(void) +{ + PersistedStorage::KeyValueStoreMgrImpl().KvsMapMigration(); +} + +} // namespace Silabs } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/silabs/KeyValueStoreManagerImpl.h b/src/platform/silabs/KeyValueStoreManagerImpl.h index 0c63b0d4f594be..c17fad86838a04 100644 --- a/src/platform/silabs/KeyValueStoreManagerImpl.h +++ b/src/platform/silabs/KeyValueStoreManagerImpl.h @@ -33,10 +33,6 @@ namespace PersistedStorage { class KeyValueStoreManagerImpl final : public KeyValueStoreManager { - // Allow the KeyValueStoreManager interface class to delegate method calls to - // the implementation methods provided by this class. - friend class KeyValueStoreManager; - public: CHIP_ERROR Init(void); CHIP_ERROR _Put(const char * key, const void * value, size_t value_size); diff --git a/src/platform/silabs/MigrationManager.cpp b/src/platform/silabs/MigrationManager.cpp index 037f9f7f292079..f8286c656025ac 100644 --- a/src/platform/silabs/MigrationManager.cpp +++ b/src/platform/silabs/MigrationManager.cpp @@ -17,7 +17,6 @@ #include "MigrationManager.h" #include -#include #include #include @@ -38,7 +37,10 @@ typedef struct #define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) static migrationData_t migrationTable[] = { - { .migrationGroup = 1, .migrationFunc = &KeyValueStoreMgrImpl().KvsMapMigration }, + { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, +#ifdef SILABS_ATTESTATION_CREDENTIALS + { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, +#endif // add any additional migration neccesary. migrationGroup should stay equal if done in the same commit or increment by 1 for // each new entry. }; diff --git a/src/platform/silabs/MigrationManager.h b/src/platform/silabs/MigrationManager.h index 2d560c4fa194df..708fdb3368feef 100644 --- a/src/platform/silabs/MigrationManager.h +++ b/src/platform/silabs/MigrationManager.h @@ -24,8 +24,6 @@ namespace Silabs { class MigrationManager { - friend class KeyValueStoreManagerImpl; - public: /** * The Silabs migration manager is implemented as a singleton @@ -39,6 +37,13 @@ class MigrationManager ~MigrationManager(){}; }; +/** + * Migration functions. These definitions allow the MigrationManager + * to be agnostic of the specifics of each individual migration. + */ +void MigrateKvsMap(void); +void MigrateDacProvider(void); + } // namespace Silabs } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/silabs/SilabsConfig.h b/src/platform/silabs/SilabsConfig.h index a7aa0312aa9845..391d6a71682e28 100644 --- a/src/platform/silabs/SilabsConfig.h +++ b/src/platform/silabs/SilabsConfig.h @@ -112,6 +112,14 @@ class SilabsConfig static constexpr Key kConfigKey_ProductURL = SilabsConfigKey(kMatterFactory_KeyBase, 0x11); static constexpr Key kConfigKey_PartNumber = SilabsConfigKey(kMatterFactory_KeyBase, 0x12); static constexpr Key kConfigKey_UniqueId = SilabsConfigKey(kMatterFactory_KeyBase, 0x1F); + static constexpr Key kConfigKey_Creds_KeyId = SilabsConfigKey(kMatterFactory_KeyBase, 0x20); + static constexpr Key kConfigKey_Creds_Base_Addr = SilabsConfigKey(kMatterFactory_KeyBase, 0x21); + static constexpr Key kConfigKey_Creds_DAC_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x22); + static constexpr Key kConfigKey_Creds_DAC_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x23); + static constexpr Key kConfigKey_Creds_PAI_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x24); + static constexpr Key kConfigKey_Creds_PAI_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x25); + static constexpr Key kConfigKey_Creds_CD_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x26); + static constexpr Key kConfigKey_Creds_CD_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x27); // Matter Config Keys static constexpr Key kConfigKey_ServiceConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x01); static constexpr Key kConfigKey_PairedAccountId = SilabsConfigKey(kMatterConfig_KeyBase, 0x02); @@ -135,14 +143,6 @@ class SilabsConfig static constexpr Key kConfigKey_YearDaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x16); static constexpr Key kConfigKey_HolidaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x17); static constexpr Key kConfigKey_OpKeyMap = SilabsConfigKey(kMatterConfig_KeyBase, 0x20); - static constexpr Key kConfigKey_Creds_KeyId = SilabsConfigKey(kMatterConfig_KeyBase, 0x21); - static constexpr Key kConfigKey_Creds_Base_Addr = SilabsConfigKey(kMatterConfig_KeyBase, 0x22); - static constexpr Key kConfigKey_Creds_DAC_Offset = SilabsConfigKey(kMatterConfig_KeyBase, 0x23); - static constexpr Key kConfigKey_Creds_DAC_Size = SilabsConfigKey(kMatterConfig_KeyBase, 0x24); - static constexpr Key kConfigKey_Creds_PAI_Offset = SilabsConfigKey(kMatterConfig_KeyBase, 0x25); - static constexpr Key kConfigKey_Creds_PAI_Size = SilabsConfigKey(kMatterConfig_KeyBase, 0x26); - static constexpr Key kConfigKey_Creds_CD_Offset = SilabsConfigKey(kMatterConfig_KeyBase, 0x27); - static constexpr Key kConfigKey_Creds_CD_Size = SilabsConfigKey(kMatterConfig_KeyBase, 0x28); static constexpr Key kConfigKey_GroupKeyMax = SilabsConfigKey(kMatterConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. @@ -160,7 +160,7 @@ class SilabsConfig // Set key id limits for each group. static constexpr Key kMinConfigKey_MatterFactory = SilabsConfigKey(kMatterFactory_KeyBase, 0x00); - static constexpr Key kMaxConfigKey_MatterFactory = SilabsConfigKey(kMatterFactory_KeyBase, 0x1F); + static constexpr Key kMaxConfigKey_MatterFactory = SilabsConfigKey(kMatterFactory_KeyBase, 0x2F); static constexpr Key kMinConfigKey_MatterConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x00); static constexpr Key kMaxConfigKey_MatterConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x20); From 05e4cee9fdd84b4fe72e1fe759f442f79e4c97fe Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Thu, 27 Jul 2023 18:21:45 -0400 Subject: [PATCH 063/159] RVC TC 2.1 - PIXIT to test mode failure (#28338) * check if we can test mode failure * remove whitespace * clean up --- src/python_testing/TC_RVCCLEANM_2_1.py | 40 +++++++++++++++----------- src/python_testing/TC_RVCRUNM_2_1.py | 40 +++++++++++++++----------- 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 3c58a7e11795ea..8a2683c2317472 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -50,10 +50,14 @@ async def test_TC_RVCCLEANM_2_1(self): asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, "PIXIT_MODEFAIL must be included on the command line in " "the --int-arg flag as PIXIT_MODEFAIL:") + asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, + "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " + "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] + self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] asserts.assert_true(self.check_pics("RVCCLEANM.S.A0000"), "RVCCLEANM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.A0001"), "RVCCLEANM.S.A0001 must be supported") @@ -97,30 +101,32 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) - input("Press Enter when done.\n") + if self.can_test_mode_failure is True: + self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) + input("Press Enter when done.\n") - self.print_step(6, "Read CurrentMode attribute") - old_current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + self.print_step(6, "Read CurrentMode attribute") + old_current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) - logging.info("CurrentMode: %s" % (old_current_mode)) + logging.info("CurrentMode: %s" % (old_current_mode)) - self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) - ret = await self.send_change_to_mode_cmd(newMode=self.modefail) - st = ret.status - is_mfg_code = st in range(0x80, 0xC0) - is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or (st in rvcCleanCodes) or is_mfg_code - asserts.assert_true(is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) - st_text_len = len(ret.statusText) - asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) + ret = await self.send_change_to_mode_cmd(newMode=self.modefail) + st = ret.status + is_mfg_code = st in range(0x80, 0xC0) + is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or (st in rvcCleanCodes) or is_mfg_code + asserts.assert_true( + is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) + st_text_len = len(ret.statusText) + asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) - self.print_step(8, "Read CurrentMode attribute") - current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + self.print_step(8, "Read CurrentMode attribute") + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) - logging.info("CurrentMode: %s" % (current_mode)) + logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode == old_current_mode, "CurrentMode changed after failed ChangeToMode command!") + asserts.assert_true(current_mode == old_current_mode, "CurrentMode changed after failed ChangeToMode command!") self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.modeok)) input("Press Enter when done.\n") diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index bc9ff11da23db9..f9bd8937ae59bb 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -50,10 +50,14 @@ async def test_TC_RVCRUNM_2_1(self): asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, "PIXIT_MODEFAIL must be included on the command line in " "the --int-arg flag as PIXIT_MODEFAIL:") + asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, + "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " + "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] + self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") @@ -97,30 +101,32 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) - input("Press Enter when done.\n") + if self.can_test_mode_failure is True: + self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) + input("Press Enter when done.\n") - self.print_step(6, "Read CurrentMode attribute") - old_current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + self.print_step(6, "Read CurrentMode attribute") + old_current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) - logging.info("CurrentMode: %s" % (old_current_mode)) + logging.info("CurrentMode: %s" % (old_current_mode)) - self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) - ret = await self.send_change_to_mode_cmd(newMode=self.modefail) - st = ret.status - is_mfg_code = st in range(0x80, 0xC0) - is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or (st in rvcRunCodes) or is_mfg_code - asserts.assert_true(is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) - st_text_len = len(ret.statusText) - asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) + ret = await self.send_change_to_mode_cmd(newMode=self.modefail) + st = ret.status + is_mfg_code = st in range(0x80, 0xC0) + is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or (st in rvcRunCodes) or is_mfg_code + asserts.assert_true( + is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) + st_text_len = len(ret.statusText) + asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) - self.print_step(8, "Read CurrentMode attribute") - current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + self.print_step(8, "Read CurrentMode attribute") + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) - logging.info("CurrentMode: %s" % (current_mode)) + logging.info("CurrentMode: %s" % (current_mode)) - asserts.assert_true(current_mode == old_current_mode, "CurrentMode changed after failed ChangeToMode command!") + asserts.assert_true(current_mode == old_current_mode, "CurrentMode changed after failed ChangeToMode command!") self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.modeok)) input("Press Enter when done.\n") From 013e3ce1e0f58c9a05addd60bef948835b10afb0 Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Thu, 27 Jul 2023 19:19:50 -0400 Subject: [PATCH 064/159] RVC TC 3.2 - Handle null start up mode (#28297) * handle null start up mode * read StartUpMode after power cycle * clean up --- src/python_testing/TC_RVCCLEANM_3_2.py | 44 ++++++++++++++++++++++---- src/python_testing/TC_RVCRUNM_3_2.py | 44 ++++++++++++++++++++++---- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/src/python_testing/TC_RVCCLEANM_3_2.py b/src/python_testing/TC_RVCCLEANM_3_2.py index 1d5d24beea5ac1..7f29c8807262b9 100644 --- a/src/python_testing/TC_RVCCLEANM_3_2.py +++ b/src/python_testing/TC_RVCCLEANM_3_2.py @@ -16,8 +16,11 @@ # import logging +import random import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts @@ -38,6 +41,10 @@ async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcCleanMod "Unexpected return type for ChangeToMode") return ret + async def write_start_up_mode(self, newMode): + ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.RvcCleanMode.Attributes.StartUpMode(newMode))]) + asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + @async_test_body async def test_TC_RVCCLEANM_3_2(self): @@ -69,16 +76,32 @@ class CommonCodes(Enum): startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) logging.info("StartUpMode: %s" % (startup_mode)) + if startup_mode == NullValue: + self.print_step(3, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + modes = [m.mode for m in supported_modes] + new_startup_mode = random.choice(modes) - self.print_step(3, "Read CurrentMode attribute") + self.print_step(4, "Write the value %s to StartUpMode" % (new_startup_mode)) + + await self.write_start_up_mode(newMode=new_startup_mode) + else: + new_startup_mode = startup_mode + + self.print_step(5, "Read CurrentMode attribute") old_current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) logging.info("CurrentMode: %s" % (old_current_mode)) - if old_current_mode == startup_mode: + if old_current_mode == new_startup_mode: - self.print_step(4, "Read SupportedModes attribute") + self.print_step(6, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) logging.info("SupportedModes: %s" % (supported_modes)) @@ -88,21 +111,28 @@ class CommonCodes(Enum): new_mode = None for m in supported_modes: - if m.mode != startup_mode: + if m.mode != new_startup_mode: new_mode = m.mode break - self.print_step(5, "Send ChangeToMode command with NewMode set to %d" % (new_mode)) + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (new_mode)) ret = await self.send_change_to_mode_cmd(newMode=new_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode should succeed") self.default_controller.ExpireSessions(self.dut_node_id) - self.print_step(6, "Physically power cycle the device") + self.print_step(8, "Physically power cycle the device") input("Press Enter when done.\n") - self.print_step(7, "Read CurrentMode attribute") + self.print_step(9, "Read StartUpMode attribute") + + startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) + + logging.info("StartUpMode: %s" % (startup_mode)) + asserts.assert_equal(startup_mode, new_startup_mode, "StartUpMode must match the value it was before a power cycle") + + self.print_step(10, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) diff --git a/src/python_testing/TC_RVCRUNM_3_2.py b/src/python_testing/TC_RVCRUNM_3_2.py index 09cfebec90d6eb..683395ef1db72a 100644 --- a/src/python_testing/TC_RVCRUNM_3_2.py +++ b/src/python_testing/TC_RVCRUNM_3_2.py @@ -16,8 +16,11 @@ # import logging +import random import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts @@ -38,6 +41,10 @@ async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcRunMode. "Unexpected return type for ChangeToMode") return ret + async def write_start_up_mode(self, newMode): + ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.RvcRunMode.Attributes.StartUpMode(newMode))]) + asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + @async_test_body async def test_TC_RVCRUNM_3_2(self): @@ -69,16 +76,32 @@ class CommonCodes(Enum): startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) logging.info("StartUpMode: %s" % (startup_mode)) + if startup_mode == NullValue: + self.print_step(3, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + modes = [m.mode for m in supported_modes] + new_startup_mode = random.choice(modes) - self.print_step(3, "Read CurrentMode attribute") + self.print_step(4, "Write the value %s to StartUpMode" % (new_startup_mode)) + + await self.write_start_up_mode(newMode=new_startup_mode) + else: + new_startup_mode = startup_mode + + self.print_step(5, "Read CurrentMode attribute") old_current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) logging.info("CurrentMode: %s" % (old_current_mode)) - if old_current_mode == startup_mode: + if old_current_mode == new_startup_mode: - self.print_step(4, "Read SupportedModes attribute") + self.print_step(6, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) logging.info("SupportedModes: %s" % (supported_modes)) @@ -88,21 +111,28 @@ class CommonCodes(Enum): new_mode = None for m in supported_modes: - if m.mode != startup_mode: + if m.mode != new_startup_mode: new_mode = m.mode break - self.print_step(5, "Send ChangeToMode command with NewMode set to %d" % (new_mode)) + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (new_mode)) ret = await self.send_change_to_mode_cmd(newMode=new_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode should succeed") self.default_controller.ExpireSessions(self.dut_node_id) - self.print_step(6, "Physically power cycle the device") + self.print_step(8, "Physically power cycle the device") input("Press Enter when done.\n") - self.print_step(7, "Read CurrentMode attribute") + self.print_step(9, "Read StartUpMode attribute") + + startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) + + logging.info("StartUpMode: %s" % (startup_mode)) + asserts.assert_equal(startup_mode, new_startup_mode, "StartUpMode must match the value it was before a power cycle") + + self.print_step(10, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) From 6e9b15ceb3ca3184a9b42f5d30e75a7b4db5bce6 Mon Sep 17 00:00:00 2001 From: Erwin Pan Date: Fri, 28 Jul 2023 09:55:00 +0800 Subject: [PATCH 065/159] [Chef] Add BasicVideoPlayer device type (#28152) * [Chef] Add Basic Video Player sample device * [Chef] Implement ChefChannelManager Implement ChefChannelManager and enable ChannelList, Lineup, ... * [Chef]Use emberAfChannelClusterInitC..k to init * [Chef] Support BasicVideoPlayer for esp32,nrfconnect * Restyled by whitespace * Restyled by clang-format * [Chef] upgrade zap to level 20230721 * Avoid doing "using namespace" in chef-channel-manager.h * return since we've alreay find the matched channel * Remove todo in common/chef-channel-manager.cpp * Fine tune chef-channel-manager logic 1. Remove mCurrentChannel which can be gotten from mCurrentChannelIndex 2. Return channel early when matched 3. use std::array instead if std::vector to optimize memory usage in MCU * Restyled by clang-format * Remove vector in chef-channel-manage.[cp] And avoid using "using" in header file * Restyled by clang-format --------- Co-authored-by: Restyled.io --- examples/chef/common/chef-channel-manager.cpp | 226 + examples/chef/common/chef-channel-manager.h | 55 + examples/chef/common/stubs.cpp | 12 + ...ootnode_basicvideoplayer_0ff86e943b.matter | 1868 ++++ .../rootnode_basicvideoplayer_0ff86e943b.zap | 7506 +++++++++++++++++ examples/chef/esp32/main/CMakeLists.txt | 5 +- examples/chef/linux/BUILD.gn | 6 +- examples/chef/linux/main.cpp | 7 +- examples/chef/nrfconnect/CMakeLists.txt | 2 + 9 files changed, 9680 insertions(+), 7 deletions(-) create mode 100644 examples/chef/common/chef-channel-manager.cpp create mode 100644 examples/chef/common/chef-channel-manager.h create mode 100644 examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter create mode 100644 examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap diff --git a/examples/chef/common/chef-channel-manager.cpp b/examples/chef/common/chef-channel-manager.cpp new file mode 100644 index 00000000000000..58a07edd730958 --- /dev/null +++ b/examples/chef/common/chef-channel-manager.cpp @@ -0,0 +1,226 @@ +/** + * + * Copyright (c) 2021 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. + */ +#include +#include +#include + +using ChangeChannelResponseType = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Type; +using ChannelInfoType = chip::app::Clusters::Channel::Structs::ChannelInfoStruct::Type; +using LineupInfoType = chip::app::Clusters::Channel::Structs::LineupInfoStruct::Type; +// Include Channel Cluster Server callbacks only when the server is enabled +#ifdef EMBER_AF_PLUGIN_CHANNEL_SERVER +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters::Channel; +using namespace chip::Uint8; + +ChefChannelManager::ChefChannelManager() +{ + ChannelInfoType abc; + abc.affiliateCallSign = MakeOptional(chip::CharSpan::fromCharString("KAAL")); + abc.callSign = MakeOptional(chip::CharSpan::fromCharString("KAAL-TV")); + abc.name = MakeOptional(chip::CharSpan::fromCharString("ABC")); + abc.majorNumber = static_cast(6); + abc.minorNumber = static_cast(0); + mChannels[mTotalChannels++] = abc; + + ChannelInfoType pbs; + pbs.affiliateCallSign = MakeOptional(chip::CharSpan::fromCharString("KCTS")); + pbs.callSign = MakeOptional(chip::CharSpan::fromCharString("KCTS-TV")); + pbs.name = MakeOptional(chip::CharSpan::fromCharString("PBS")); + pbs.majorNumber = static_cast(9); + pbs.minorNumber = static_cast(1); + mChannels[mTotalChannels++] = pbs; + + ChannelInfoType pbsKids; + pbsKids.affiliateCallSign = MakeOptional(chip::CharSpan::fromCharString("KCTS")); + pbsKids.callSign = MakeOptional(chip::CharSpan::fromCharString("KCTS-TV")); + pbsKids.name = MakeOptional(chip::CharSpan::fromCharString("PBS Kids")); + pbsKids.majorNumber = static_cast(9); + pbsKids.minorNumber = static_cast(2); + mChannels[mTotalChannels++] = pbsKids; + + ChannelInfoType worldChannel; + worldChannel.affiliateCallSign = MakeOptional(chip::CharSpan::fromCharString("KCTS")); + worldChannel.callSign = MakeOptional(chip::CharSpan::fromCharString("KCTS-TV")); + worldChannel.name = MakeOptional(chip::CharSpan::fromCharString("World Channel")); + worldChannel.majorNumber = static_cast(9); + worldChannel.minorNumber = static_cast(3); + mChannels[mTotalChannels++] = worldChannel; +} + +static bool isChannelMatched(const ChannelInfoType & channel, const CharSpan & match) +{ + if (channel.name.HasValue() && channel.name.Value().data_equal(match)) + { + return true; + } + + if (channel.affiliateCallSign.HasValue() && channel.affiliateCallSign.Value().data_equal(match)) + { + return true; + } + + if (channel.callSign.HasValue() && channel.callSign.Value().data_equal(match)) + { + return true; + } + + StringBuilder<32> nr; + nr.AddFormat("%d.%d", channel.majorNumber, channel.minorNumber); + return match.data_equal(CharSpan::fromCharString(nr.c_str())); +} + +CHIP_ERROR ChefChannelManager::HandleGetChannelList(app::AttributeValueEncoder & aEncoder) +{ + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { + int index = 0; + for (auto const & channel : ChefChannelManager().mChannels) + { + ReturnErrorOnFailure(encoder.Encode(channel)); + index++; + if (index >= ChefChannelManager().mTotalChannels) + break; + } + return CHIP_NO_ERROR; + }); +} + +CHIP_ERROR ChefChannelManager::HandleGetLineup(app::AttributeValueEncoder & aEncoder) +{ + LineupInfoType lineup; + lineup.operatorName = chip::CharSpan::fromCharString("Comcast"); + lineup.lineupName = MakeOptional(chip::CharSpan::fromCharString("Comcast King County")); + lineup.postalCode = MakeOptional(chip::CharSpan::fromCharString("98052")); + lineup.lineupInfoType = chip::app::Clusters::Channel::LineupInfoTypeEnum::kMso; + + return aEncoder.Encode(lineup); +} + +CHIP_ERROR ChefChannelManager::HandleGetCurrentChannel(app::AttributeValueEncoder & aEncoder) +{ + return aEncoder.Encode(mChannels[mCurrentChannelIndex]); +} + +void ChefChannelManager::HandleChangeChannel(CommandResponseHelper & helper, + const chip::CharSpan & match) +{ + std::array matchedChannels; + + uint16_t index = 0; + uint16_t totalMatchedChannels = 0; + for (auto const & channel : mChannels) + { + // verify if CharSpan matches channel name + // or callSign or affiliateCallSign or majorNumber.minorNumber + if (isChannelMatched(channel, match)) + { + matchedChannels[totalMatchedChannels++] = (channel); + } + else if (matchedChannels.size() == 0) + { + // "index" is only used when we end up with matchedChannels.size() == 1. + // In that case, we want it to be the number of non-matching channels we saw before + // the matching one. + index++; + } + } + + ChangeChannelResponseType response; + + // Error: Found multiple matches + if (matchedChannels.size() > 1) + { + response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kMultipleMatches; + helper.Success(response); + } + else if (matchedChannels.size() == 0) + { + // Error: Found no match + response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kNoMatches; + helper.Success(response); + } + else + { + response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kSuccess; + response.data = chip::MakeOptional(CharSpan::fromCharString("data response")); + mCurrentChannelIndex = index; + helper.Success(response); + } +} + +bool ChefChannelManager::HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber) +{ + bool channelChanged = false; + uint16_t index = 0; + for (auto const & channel : mChannels) + { + + // verify if major & minor matches one of the channel from the list + if (channel.minorNumber == minorNumber && channel.majorNumber == majorNumber) + { + // verify if channel changed by comparing values of current channel with the requested channel + if (channel.minorNumber != mChannels[mCurrentChannelIndex].minorNumber || + channel.majorNumber != mChannels[mCurrentChannelIndex].majorNumber) + { + channelChanged = true; + mCurrentChannelIndex = index; + } + + // return since we've already found the unique matched channel + return channelChanged; + } + index++; + if (index >= mTotalChannels) + break; + } + return channelChanged; +} + +bool ChefChannelManager::HandleSkipChannel(const int16_t & count) +{ + int32_t newChannelIndex = static_cast(count) + static_cast(mCurrentChannelIndex); + uint16_t channelsSize = static_cast(mChannels.size()); + + // handle newChannelIndex out of range. + newChannelIndex = newChannelIndex % channelsSize; + + if (newChannelIndex < 0) + { + newChannelIndex = newChannelIndex + channelsSize; + } + + mCurrentChannelIndex = static_cast(newChannelIndex); + return true; +} + +uint32_t ChefChannelManager::GetFeatureMap(chip::EndpointId endpoint) +{ + if (endpoint > EMBER_AF_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT) + { + return 0; + } + + uint32_t featureMap = 0; + Attributes::FeatureMap::Get(endpoint, &featureMap); + return featureMap; +} + +#endif /* EMBER_AF_PLUGIN_CHANNEL_SERVER */ diff --git a/examples/chef/common/chef-channel-manager.h b/examples/chef/common/chef-channel-manager.h new file mode 100644 index 00000000000000..53a1db529a9a4a --- /dev/null +++ b/examples/chef/common/chef-channel-manager.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2021 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 + +class ChefChannelManager : public chip::app::Clusters::Channel::Delegate +{ + +public: + ChefChannelManager(); + + CHIP_ERROR HandleGetChannelList(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR HandleGetLineup(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR HandleGetCurrentChannel(chip::app::AttributeValueEncoder & aEncoder); + + void HandleChangeChannel( + chip::app::CommandResponseHelper & helper, + const chip::CharSpan & match); + bool HandleChangeChannelByNumber(const uint16_t & majorNumber, const uint16_t & minorNumber); + bool HandleSkipChannel(const int16_t & count); + + static ChefChannelManager & Instance() + { + static ChefChannelManager instance; + return instance; + } + + // bool HasFeature(chip::EndpointId endpoint, Feature feature); + uint32_t GetFeatureMap(chip::EndpointId endpoint); + + ~ChefChannelManager() = default; + +protected: + static constexpr size_t kMaxChannels = 10; + uint16_t mCurrentChannelIndex{ 0 }; + uint16_t mTotalChannels{ 0 }; + std::array mChannels; +}; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 2d2b15ca93b4cd..74f72b0a57cb67 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -6,6 +6,8 @@ using chip::app::DataModel::Nullable; +using namespace chip; + // Include door lock callbacks only when the server is enabled #ifdef EMBER_AF_PLUGIN_DOOR_LOCK_SERVER #include @@ -237,3 +239,13 @@ bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t cr } #endif /* EMBER_AF_PLUGIN_DOOR_LOCK_SERVER */ + +#ifdef EMBER_AF_PLUGIN_CHANNEL_SERVER +#include + +void emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + app::Clusters::Channel::SetDefaultDelegate(endpoint, + static_cast(&(ChefChannelManager::Instance()))); +} +#endif // EMBER_AF_PLUGIN_CHANNEL_SERVER diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter new file mode 100644 index 00000000000000..46a8708f546889 --- /dev/null +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -0,0 +1,1868 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 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; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : ENUM8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : ENUM8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + + bitmap Feature : BITMAP32 { + kLighting = 0x1; + kDeadFront = 0x2; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 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; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + 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 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. */ +server cluster AccessControl = 31 { + 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) 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. */ +server cluster BasicInformation = 40 { + 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 char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; +} + +/** Provides an interface for providing OTA software updates */ +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : 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; + OTADownloadProtocol 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 { + OTAQueryStatus 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 { + OTAApplyUpdateAction 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 */ +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : 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 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum 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 ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum 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; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormatEnum hourFormat = 0; + attribute CalendarTypeEnum activeCalendarType = 1; + readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 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; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + 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; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + 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; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + 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 int8u scanMaxTimeSeconds = 2; + readonly attribute 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 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; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 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 RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** 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. */ +server cluster GeneralDiagnostics = 51 { + 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; + } + + 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 int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute 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; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** 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. */ +server cluster SoftwareDiagnostics = 52 { + 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 ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute 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; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +server cluster Switch = 59 { + bitmap Feature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 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; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u 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 salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + 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. */ +server cluster OperationalCredentials = 62 { + 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 attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + 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; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +server cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 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; +} + +/** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ +server cluster WakeOnLan = 1283 { + 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 an interface for controlling the current Channel on a device. */ +server cluster Channel = 1284 { + enum ChannelStatusEnum : ENUM8 { + kSuccess = 0; + kMultipleMatches = 1; + kNoMatches = 2; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMSO = 0; + } + + bitmap Feature : BITMAP32 { + kChannelList = 0x1; + kLineupInfo = 0x2; + } + + struct ChannelInfoStruct { + int16u majorNumber = 0; + int16u minorNumber = 1; + optional char_string name = 2; + optional char_string callSign = 3; + optional char_string affiliateCallSign = 4; + } + + struct LineupInfoStruct { + char_string operatorName = 0; + optional char_string lineupName = 1; + optional char_string postalCode = 2; + LineupInfoTypeEnum lineupInfoType = 3; + } + + readonly attribute ChannelInfoStruct channelList[] = 0; + readonly attribute nullable LineupInfoStruct lineup = 1; + readonly attribute nullable ChannelInfoStruct currentChannel = 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 ChangeChannelRequest { + CHAR_STRING match = 0; + } + + request struct ChangeChannelByNumberRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct SkipChannelRequest { + INT16S count = 0; + } + + response struct ChangeChannelResponse = 1 { + ChannelStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; + command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; + command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; +} + +/** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ +server cluster TargetNavigator = 1285 { + enum TargetNavigatorStatusEnum : ENUM8 { + kSuccess = 0; + kTargetNotFound = 1; + kNotAllowed = 2; + } + + struct TargetInfoStruct { + int8u identifier = 0; + char_string<32> name = 1; + } + + readonly attribute TargetInfoStruct targetList[] = 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; + + request struct NavigateTargetRequest { + INT8U target = 0; + optional CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse = 1 { + TargetNavigatorStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; +} + +/** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ +server cluster MediaPlayback = 1286 { + enum MediaPlaybackStatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + bitmap Feature : BITMAP32 { + kAdvancedSeek = 0x1; + kVariableSpeed = 0x2; + } + + struct PlaybackPositionStruct { + epoch_us updatedAt = 0; + nullable int64u position = 1; + } + + readonly attribute PlaybackStateEnum currentState = 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; + + response struct PlaybackResponse = 10 { + MediaPlaybackStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command Play(): PlaybackResponse = 0; + command Pause(): PlaybackResponse = 1; + command Stop(): PlaybackResponse = 2; +} + +/** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ +server cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHDMI = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kSCART = 9; + kUSB = 10; + kOther = 11; + } + + bitmap Feature : BITMAP32 { + kNameUpdates = 0x1; + } + + struct InputInfoStruct { + int8u index = 0; + InputTypeEnum inputType = 1; + char_string<32> name = 2; + char_string<32> description = 3; + } + + readonly attribute InputInfoStruct inputList[] = 0; + readonly attribute int8u currentInput = 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 SelectInputRequest { + INT8U index = 0; + } + + command SelectInput(SelectInputRequest): DefaultSuccess = 0; + command ShowInputStatus(): DefaultSuccess = 1; + command HideInputStatus(): DefaultSuccess = 2; +} + +/** This cluster provides an interface for managing low power mode on a device. */ +server cluster LowPower = 1288 { + 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 Sleep(): DefaultSuccess = 0; +} + +/** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ +server cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum KeypadInputStatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + bitmap Feature : BITMAP32 { + kNavigationKeyCodes = 0x1; + kLocationKeys = 0x2; + kNumberKeys = 0x4; + } + + 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 SendKeyRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse = 1 { + KeypadInputStatusEnum status = 0; + } + + command SendKey(SendKeyRequest): SendKeyResponse = 0; +} + +/** This cluster provides an interface for controlling the Output on a media device such as a TV. */ +server cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHDMI = 0; + kBT = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + bitmap Feature : BITMAP32 { + kNameUpdates = 0x1; + } + + struct OutputInfoStruct { + int8u index = 0; + OutputTypeEnum outputType = 1; + char_string<32> name = 2; + } + + readonly attribute OutputInfoStruct outputList[] = 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; + + request struct SelectOutputRequest { + INT8U index = 0; + } + + command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + persist attribute activeCalendarType default = 0; + callback attribute supportedCalendarTypes; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree default = 0x0000000000000000; + callback attribute currentHeapUsed default = 0x0000000000000000; + callback attribute currentHeapHighWatermark default = 0x0000000000000000; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 40, version 1; + + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster WakeOnLan { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster Channel { + callback attribute channelList; + callback attribute lineup; + callback attribute currentChannel; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster TargetNavigator { + callback attribute targetList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster MediaPlayback { + ram attribute currentState default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster MediaInput { + callback attribute inputList; + ram attribute currentInput default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LowPower { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster KeypadInput { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AudioOutput { + callback attribute outputList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap new file mode 100644 index 00000000000000..49051bc9b0e123 --- /dev/null +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -0,0 +1,7506 @@ +{ + "featureLevel": 97, + "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": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "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": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "", + "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": "", + "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": "", + "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": "", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "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": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "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": "10", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "XX", + "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": "0", + "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": "", + "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": "0", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "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": "1", + "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", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "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, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "OTAUpdateStateEnum", + "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": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "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": "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": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "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": "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 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 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": "", + "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": "0", + "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": "0", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 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": "", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0001", + "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": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0", + "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": "0x0000", + "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": "0x0000000000000000", + "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": "", + "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": "0x0000000000000000", + "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": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-basic-videoplayer", + "deviceTypeCode": 40, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "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": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Wake on LAN", + "code": 1283, + "mfgCode": null, + "define": "WAKE_ON_LAN_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Wake on LAN", + "code": 1283, + "mfgCode": null, + "define": "WAKE_ON_LAN_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MACAddress", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Channel", + "code": 1284, + "mfgCode": null, + "define": "CHANNEL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeChannel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ChangeChannelByNumber", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "SkipChannel", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Channel", + "code": 1284, + "mfgCode": null, + "define": "CHANNEL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeChannelResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ChannelList", + "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": "Lineup", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "LineupInfoStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentChannel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChannelInfoStruct", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "3", + "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 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "NavigateTarget", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "NavigateTargetResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "TargetList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentTarget", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Media Playback", + "code": 1286, + "mfgCode": null, + "define": "MEDIA_PLAYBACK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Play", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Pause", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Media Playback", + "code": 1286, + "mfgCode": null, + "define": "MEDIA_PLAYBACK_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "PlaybackResponse", + "code": 10, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "CurrentState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PlaybackStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "epoch_us", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Duration", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SampledPosition", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "PlaybackPositionStruct", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PlaybackSpeed", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SeekRangeEnd", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SeekRangeStart", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Media Input", + "code": 1287, + "mfgCode": null, + "define": "MEDIA_INPUT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SelectInput", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ShowInputStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "HideInputStatus", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Media Input", + "code": 1287, + "mfgCode": null, + "define": "MEDIA_INPUT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "InputList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentInput", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Low Power", + "code": 1288, + "mfgCode": null, + "define": "LOW_POWER_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Sleep", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Low Power", + "code": 1288, + "mfgCode": null, + "define": "LOW_POWER_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SendKey", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SendKeyResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Audio Output", + "code": 1291, + "mfgCode": null, + "define": "AUDIO_OUTPUT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SelectOutput", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Audio Output", + "code": 1291, + "mfgCode": null, + "define": "AUDIO_OUTPUT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OutputList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentOutput", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 40 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index 5a48e62a7bb457..6c342d07b4fa15 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -32,6 +32,7 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlio/repo/include" "${CMAKE_SOURCE_DIR}/../" + "${CMAKE_SOURCE_DIR}/../common" "${CMAKE_SOURCE_DIR}/main/include/" ) @@ -60,11 +61,11 @@ message(STATUS "** End of Cluster List **") set(SRC_DIRS_LIST ${SRC_DIRS_LIST} "${CMAKE_CURRENT_LIST_DIR}" + "${CMAKE_SOURCE_DIR}/../common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" - "${CMAKE_SOURCE_DIR}/../common" ) if (CONFIG_ENABLE_CHIP_SHELL) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index f8463376b6ba15..147509e7fad5d9 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -42,6 +42,7 @@ chip_data_model("chef-data-model") { executable("${sample_name}") { sources = [ + "${project_dir}/common/chef-channel-manager.cpp", "${project_dir}/common/stubs.cpp", "${project_dir}/linux/main.cpp", ] @@ -53,7 +54,10 @@ executable("${sample_name}") { "${project_dir}/shell_common:shell_common", ] - include_dirs = [ "include" ] + include_dirs = [ + "include", + "${project_dir}/common", + ] if (chip_enable_pw_rpc) { defines = [ diff --git a/examples/chef/linux/main.cpp b/examples/chef/linux/main.cpp index 9b15ae9cba6582..d799b4da3b53e6 100644 --- a/examples/chef/linux/main.cpp +++ b/examples/chef/linux/main.cpp @@ -18,17 +18,16 @@ #include +#include #include #include -#include - #include - -#include +#include using namespace chip; using namespace chip::Shell; using namespace chip::app; +using namespace chip::app::Clusters; void ApplicationInit() {} diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index c813a314a74264..90869f9d4ed2c9 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -68,6 +68,7 @@ target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common ${GEN_DIR} ${CHEF} + ${CHEF}/common ${GEN_DIR}/../ ${CHIP_ROOT}/src ${CHIP_ROOT}/examples/shell/shell_common/include @@ -90,6 +91,7 @@ endif() target_sources(app PRIVATE ${CHEF}/nrfconnect/main.cpp ${CHEF}/common/stubs.cpp + ${CHEF}/common/chef-channel-manager.cpp ) message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap) From 4fe0df05e84791737ff06c50ef0392e18f51c25b Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:07:59 +0530 Subject: [PATCH 066/159] [ESP32] Allowing empty semantic tags list in SupportedModes attribute of ModeSelect (#28324) * [ESP32] Allowing empty semantic tags list in SupportedModes attribute of ModeSelect * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- .../tools/generate_esp32_chip_factory_bin.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/tools/generate_esp32_chip_factory_bin.py b/scripts/tools/generate_esp32_chip_factory_bin.py index 303f5cda968fda..6ee881d50689fe 100755 --- a/scripts/tools/generate_esp32_chip_factory_bin.py +++ b/scripts/tools/generate_esp32_chip_factory_bin.py @@ -203,7 +203,7 @@ def ishex(s): # get_fixed_label_dict() converts the list of strings to per endpoint dictionaries. # example input : ['0/orientation/up', '1/orientation/down', '2/orientation/down'] -# example outout : {'0': [{'orientation': 'up'}], '1': [{'orientation': 'down'}], '2': [{'orientation': 'down'}]} +# example output : {'0': [{'orientation': 'up'}], '1': [{'orientation': 'down'}], '2': [{'orientation': 'down'}]} def get_fixed_label_dict(fixed_labels): @@ -227,8 +227,13 @@ def get_fixed_label_dict(fixed_labels): return fl_dict # get_supported_modes_dict() converts the list of strings to per endpoint dictionaries. -# example input : ['0/label1/1/"1\0x8000, 2\0x8000", 1/label2/1/"1\0x8000, 2\0x8000"'] -# example outout : {'1': [{'Label': 'label1', 'Mode': 0, 'Semantic_Tag': [{'value': 1, 'mfgCode': 32768}, {'value': 2, 'mfgCode': 32768}]}, {'Label': 'label2', 'Mode': 1, 'Semantic_Tag': [{'value': 1, 'mfgCode': 32768}, {'value': 2, 'mfgCode': 32768}]}]} +# example with semantic tags +# input : ['0/label1/1/"1\0x8000, 2\0x8000" 1/label2/1/"1\0x8000, 2\0x8000"'] +# output : {'1': [{'Label': 'label1', 'Mode': 0, 'Semantic_Tag': [{'value': 1, 'mfgCode': 32768}, {'value': 2, 'mfgCode': 32768}]}, {'Label': 'label2', 'Mode': 1, 'Semantic_Tag': [{'value': 1, 'mfgCode': 32768}, {'value': 2, 'mfgCode': 32768}]}]} + +# example without semantic tags +# input : ['0/label1/1 1/label2/1'] +# output : {'1': [{'Label': 'label1', 'Mode': 0, 'Semantic_Tag': []}, {'Label': 'label2', 'Mode': 1, 'Semantic_Tag': []}]} def get_supported_modes_dict(supported_modes): @@ -240,8 +245,10 @@ def get_supported_modes_dict(supported_modes): label = mode_label_strs[1] ep = mode_label_strs[2] - semantic_tag_strs = mode_label_strs[3].split(', ') - semantic_tags = [{"value": int(v.split('\\')[0]), "mfgCode": int(v.split('\\')[1], 16)} for v in semantic_tag_strs] + semantic_tags = '' + if (len(mode_label_strs) == 4): + semantic_tag_strs = mode_label_strs[3].split(', ') + semantic_tags = [{"value": int(v.split('\\')[0]), "mfgCode": int(v.split('\\')[1], 16)} for v in semantic_tag_strs] mode_dict = {"Label": label, "Mode": int(mode), "Semantic_Tag": semantic_tags} From 97964dbc78e9b952b8b6c85aca5a5973cac6989c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Fri, 28 Jul 2023 10:28:07 +0200 Subject: [PATCH 067/159] [dnssd] remove constants for _A subtype and AP TXT field (#28332) * [dnssd] remove constants for _A subtype and AP TXT field The _A subtype and AP TXT field were removed from the spec long time ago but the constants describing the maximum lengths are still present in the SDK. * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/lib/dnssd/Constants.h | 16 +++++++--------- src/lib/dnssd/TxtFields.h | 19 ++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/lib/dnssd/Constants.h b/src/lib/dnssd/Constants.h index 992ab9cba4bb63..d1805058b1e8ba 100644 --- a/src/lib/dnssd/Constants.h +++ b/src/lib/dnssd/Constants.h @@ -35,13 +35,12 @@ constexpr size_t kHostNameMaxLength = 16; // MAC or 802.15.4 Extended Address in * Matter DNS service subtypes */ -constexpr size_t kSubTypeShortDiscriminatorMaxLength = 4; // _S
-constexpr size_t kSubTypeLongDiscriminatorMaxLength = 6; // _L -constexpr size_t kSubTypeVendorIdMaxLength = 7; // _V -constexpr size_t kSubTypeDeviceTypeMaxLength = 12; // _T -constexpr size_t kSubTypeCommissioningModeMaxLength = 3; // _C -constexpr size_t kSubTypeAdditionalCommissioningMaxLength = 3; // _A -constexpr size_t kSubTypeCompressedFabricIdMaxLength = 18; // _I<16-hex-digits> +constexpr size_t kSubTypeShortDiscriminatorMaxLength = 4; // _S
+constexpr size_t kSubTypeLongDiscriminatorMaxLength = 6; // _L +constexpr size_t kSubTypeVendorIdMaxLength = 7; // _V +constexpr size_t kSubTypeDeviceTypeMaxLength = 12; // _T +constexpr size_t kSubTypeCommissioningModeMaxLength = 3; // _CM +constexpr size_t kSubTypeCompressedFabricIdMaxLength = 18; // _I<16-hex-digits> /* * Matter operational node service settings @@ -68,8 +67,7 @@ namespace Commission { #define SUBTYPES \ (std::initializer_list{ kSubTypeShortDiscriminatorMaxLength, kSubTypeLongDiscriminatorMaxLength, \ - kSubTypeVendorIdMaxLength, kSubTypeDeviceTypeMaxLength, kSubTypeCommissioningModeMaxLength, \ - kSubTypeAdditionalCommissioningMaxLength }) + kSubTypeVendorIdMaxLength, kSubTypeDeviceTypeMaxLength, kSubTypeCommissioningModeMaxLength }) constexpr size_t kInstanceNameMaxLength = 16; // 64-bit random number in hex constexpr size_t kSubTypeMaxNumber = SUBTYPES.size(); diff --git a/src/lib/dnssd/TxtFields.h b/src/lib/dnssd/TxtFields.h index b39f8617d8ddd1..fdd616d1d2b1dc 100644 --- a/src/lib/dnssd/TxtFields.h +++ b/src/lib/dnssd/TxtFields.h @@ -38,15 +38,14 @@ static constexpr System::Clock::Milliseconds32 kMaxRetryInterval = 3600000_ms32; static constexpr size_t kKeyTcpSupportedMaxLength = 1; // Commissionable/commissioner node TXT entries -static constexpr size_t kKeyLongDiscriminatorMaxLength = 5; -static constexpr size_t kKeyVendorProductMaxLength = 11; -static constexpr size_t kKeyAdditionalCommissioningMaxLength = 1; -static constexpr size_t kKeyCommissioningModeMaxLength = 1; -static constexpr size_t kKeyDeviceTypeMaxLength = 10; -static constexpr size_t kKeyDeviceNameMaxLength = 32; -static constexpr size_t kKeyRotatingDeviceIdMaxLength = 100; -static constexpr size_t kKeyPairingInstructionMaxLength = 128; -static constexpr size_t kKeyPairingHintMaxLength = 10; +static constexpr size_t kKeyLongDiscriminatorMaxLength = 5; +static constexpr size_t kKeyVendorProductMaxLength = 11; +static constexpr size_t kKeyCommissioningModeMaxLength = 1; +static constexpr size_t kKeyDeviceTypeMaxLength = 10; +static constexpr size_t kKeyDeviceNameMaxLength = 32; +static constexpr size_t kKeyRotatingDeviceIdMaxLength = 100; +static constexpr size_t kKeyPairingInstructionMaxLength = 128; +static constexpr size_t kKeyPairingHintMaxLength = 10; enum class TxtKeyUse : uint8_t { @@ -60,7 +59,6 @@ enum class TxtFieldKey : uint8_t kUnknown, kLongDiscriminator, kVendorProduct, - kAdditionalPairing, kCommissioningMode, kDeviceType, kDeviceName, @@ -87,7 +85,6 @@ constexpr const TxtFieldInfo txtFieldInfo[static_cast(TxtFieldKey::kCoun { TxtFieldKey::kUnknown, 0, "", TxtKeyUse::kNone }, { TxtFieldKey::kLongDiscriminator, kKeyLongDiscriminatorMaxLength, "D", TxtKeyUse::kCommission }, { TxtFieldKey::kVendorProduct, kKeyVendorProductMaxLength, "VP", TxtKeyUse::kCommission }, - { TxtFieldKey::kAdditionalPairing, kKeyAdditionalCommissioningMaxLength, "AP", TxtKeyUse::kCommission }, { TxtFieldKey::kCommissioningMode, kKeyCommissioningModeMaxLength, "CM", TxtKeyUse::kCommission }, { TxtFieldKey::kDeviceType, kKeyDeviceTypeMaxLength, "DT", TxtKeyUse::kCommission }, { TxtFieldKey::kDeviceName, kKeyDeviceNameMaxLength, "DN", TxtKeyUse::kCommission }, From 5dd4b068ab883c8079868d5de18f2da632c64f5d Mon Sep 17 00:00:00 2001 From: William Date: Fri, 28 Jul 2023 12:45:52 +0100 Subject: [PATCH 068/159] Reverted the AttributePersistenceProvider and added a SafeAttributePersistenceProvider (#28302) * Renamed AttributePersistenceProvider to SafeAttributePersistenceProvider. Reverted to the previous AttributePersistenceProvider. Updated the tests and examples that used the AttributePersistenceProvider. * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Fixed the key generated for safe attributes. Co-authored-by: Tennessee Carmel-Veilleux * Apply documentation suggestions from code review Co-authored-by: Boris Zbarsky * Removed unused aPath and import. * Fixed some docs. Removed size from the SafeAttributePersistenceProvider::SafeReadValue method. * Replaced the aType input var from the SafeAttributePersistenceProvider::SafeReadValue method with documentation on the expectet types. * Replaced the SafeAttributePersistenceProvider::GetNullValueForNullableType logic with that used in NumericAttributeTraits::GetNullValue. Mode the GetNullValueForNullableType methods private and commented out the relevant unit tests. * Restyled by clang-format * Replaced the SafeAttributePersistenceProvider::GetNullValueForNullableType methods with NumericAttributeTraits. * Apply documentation suggestions from code review Co-authored-by: Boris Zbarsky * Restyled by clang-format * Refactored SafeAttributePersistenceProvider reducing the number of templated functions. Co-authored-by: Boris Zbarsky * Fixed minor bug in suggestions. * Restyled by whitespace --------- Co-authored-by: Restyled.io Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Boris Zbarsky --- src/app/AttributePersistenceProvider.h | 170 +---------------- src/app/BUILD.gn | 1 + .../DefaultAttributePersistenceProvider.cpp | 69 ++++++- src/app/DefaultAttributePersistenceProvider.h | 13 +- .../DeferredAttributePersistenceProvider.cpp | 6 +- .../DeferredAttributePersistenceProvider.h | 2 +- src/app/SafeAttributePersistenceProvider.h | 177 ++++++++++++++++++ .../mode-base-server/mode-base-server.cpp | 16 +- .../resource-monitoring-server.cpp | 6 +- src/app/server/Server.cpp | 1 + .../TestAttributePersistenceProvider.cpp | 28 +-- src/app/util/attribute-storage.cpp | 5 +- src/lib/support/DefaultStorageKeyAllocator.h | 8 + 13 files changed, 288 insertions(+), 214 deletions(-) create mode 100644 src/app/SafeAttributePersistenceProvider.h diff --git a/src/app/AttributePersistenceProvider.h b/src/app/AttributePersistenceProvider.h index de2ae5db8fe2e8..527582907ab15e 100644 --- a/src/app/AttributePersistenceProvider.h +++ b/src/app/AttributePersistenceProvider.h @@ -16,19 +16,17 @@ #pragma once #include -#include #include -#include -#include -#include -#include #include namespace chip { namespace app { /** - * Interface for persisting attribute values. + * Interface for persisting attribute values. This will write attributes in storage with platform endianness for scalars + * and uses a different key space from SafeAttributePersistenceProvider. + * When storing cluster attributes that are managed via the AttributeAccessInterface, it is recommended to + * use SafeAttributePersistenceProvider. */ class AttributePersistenceProvider @@ -61,171 +59,17 @@ class AttributePersistenceProvider * Read an attribute value from non-volatile memory. * * @param [in] aPath the attribute path for the data being persisted. - * @param [in] aType the attribute type. - * @param [in] aSize the attribute size. + * @param [in] aMetadata the attribute metadata, as a convenience. * @param [in,out] aValue where to place the data. The size of the buffer - * will be equal to `size`. + * will be equal to `size` member of aMetadata. * * The data is expected to be in native endianness for * integers and floats. For strings, see the string * representation description in the WriteValue * documentation. */ - virtual CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, EmberAfAttributeType aType, size_t aSize, + virtual CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) = 0; - - /** - * Get the KVS representation of null for the given type. - * @tparam T The type for which the null representation should be returned. - * @return A value of type T that in the KVS represents null. - */ - template ::value, bool> = true> - static uint8_t GetNullValueForNullableType() - { - return 0xff; - } - - /** - * Get the KVS representation of null for the given type. - * @tparam T The type for which the null representation should be returned. - * @return A value of type T that in the KVS represents null. - */ - template ::value && !std::is_same::value, bool> = true> - static T GetNullValueForNullableType() - { - T nullValue = 0; - nullValue = T(~nullValue); - return nullValue; - } - - /** - * Get the KVS representation of null for the given type. - * @tparam T The type for which the null representation should be returned. - * @return A value of type T that in the KVS represents null. - */ - template ::value && !std::is_same::value, bool> = true> - static T GetNullValueForNullableType() - { - T shiftBit = 1; - return T(shiftBit << ((sizeof(T) * 8) - 1)); - } - - // The following API provides helper functions to simplify the access of commonly used types. - // The API may not be complete. - // Currently implemented write and read types are: uint8_t, uint16_t, uint32_t, unit64_t and - // their nullable varieties, and bool. - - /** - * Write an attribute value of type intX, uintX or bool to non-volatile memory. - * - * @param [in] aPath the attribute path for the data being written. - * @param [in] aValue the data to write. - */ - template ::value, bool> = true> - CHIP_ERROR WriteScalarValue(const ConcreteAttributePath & aPath, T & aValue) - { - uint8_t value[sizeof(T)]; - auto w = Encoding::LittleEndian::BufferWriter(value, sizeof(T)); - w.EndianPut(uint64_t(aValue), sizeof(T)); - - return WriteValue(aPath, ByteSpan(value)); - } - - /** - * Read an attribute of type intX, uintX or bool from non-volatile memory. - * - * @param [in] aPath the attribute path for the data being persisted. - * @param [in,out] aValue where to place the data. - */ - template ::value, bool> = true> - CHIP_ERROR ReadScalarValue(const ConcreteAttributePath & aPath, T & aValue) - { - uint8_t attrData[sizeof(T)]; - MutableByteSpan tempVal(attrData); - // **Note** aType in the ReadValue function is only used to check if the value is of a string type. Since this template - // function is only enabled for integral values, we know that this case will not occur, so we can pass the enum of an - // arbitrary integral type. 0x20 is the ZCL enum type for ZCL_INT8U_ATTRIBUTE_TYPE. - auto err = ReadValue(aPath, 0x20, sizeof(T), tempVal); - if (err != CHIP_NO_ERROR) - { - return err; - } - - chip::Encoding::LittleEndian::Reader r(tempVal.data(), tempVal.size()); - r.RawReadLowLevelBeCareful(&aValue); - return r.StatusCode(); - } - - /** - * Write an attribute value of type nullable intX, uintX or bool to non-volatile memory. - * - * @param [in] aPath the attribute path for the data being written. - * @param [in] aValue the data to write. - */ - template ::value, bool> = true> - CHIP_ERROR WriteScalarValue(const ConcreteAttributePath & aPath, DataModel::Nullable & aValue) - { - if (aValue.IsNull()) - { - auto nullVal = GetNullValueForNullableType(); - return WriteScalarValue(aPath, nullVal); - } - return WriteScalarValue(aPath, aValue.Value()); - } - - /** - * Read an attribute of type nullable intX, uintX from non-volatile memory. - * - * @param [in] aPath the attribute path for the data being persisted. - * @param [in,out] aValue where to place the data. - */ - template ::value && !std::is_same::value, bool> = true> - CHIP_ERROR ReadScalarValue(const ConcreteAttributePath & aPath, DataModel::Nullable & aValue) - { - T tempIntegral; - - CHIP_ERROR err = ReadScalarValue(aPath, tempIntegral); - if (err != CHIP_NO_ERROR) - { - return err; - } - - if (tempIntegral == GetNullValueForNullableType()) - { - aValue.SetNull(); - return CHIP_NO_ERROR; - } - - aValue.SetNonNull(tempIntegral); - return CHIP_NO_ERROR; - } - - /** - * Read an attribute of type nullable bool from non-volatile memory. - * - * @param [in] aPath the attribute path for the data being persisted. - * @param [in,out] aValue where to place the data. - */ - template ::value, bool> = true> - CHIP_ERROR ReadScalarValue(const ConcreteAttributePath & aPath, DataModel::Nullable & aValue) - { - uint8_t tempIntegral; - - CHIP_ERROR err = ReadScalarValue(aPath, tempIntegral); - if (err != CHIP_NO_ERROR) - { - return err; - } - - if (tempIntegral == GetNullValueForNullableType()) - { - aValue.SetNull(); - return CHIP_NO_ERROR; - } - - aValue.SetNonNull(tempIntegral); - return CHIP_NO_ERROR; - } }; /** diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index aade1882cb5f5a..83ffe632da7684 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -183,6 +183,7 @@ static_library("app") { "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", + "SafeAttributePersistenceProvider.h", "StatusResponse.cpp", "StatusResponse.h", "SubscriptionResumptionStorage.h", diff --git a/src/app/DefaultAttributePersistenceProvider.cpp b/src/app/DefaultAttributePersistenceProvider.cpp index 164eba6d93fbeb..36497704a94a87 100644 --- a/src/app/DefaultAttributePersistenceProvider.cpp +++ b/src/app/DefaultAttributePersistenceProvider.cpp @@ -22,7 +22,7 @@ namespace chip { namespace app { -CHIP_ERROR DefaultAttributePersistenceProvider::WriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) +CHIP_ERROR DefaultAttributePersistenceProvider::InternalWriteValue(const StorageKeyName & aKey, const ByteSpan & aValue) { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -33,20 +33,16 @@ CHIP_ERROR DefaultAttributePersistenceProvider::WriteValue(const ConcreteAttribu { return CHIP_ERROR_BUFFER_TOO_SMALL; } - return mStorage->SyncSetKeyValue( - DefaultStorageKeyAllocator::AttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId).KeyName(), - aValue.data(), static_cast(aValue.size())); + return mStorage->SyncSetKeyValue(aKey.KeyName(), aValue.data(), static_cast(aValue.size())); } -CHIP_ERROR DefaultAttributePersistenceProvider::ReadValue(const ConcreteAttributePath & aPath, EmberAfAttributeType aType, - size_t aSize, MutableByteSpan & aValue) +CHIP_ERROR DefaultAttributePersistenceProvider::InternalReadValue(const StorageKeyName & aKey, EmberAfAttributeType aType, + size_t aSize, MutableByteSpan & aValue) { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); uint16_t size = static_cast(min(aValue.size(), static_cast(UINT16_MAX))); - ReturnErrorOnFailure(mStorage->SyncGetKeyValue( - DefaultStorageKeyAllocator::AttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId).KeyName(), - aValue.data(), size)); + ReturnErrorOnFailure(mStorage->SyncGetKeyValue(aKey.KeyName(), aValue.data(), size)); EmberAfAttributeType type = aType; if (emberAfIsStringAttributeType(type)) { @@ -71,12 +67,45 @@ CHIP_ERROR DefaultAttributePersistenceProvider::ReadValue(const ConcreteAttribut return CHIP_NO_ERROR; } +CHIP_ERROR DefaultAttributePersistenceProvider::WriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) +{ + return InternalWriteValue(DefaultStorageKeyAllocator::AttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), + aValue); +} + +CHIP_ERROR DefaultAttributePersistenceProvider::ReadValue(const ConcreteAttributePath & aPath, + const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) +{ + return InternalReadValue(DefaultStorageKeyAllocator::AttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), + aMetadata->attributeType, aMetadata->size, aValue); +} + +CHIP_ERROR DefaultAttributePersistenceProvider::SafeWriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) +{ + return InternalWriteValue( + DefaultStorageKeyAllocator::SafeAttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), aValue); +} + +CHIP_ERROR DefaultAttributePersistenceProvider::SafeReadValue(const ConcreteAttributePath & aPath, MutableByteSpan & aValue) +{ + return InternalReadValue( + DefaultStorageKeyAllocator::SafeAttributeValue(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), 0x20, + aValue.size(), aValue); +} + namespace { AttributePersistenceProvider * gAttributeSaver = nullptr; } // anonymous namespace +/** + * Gets the global attribute saver. + * + * Note: When storing cluster attributes that are managed via AttributeAccessInterface, it is recommended to + * use SafeAttributePersistenceProvider. See AttributePersistenceProvider and SafeAttributePersistenceProvider + * class documentation for more information. + */ AttributePersistenceProvider * GetAttributePersistenceProvider() { return gAttributeSaver; @@ -90,5 +119,27 @@ void SetAttributePersistenceProvider(AttributePersistenceProvider * aProvider) } } +namespace { + +SafeAttributePersistenceProvider * gSafeAttributeSaver = nullptr; + +} // anonymous namespace + +/** + * Gets the global attribute safe saver. + */ +SafeAttributePersistenceProvider * GetSafeAttributePersistenceProvider() +{ + return gSafeAttributeSaver; +} + +void SetSafeAttributePersistenceProvider(SafeAttributePersistenceProvider * aProvider) +{ + if (aProvider != nullptr) + { + gSafeAttributeSaver = aProvider; + } +} + } // namespace app } // namespace chip diff --git a/src/app/DefaultAttributePersistenceProvider.h b/src/app/DefaultAttributePersistenceProvider.h index ef57cd4fbdf3fd..4db77e8919222c 100644 --- a/src/app/DefaultAttributePersistenceProvider.h +++ b/src/app/DefaultAttributePersistenceProvider.h @@ -16,6 +16,7 @@ #pragma once #include +#include #include #include @@ -30,7 +31,7 @@ namespace app { * of this class, since it can't be constructed automatically without knowing * what PersistentStorageDelegate is to be used. */ -class DefaultAttributePersistenceProvider : public AttributePersistenceProvider +class DefaultAttributePersistenceProvider : public AttributePersistenceProvider, public SafeAttributePersistenceProvider { public: DefaultAttributePersistenceProvider() {} @@ -50,11 +51,19 @@ class DefaultAttributePersistenceProvider : public AttributePersistenceProvider // AttributePersistenceProvider implementation. CHIP_ERROR WriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) override; - CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, EmberAfAttributeType aType, size_t aSize, + CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) override; + // SafeAttributePersistenceProvider implementation. + CHIP_ERROR SafeWriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) override; + CHIP_ERROR SafeReadValue(const ConcreteAttributePath & aPath, MutableByteSpan & aValue) override; + protected: PersistentStorageDelegate * mStorage; + +private: + CHIP_ERROR InternalWriteValue(const StorageKeyName & aKey, const ByteSpan & aValue); + CHIP_ERROR InternalReadValue(const StorageKeyName & aKey, EmberAfAttributeType aType, size_t aSize, MutableByteSpan & aValue); }; } // namespace app diff --git a/src/app/DeferredAttributePersistenceProvider.cpp b/src/app/DeferredAttributePersistenceProvider.cpp index 46c1996b81cc58..62d5c446fe2091 100644 --- a/src/app/DeferredAttributePersistenceProvider.cpp +++ b/src/app/DeferredAttributePersistenceProvider.cpp @@ -57,10 +57,10 @@ CHIP_ERROR DeferredAttributePersistenceProvider::WriteValue(const ConcreteAttrib return mPersister.WriteValue(aPath, aValue); } -CHIP_ERROR DeferredAttributePersistenceProvider::ReadValue(const ConcreteAttributePath & aPath, EmberAfAttributeType aType, - size_t aSize, MutableByteSpan & aValue) +CHIP_ERROR DeferredAttributePersistenceProvider::ReadValue(const ConcreteAttributePath & aPath, + const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) { - return mPersister.ReadValue(aPath, aType, aSize, aValue); + return mPersister.ReadValue(aPath, aMetadata, aValue); } void DeferredAttributePersistenceProvider::FlushAndScheduleNext() diff --git a/src/app/DeferredAttributePersistenceProvider.h b/src/app/DeferredAttributePersistenceProvider.h index 43f6653e08408c..c1023e9b8b8582 100644 --- a/src/app/DeferredAttributePersistenceProvider.h +++ b/src/app/DeferredAttributePersistenceProvider.h @@ -67,7 +67,7 @@ class DeferredAttributePersistenceProvider : public AttributePersistenceProvider * For other attributes, immediately pass the write operation to the decorated persister. */ CHIP_ERROR WriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) override; - CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, EmberAfAttributeType aType, size_t aSize, + CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) override; private: diff --git a/src/app/SafeAttributePersistenceProvider.h b/src/app/SafeAttributePersistenceProvider.h new file mode 100644 index 00000000000000..c6cba4e9f7135d --- /dev/null +++ b/src/app/SafeAttributePersistenceProvider.h @@ -0,0 +1,177 @@ +/* + * 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. + */ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { + +/** + * Interface for persisting attribute values. This will always write attributes in storage as little-endian + * and uses a different key space from AttributePersistenceProvider. + */ + +class SafeAttributePersistenceProvider +{ +public: + virtual ~SafeAttributePersistenceProvider() = default; + SafeAttributePersistenceProvider() = default; + + // The following API provides helper functions to simplify the access of commonly used types. + // The API may not be complete. + // Currently implemented write and read types are: uint8_t, uint16_t, uint32_t, unit64_t and + // their nullable varieties, and bool. + + /** + * Write an attribute value of type intX, uintX or bool to non-volatile memory. + * + * @param [in] aPath the attribute path for the data being written. + * @param [in] aValue the data to write. + */ + template ::value, bool> = true> + CHIP_ERROR WriteScalarValue(const ConcreteAttributePath & aPath, T & aValue) + { + uint8_t value[sizeof(T)]; + auto w = Encoding::LittleEndian::BufferWriter(value, sizeof(T)); + w.EndianPut(uint64_t(aValue), sizeof(T)); + + return SafeWriteValue(aPath, ByteSpan(value)); + } + + /** + * Read an attribute of type intX, uintX or bool from non-volatile memory. + * + * @param [in] aPath the attribute path for the data being persisted. + * @param [in,out] aValue where to place the data. + */ + template ::value, bool> = true> + CHIP_ERROR ReadScalarValue(const ConcreteAttributePath & aPath, T & aValue) + { + uint8_t attrData[sizeof(T)]; + MutableByteSpan tempVal(attrData); + auto err = SafeReadValue(aPath, tempVal); + if (err != CHIP_NO_ERROR) + { + return err; + } + + chip::Encoding::LittleEndian::Reader r(tempVal.data(), tempVal.size()); + r.RawReadLowLevelBeCareful(&aValue); + return r.StatusCode(); + } + + /** + * Write an attribute value of type nullable intX, uintX to non-volatile memory. + * + * @param [in] aPath the attribute path for the data being written. + * @param [in] aValue the data to write. + */ + template ::value, bool> = true> + CHIP_ERROR WriteScalarValue(const ConcreteAttributePath & aPath, DataModel::Nullable & aValue) + { + typename NumericAttributeTraits::StorageType storageValue; + if (aValue.IsNull()) + { + NumericAttributeTraits::SetNull(storageValue); + } + else + { + NumericAttributeTraits::WorkingToStorage(aValue.Value(), storageValue); + } + return WriteScalarValue(aPath, storageValue); + } + + /** + * Read an attribute of type nullable intX, uintX from non-volatile memory. + * + * @param [in] aPath the attribute path for the data being persisted. + * @param [in,out] aValue where to place the data. + */ + template ::value, bool> = true> + CHIP_ERROR ReadScalarValue(const ConcreteAttributePath & aPath, DataModel::Nullable & aValue) + { + typename NumericAttributeTraits::StorageType storageValue; + CHIP_ERROR err = ReadScalarValue(aPath, storageValue); + if (err != CHIP_NO_ERROR) + { + return err; + } + + if (NumericAttributeTraits::IsNullValue(storageValue)) + { + aValue.SetNull(); + return CHIP_NO_ERROR; + } + + // Consider checking CanRepresentValue here, so we don't produce invalid data + // if the storage hands us invalid values. + aValue.SetNonNull(NumericAttributeTraits::StorageToWorking(storageValue)); + return CHIP_NO_ERROR; + } + +protected: + /** + * Write an attribute value from the attribute store (i.e. not a struct or + * list) to non-volatile memory. + * + * @param [in] aPath the attribute path for the data being written. + * @param [in] aValue the data to write. The value should be stored as-is. + */ + virtual CHIP_ERROR SafeWriteValue(const ConcreteAttributePath & aPath, const ByteSpan & aValue) = 0; + + /** + * Read an attribute value from non-volatile memory. + * It can be assumed that this method will never be called upon to read + * an attribute of type string or long-string. + * + * @param [in] aPath the attribute path for the data being persisted. + * @param [in,out] aValue where to place the data. The size of the buffer + * will be equal to `aValue.size()`. The callee is expected to adjust + * aValue's size to the actual number of bytes read. + */ + virtual CHIP_ERROR SafeReadValue(const ConcreteAttributePath & aPath, MutableByteSpan & aValue) = 0; +}; + +/** + * Instance getter for the global SafeAttributePersistenceProvider. + * + * Callers have to externally synchronize usage of this function. + * + * @return The global SafeAttributePersistenceProvider. This must never be null. + */ +SafeAttributePersistenceProvider * GetSafeAttributePersistenceProvider(); + +/** + * Instance setter for the global SafeAttributePersistenceProvider. + * + * Callers have to externally synchronize usage of this function. + * + * If the `provider` is nullptr, the value is not changed. + * + * @param[in] aProvider the SafeAttributePersistenceProvider implementation to use. + */ +void SetSafeAttributePersistenceProvider(SafeAttributePersistenceProvider * aProvider); + +} // namespace app +} // namespace chip diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index f4ec6a46ec7581..d2e56f172627dc 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -17,8 +17,8 @@ */ #include -#include #include +#include #include #include #include @@ -60,7 +60,7 @@ void Instance::LoadPersistentAttributes() { // Load Current Mode uint8_t tempCurrentMode; - CHIP_ERROR err = GetAttributePersistenceProvider()->ReadScalarValue( + CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id), tempCurrentMode); if (err == CHIP_NO_ERROR) { @@ -83,7 +83,7 @@ void Instance::LoadPersistentAttributes() // Load Start-Up Mode DataModel::Nullable tempStartUpMode; - err = GetAttributePersistenceProvider()->ReadScalarValue( + err = GetSafeAttributePersistenceProvider()->ReadScalarValue( ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id), tempStartUpMode); if (err == CHIP_NO_ERROR) { @@ -111,8 +111,8 @@ void Instance::LoadPersistentAttributes() // Load On Mode DataModel::Nullable tempOnMode; - err = GetAttributePersistenceProvider()->ReadScalarValue(ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id), - tempOnMode); + err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id), tempOnMode); if (err == CHIP_NO_ERROR) { Status status = UpdateOnMode(tempOnMode); @@ -398,7 +398,7 @@ Status Instance::UpdateCurrentMode(uint8_t aNewMode) { // Write new value to persistent storage. ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id); - GetAttributePersistenceProvider()->WriteScalarValue(path, mCurrentMode); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mCurrentMode); MatterReportingAttributeChangeCallback(path); } return Protocols::InteractionModel::Status::Success; @@ -419,7 +419,7 @@ Status Instance::UpdateStartUpMode(DataModel::Nullable aNewStartUpMode) { // Write new value to persistent storage. ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id); - GetAttributePersistenceProvider()->WriteScalarValue(path, mStartUpMode); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mStartUpMode); MatterReportingAttributeChangeCallback(path); } return Protocols::InteractionModel::Status::Success; @@ -440,7 +440,7 @@ Status Instance::UpdateOnMode(DataModel::Nullable aNewOnMode) { // Write new value to persistent storage. ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id); - GetAttributePersistenceProvider()->WriteScalarValue(path, mOnMode); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mOnMode); MatterReportingAttributeChangeCallback(path); } return Protocols::InteractionModel::Status::Success; diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp index c5687467d00ca0..8b2f9ea467fc37 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -17,11 +17,11 @@ */ #include -#include #include #include #include #include +#include #include #include #include @@ -116,7 +116,7 @@ chip::Protocols::InteractionModel::Status Instance::UpdateLastChangedTime(DataMo mLastChangedTime = aNewLastChangedTime; if (mLastChangedTime != oldLastchangedTime) { - chip::app::GetAttributePersistenceProvider()->WriteScalarValue( + chip::app::GetSafeAttributePersistenceProvider()->WriteScalarValue( ConcreteAttributePath(mEndpointId, mClusterId, Attributes::LastChangedTime::Id), mLastChangedTime); MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::LastChangedTime::Id); } @@ -351,7 +351,7 @@ void Instance::HandleCommand(HandlerContext & handlerContext, FuncT func) void Instance::LoadPersistentAttributes() { - CHIP_ERROR err = chip::app::GetAttributePersistenceProvider()->ReadScalarValue( + CHIP_ERROR err = chip::app::GetSafeAttributePersistenceProvider()->ReadScalarValue( ConcreteAttributePath(mEndpointId, mClusterId, Attributes::LastChangedTime::Id), mLastChangedTime); if (err == CHIP_NO_ERROR) { diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 96847ace574100..a4c8b95d550f79 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -150,6 +150,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) // handler. SuccessOrExit(err = mAttributePersister.Init(mDeviceStorage)); SetAttributePersistenceProvider(&mAttributePersister); + SetSafeAttributePersistenceProvider(&mAttributePersister); { FabricTable::InitParams fabricTableInitParams; diff --git a/src/app/tests/TestAttributePersistenceProvider.cpp b/src/app/tests/TestAttributePersistenceProvider.cpp index 045ef77be69d9f..9c75715d14e03d 100644 --- a/src/app/tests/TestAttributePersistenceProvider.cpp +++ b/src/app/tests/TestAttributePersistenceProvider.cpp @@ -70,12 +70,12 @@ void TestStorageAndRetrivalByteSpans(nlTestSuite * inSuite, void * inContext) // Store ByteSpan of size 1 uint8_t valueArray[1] = { 0x42 }; ByteSpan value(valueArray); - err = persistenceProvider.WriteValue(TestConcretePath, value); + err = persistenceProvider.SafeWriteValue(TestConcretePath, value); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); uint8_t getArray[1]; MutableByteSpan valueReadBack(getArray); - err = persistenceProvider.ReadValue(TestConcretePath, 0x20, sizeof(getArray), valueReadBack); + err = persistenceProvider.SafeReadValue(TestConcretePath, valueReadBack); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, std::equal(valueReadBack.begin(), valueReadBack.end(), value.begin(), value.end())); @@ -198,21 +198,6 @@ void TestStorageAndRetrivalSignedScalarValues(nlTestSuite * inSuite, void * inCo persistenceProvider.Shutdown(); } -void TestGetNullFunctions(nlTestSuite * inSuite, void * inContext) -{ - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == uint8_t(0xff)); - - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == uint8_t(0xff)); - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == uint16_t(0xffff)); - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == uint32_t(0xffffffff)); - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == uint64_t(0xffffffffffffffff)); - - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == int8_t(0x80)); - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == int16_t(0x8000)); - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == int32_t(0x80000000)); - NL_TEST_ASSERT(inSuite, AttributePersistenceProvider::GetNullValueForNullableType() == int64_t(0x8000000000000000)); -} - /** * Tests the storage and retrival of data from the KVS of DataModel::Nullable types bool, uint8_t, uint16_t, uint32_t, uint64_t. */ @@ -332,26 +317,26 @@ void TestBufferTooSmallErrors(nlTestSuite * inSuite, void * inContext) // Store large data uint8_t valueArray[9] = { 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42 }; ByteSpan value(valueArray); - err = persistenceProvider.WriteValue(TestConcretePath, value); + err = persistenceProvider.SafeWriteValue(TestConcretePath, value); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); // Confirm the daya is there uint8_t getArray[9]; MutableByteSpan valueReadBack(getArray); - err = persistenceProvider.ReadValue(TestConcretePath, 0x20, sizeof(getArray), valueReadBack); + err = persistenceProvider.SafeReadValue(TestConcretePath, valueReadBack); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, std::equal(valueReadBack.begin(), valueReadBack.end(), value.begin(), value.end())); // Fail to get data as ByteSpace of size 0 uint8_t getArray0[0]; MutableByteSpan valueReadBackByteSpan0(getArray0, 0); - err = persistenceProvider.ReadValue(TestConcretePath, 0x20, 1, valueReadBackByteSpan0); + err = persistenceProvider.SafeReadValue(TestConcretePath, valueReadBackByteSpan0); NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_BUFFER_TOO_SMALL); // Fail to get data as ByteSpace of size > 0 but < required uint8_t getArray8[8]; MutableByteSpan valueReadBackByteSpan8(getArray8, sizeof(getArray8)); - err = persistenceProvider.ReadValue(TestConcretePath, 0x20, 1, valueReadBackByteSpan8); + err = persistenceProvider.SafeReadValue(TestConcretePath, valueReadBackByteSpan8); NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_BUFFER_TOO_SMALL); // Fail to get value as uint8_t @@ -385,7 +370,6 @@ const nlTest sTests[] = { NL_TEST_DEF("Storage and retrival of ByteSpans", TestStorageAndRetrivalByteSpans), NL_TEST_DEF("Storage and retrival of unsigned scalar values", TestStorageAndRetrivalScalarValues), NL_TEST_DEF("Storage and retrival of signed scalar values", TestStorageAndRetrivalSignedScalarValues), - NL_TEST_DEF("Check GetNullValueForNullableType return values", TestGetNullFunctions), NL_TEST_DEF("Storage and retrival of unsigned nullable scalar values", TestStorageAndRetrivalNullableScalarValues), NL_TEST_DEF("Storage and retrival of signed nullable scalar values", TestStorageAndRetrivalSignedNullableScalarValues), NL_TEST_DEF("Small buffer errors", TestBufferTooSmallErrors), diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index eb873bdc02b8dc..788723a2162bf5 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -1225,9 +1225,8 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage, Optional { VerifyOrDie(attrStorage && "Attribute persistence needs a persistence provider"); MutableByteSpan bytes(attrData); - CHIP_ERROR err = - attrStorage->ReadValue(app::ConcreteAttributePath(de->endpoint, cluster->clusterId, am->attributeId), - am->attributeType, am->size, bytes); + CHIP_ERROR err = attrStorage->ReadValue( + app::ConcreteAttributePath(de->endpoint, cluster->clusterId, am->attributeId), am, bytes); if (err == CHIP_NO_ERROR) { ptr = attrData; diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 9adc8fdf287353..65cd42c1a70063 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -170,6 +170,14 @@ class DefaultStorageKeyAllocator return StorageKeyName::Formatted("g/a/%x/%" PRIx32 "/%" PRIx32, endpointId, clusterId, attributeId); } + // Returns the key for Safely stored attributes. + static StorageKeyName SafeAttributeValue(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId) + { + // Needs at most 26 chars: 6 for "s/a///", 4 for the endpoint id, 8 each + // for the cluster and attribute ids. + return StorageKeyName::Formatted("g/sa/%x/%" PRIx32 "/%" PRIx32, endpointId, clusterId, attributeId); + } + // TODO: Should store fabric-specific parts of the binding list under keys // starting with "f/%x/". static StorageKeyName BindingTable() { return StorageKeyName::FromConst("g/bt"); } From bd3cc6ea0e47c7894cb97b9765b76309ea235ff6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 28 Jul 2023 16:09:14 +0200 Subject: [PATCH 069/159] Fix note message from gcc about uninitialized member (#28366) After change to c++17, on Tizen, we've got a note message from gcc about uninitialized member of ChipError class in a lambda function. This is a false positive report, but by initializing CHIP_ERROR variable we can get rid of it and get a clean build once again. --- .../clusters/access-control-server/access-control-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 3d73bd69b37589..81e3f5f1b92157 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -177,7 +177,7 @@ CHIP_ERROR AccessControlAttribute::ReadAcl(AttributeValueEncoder & aEncoder) { auto fabric = info.GetFabricIndex(); ReturnErrorOnFailure(GetAccessControl().Entries(fabric, iterator)); - CHIP_ERROR err; + CHIP_ERROR err = CHIP_NO_ERROR; while ((err = iterator.Next(entry)) == CHIP_NO_ERROR) { ReturnErrorOnFailure(encoder.Encode(encodableEntry)); From 471f09839ffe567d8c515a59c51410f4bceb6df5 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 28 Jul 2023 19:52:59 +0530 Subject: [PATCH 070/159] Dockerfile: Update esp-idf to v5.1 and remove few pinned package version (#28333) * [ESP32] Update docker image to use esp-idf v5.1 * Dockerfile: Remove few pinned versions from packages Removing the pinned versions for packages for below platforms - efr32: ccache - nrf: device-tree-compiler - openiotsdk: wget - telink: ccache, device-tree-compiler * Dockerfile: Remove pinned versions for few packages - efr32: gcc-arm-none-eabi, binutils-arm-none-eabi - telink: gcc-multilib, g++-multilib, libsdl2-dev * Docker: Update the version --- integrations/docker/images/base/chip-build/version | 2 +- .../docker/images/stage-2/chip-build-efr32/Dockerfile | 6 +++--- .../docker/images/stage-2/chip-build-esp32/Dockerfile | 2 +- .../images/stage-2/chip-build-nrf-platform/Dockerfile | 2 +- .../images/stage-2/chip-build-openiotsdk/Dockerfile | 2 +- .../docker/images/stage-2/chip-build-telink/Dockerfile | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 2758ff7463d15a..6b5e738e874668 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -1 : Moving to GHCR +2 : Update esp-idf to v5.1 and remove few pinned package version diff --git a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile index 511bfba3022db6..1946a0e6073717 100644 --- a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile @@ -6,12 +6,12 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - gcc-arm-none-eabi=15:9-2019-q4-0ubuntu1 \ - binutils-arm-none-eabi=2.34-4ubuntu1+13ubuntu1 \ + gcc-arm-none-eabi \ + binutils-arm-none-eabi \ git-lfs \ openjdk-17-jdk \ python3-sphinx \ - ccache=3.7.7-1 \ + ccache \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile index 71ce49fe5e84ba..65f4eaf4a5a572 100644 --- a/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile @@ -11,7 +11,7 @@ RUN set -x \ && : # last line RUN set -x \ - && git clone --recursive -b v4.4.4 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ + && git clone --recursive -b v5.1 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} diff --git a/integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile index 2d0e0aa9a80fb7..b01028f4708310 100644 --- a/integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile @@ -39,7 +39,7 @@ FROM ghcr.io/project-chip/chip-build:${VERSION} # Tools for building, flashing and accessing device logs RUN set -x \ && apt-get update \ - && apt-get install --no-install-recommends -fy device-tree-compiler=1.5.1-1 \ + && apt-get install --no-install-recommends -fy device-tree-compiler \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile b/integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile index b61d8860b3b18a..b1a56350a01d00 100644 --- a/integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile @@ -5,7 +5,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/stage-2/chip-build-telink/Dockerfile b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile index 88ac1d10828ccc..8f564c73d97206 100644 --- a/integrations/docker/images/stage-2/chip-build-telink/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile @@ -52,12 +52,12 @@ ENV ZEPHYR_SDK_INSTALL_DIR=/opt/telink/zephyr-sdk-0.16.1 RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - ccache=3.7.7-1 \ + ccache \ dfu-util=0.9-1 \ - device-tree-compiler=1.5.1-1 \ - gcc-multilib=4:9.3.0-1ubuntu2 \ - g++-multilib=4:9.3.0-1ubuntu2 \ - libsdl2-dev=2.0.10+dfsg1-3 \ + device-tree-compiler \ + gcc-multilib \ + g++-multilib \ + libsdl2-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && python3 -m pip install -U --no-cache-dir \ From f4f9bfbb2d2efaefdab6ac6cb896761aa6dd6fb5 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 28 Jul 2023 10:36:27 -0400 Subject: [PATCH 071/159] Set up a separate PICS for event list enabling (and hoping to default thist to false until we have event list finalized) (#28275) * Add pics to all EventList reads * Update AttributeList validation based on event list enabled pics * Define the pics * zap regen * Restyle * Update ci-pics-values * Enable PICS event list to pass CI. Separate PR to disable the pics and fix our example apps * zap regen --------- Co-authored-by: Andrei Litvin --- .../tests/suites/TestBasicInformation.yaml | 34 + src/app/tests/suites/certification/PICS.yaml | 5 + .../certification/Test_TC_ACFREMON_1_1.yaml | 11 + .../suites/certification/Test_TC_ACL_1_1.yaml | 13 +- .../suites/certification/Test_TC_ACT_1_1.yaml | 10 + .../certification/Test_TC_AIRQUAL_1_1.yaml | 11 + .../certification/Test_TC_ALOGIN_1_12.yaml | 11 + .../certification/Test_TC_APBSC_1_10.yaml | 11 + .../Test_TC_APPLAUNCHER_1_3.yaml | 11 + .../Test_TC_AUDIOOUTPUT_1_8.yaml | 11 + .../certification/Test_TC_BIND_1_1.yaml | 12 +- .../certification/Test_TC_BINFO_1_1.yaml | 43 +- .../certification/Test_TC_BOOL_1_1.yaml | 14 +- .../certification/Test_TC_BRBINFO_1_1.yaml | 6 +- .../suites/certification/Test_TC_CC_1_1.yaml | 11 + .../certification/Test_TC_CDOCONC_1_1.yaml | 13 +- .../certification/Test_TC_CGEN_1_1.yaml | 11 + .../certification/Test_TC_CHANNEL_1_6.yaml | 11 + .../certification/Test_TC_CMOCONC_1_1.yaml | 13 +- .../certification/Test_TC_CNET_1_3.yaml | 11 +- .../Test_TC_CONTENTLAUNCHER_1_11.yaml | 11 + .../certification/Test_TC_DESC_1_1.yaml | 12 +- .../certification/Test_TC_DGETH_1_1.yaml | 11 +- .../certification/Test_TC_DGGEN_1_1.yaml | 19 +- .../certification/Test_TC_DGSW_1_1.yaml | 15 +- .../certification/Test_TC_DGTHREAD_1_1.yaml | 41 +- .../certification/Test_TC_DGWIFI_1_1.yaml | 20 +- .../certification/Test_TC_DLOG_1_1.yaml | 12 +- .../certification/Test_TC_DRLK_1_1.yaml | 15 +- .../suites/certification/Test_TC_FAN_1_1.yaml | 10 + .../certification/Test_TC_FLABEL_1_1.yaml | 12 +- .../certification/Test_TC_FLDCONC_1_1.yaml | 13 +- .../suites/certification/Test_TC_FLW_1_1.yaml | 11 +- .../suites/certification/Test_TC_G_1_1.yaml | 11 + .../certification/Test_TC_HEPAFREMON_1_1.yaml | 11 + .../certification/Test_TC_ICDM_1_1.yaml | 11 + .../suites/certification/Test_TC_ILL_1_1.yaml | 10 + .../suites/certification/Test_TC_I_1_1.yaml | 10 + .../Test_TC_KEYPADINPUT_1_2.yaml | 11 + .../certification/Test_TC_LCFG_1_1.yaml | 11 + .../certification/Test_TC_LOWPOWER_1_1.yaml | 11 + .../certification/Test_TC_LTIME_1_2.yaml | 13 +- .../certification/Test_TC_LUNIT_1_2.yaml | 13 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 11 + .../certification/Test_TC_MEDIAINPUT_1_4.yaml | 11 + .../Test_TC_MEDIAPLAYBACK_1_7.yaml | 11 + .../suites/certification/Test_TC_MOD_1_1.yaml | 11 + .../certification/Test_TC_NDOCONC_1_1.yaml | 13 +- .../suites/certification/Test_TC_OCC_1_1.yaml | 11 + .../suites/certification/Test_TC_OO_1_1.yaml | 10 + .../certification/Test_TC_OPCREDS_1_2.yaml | 26 +- .../certification/Test_TC_OPSTATE_1_1.yaml | 13 +- .../certification/Test_TC_OZCONC_1_1.yaml | 13 +- .../suites/certification/Test_TC_PCC_1_1.yaml | 54 +- .../certification/Test_TC_PMHCONC_1_1.yaml | 13 +- .../certification/Test_TC_PMICONC_1_1.yaml | 13 +- .../certification/Test_TC_PMKCONC_1_1.yaml | 13 +- .../suites/certification/Test_TC_PRS_1_1.yaml | 11 +- .../certification/Test_TC_PSCFG_1_1.yaml | 10 + .../suites/certification/Test_TC_PS_1_1.yaml | 18 +- .../suites/certification/Test_TC_RH_1_1.yaml | 10 + .../certification/Test_TC_RNCONC_1_1.yaml | 13 +- .../certification/Test_TC_RVCCLEANM_1_1.yaml | 12 +- .../certification/Test_TC_RVCOPSTATE_1_1.yaml | 15 +- .../certification/Test_TC_RVCRUNM_1_1.yaml | 12 +- .../certification/Test_TC_SMOKECO_1_1.yaml | 13 +- .../certification/Test_TC_SWTCH_1_1.yaml | 35 +- .../suites/certification/Test_TC_S_1_1.yaml | 24 +- .../certification/Test_TC_TGTNAV_1_9.yaml | 11 + .../certification/Test_TC_TIMESYNC_1_1.yaml | 19 +- .../suites/certification/Test_TC_TMP_1_1.yaml | 10 + .../certification/Test_TC_TSTAT_1_1.yaml | 10 + .../certification/Test_TC_TSUIC_1_1.yaml | 10 + .../certification/Test_TC_TVOCCONC_1_1.yaml | 13 +- .../certification/Test_TC_ULABEL_1_1.yaml | 12 +- .../certification/Test_TC_WAKEONLAN_1_5.yaml | 11 + .../certification/Test_TC_WNCV_1_1.yaml | 13 +- .../tests/suites/certification/ci-pics-values | 1 + .../chip-tool/zap-generated/test/Commands.h | 6226 ++++++++----- .../zap-generated/test/Commands.h | 8123 +++++++++++------ 80 files changed, 10529 insertions(+), 4913 deletions(-) diff --git a/src/app/tests/suites/TestBasicInformation.yaml b/src/app/tests/suites/TestBasicInformation.yaml index 274066fac7b429..9ecac058316cd5 100644 --- a/src/app/tests/suites/TestBasicInformation.yaml +++ b/src/app/tests/suites/TestBasicInformation.yaml @@ -53,6 +53,7 @@ tests: value: "XX" - label: "Read AttributeList value" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -85,6 +86,39 @@ tests: 0xFFFD, # ClusterRevision ] + - label: "Read AttributeList value" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + value: [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 18, + 19, + 20, + 0xFFF8, # GeneratedCommandList + 0xFFF9, # AcceptedCommandList + 0xFFFB, # AttributeList + 0xFFFC, # FeatureMap + 0xFFFD, # ClusterRevision + ] + - label: "Read NodeLabel" command: "readAttribute" attribute: "NodeLabel" diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index d42e181b430c28..dce34aca81dbcd 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -27,6 +27,11 @@ PICS: - label: "Run steps in SDK and CI only" id: PICS_SDK_CI_ONLY + - label: + "EventList attribute enabled (default to false while EventList is + provisional)" + id: PICS_EVENT_LIST_ENABLED + # # Base Details # diff --git a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml index 183a3569dc265e..6fc09312d09a22 100644 --- a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml @@ -82,6 +82,7 @@ tests: hasMasksSet: [0x3] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -89,6 +90,15 @@ tests: type: list contains: [2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList" @@ -112,6 +122,7 @@ tests: contains: [3] - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml index bc6cc3a9834b06..58cc1a6c7aea87 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList attribute from DUT" - PICS: ACL.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && ACL.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +58,15 @@ tests: type: list contains: [0, 2, 3, 4, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList attribute from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && ACL.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads optional attribute (Extension) in AttributeList" PICS: ACL.S.A0001 && ACL.S.Afffb command: "readAttribute" @@ -108,7 +117,7 @@ tests: value: "y" - label: "Step 5a: TH reads EventList attribute from DUT" - PICS: ACL.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && ACL.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml index 6a0fcf745059f0..2f423f5f58a821 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(SetupURL) in AttributeList" PICS: ACT.S.A0002 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml index 463bd75bfae296..bf8419269d26a5 100644 --- a/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml @@ -94,6 +94,7 @@ tests: hasMasksSet: [0x8] - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -101,7 +102,17 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml index 295b0a8371977a..b60b6d484f7ce0 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml @@ -50,6 +50,7 @@ tests: type: bitmap32 - label: "Step 3: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -57,6 +58,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -74,6 +84,7 @@ tests: contains: [1] - label: "Step 6: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml index b490497e805ad3..7c79ec9d5a8920 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml @@ -50,6 +50,7 @@ tests: type: bitmap32 - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +59,15 @@ tests: contains: [2, 4, 5, 6, 7, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(VendorName) in AttributeList" PICS: APBSC.S.A0000 command: "readAttribute" @@ -102,6 +112,7 @@ tests: type: list - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml index 18948691f60df2..f1198214bb2ab8 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml @@ -60,6 +60,7 @@ tests: type: bitmap32 - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -67,6 +68,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(CatalogList) in AttributeList" PICS: APPLAUNCHER.S.A0000 @@ -103,6 +113,7 @@ tests: contains: [3] - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml index 964503875f0195..6493ece836f96e 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml @@ -60,6 +60,7 @@ tests: hasMasksClear: [0x2] - label: "Step 3: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -67,6 +68,15 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -84,6 +94,7 @@ tests: type: list - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml index 5b93bdd7edbc6d..c2e06f988f0ad1 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: BIND.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && BIND.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +58,16 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && BIND.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml index e037ebfcf6e9e1..dde6ab9bb90979 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml @@ -53,7 +53,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: BINFO.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -81,6 +81,35 @@ tests: 65533, ] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 19, + 65528, + 65529, + + 65531, + 65532, + 65533, + ] + - label: "Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList" @@ -217,8 +246,8 @@ tests: - label: "Step 5a: TH1 reads EventList from DUT" PICS: - " BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && - !BINFO.S.A0011 " + "PICS_EVENT_LIST_ENABLED && BINFO.S.Afffa && !BINFO.S.E00 && + !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 " command: "readAttribute" attribute: "EventList" response: @@ -227,7 +256,7 @@ tests: type: list - label: "Step 5b: Read BINFO.S.E00(StartUp) event in EventList" - PICS: BINFO.S.E00 && BINFO.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.E00 && BINFO.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -236,7 +265,7 @@ tests: contains: [0] - label: "Step 5c: Read BINFO.S.E01(ShutDown) event in EventList" - PICS: BINFO.S.E01 && BINFO.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.E01 && BINFO.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -245,7 +274,7 @@ tests: contains: [1] - label: "Step 5d: Read BINFO.S.E02(Leave) event in EventList" - PICS: BINFO.S.E02 && BINFO.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.E02 && BINFO.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -254,7 +283,7 @@ tests: contains: [2] - label: "Step 5e: Read (ReachableChanged) event in EventList" - PICS: BINFO.S.A0011 && BINFO.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.A0011 && BINFO.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index 3336f2408e7a9f..3cb68be05967b2 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -72,7 +82,7 @@ tests: type: list - label: "Step 7: Read the global attribute: EventList" - PICS: BOOL.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && BOOL.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -81,7 +91,7 @@ tests: type: list - label: "Step 7: Read the global attribute: EventList" - PICS: " !BOOL.S.E00 " + PICS: "PICS_EVENT_LIST_ENABLED && !BOOL.S.E00 " command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 92ee936d6d04ea..1d08f4e1f942fe 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -198,7 +198,7 @@ tests: contains: [18] - label: "Step 5a: TH reads optional event(StartUp) in EventList" - PICS: BRBINFO.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && BRBINFO.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -207,7 +207,7 @@ tests: contains: [0] - label: "Step 5b: TH reads optional attribute(ShutDown) in EventList" - PICS: BRBINFO.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && BRBINFO.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -216,7 +216,7 @@ tests: contains: [1] - label: "Step 5c: TH reads optional attribute(Leave) in EventList" - PICS: BRBINFO.S.E02 + PICS: PICS_EVENT_LIST_ENABLED && BRBINFO.S.E02 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index a92d3e8b920b65..b297d4a4b1fc89 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -100,6 +100,7 @@ tests: hasMasksSet: [0x10] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -119,6 +120,15 @@ tests: 65533, ] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [8, 15, 16385, 16394, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(CurrentHue) in AttributeList" PICS: CC.S.A0000 command: "readAttribute" @@ -609,6 +619,7 @@ tests: contains: [16400] - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml index 56a596c6807e5c..807729d36aa952 100644 --- a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: CDOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml index 8b390bb27b06cf..983b77c6b33a4f 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -56,7 +57,17 @@ tests: contains: [0, 1, 2, 3, 4, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml index 44fe0635ad2084..a89062e3f6fdeb 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml @@ -72,6 +72,7 @@ tests: hasMasksSet: [0x2] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -79,6 +80,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(ChannelList): AttributeList" PICS: CHANNEL.S.A0000 command: "readAttribute" @@ -159,6 +169,7 @@ tests: contains: [1] - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml index 903e06e54c9ed0..725034a1575c82 100644 --- a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: CMOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml index dd367838132241..390d9f6f159064 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml @@ -74,7 +74,7 @@ tests: value: 4 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: CNET.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && CNET.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -82,6 +82,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && CNET.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true" diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml index 83d1b32d3453e0..17ed1badddc10e 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml @@ -73,6 +73,7 @@ tests: hasMasksSet: [0x2] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -80,6 +81,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(AcceptHeader): AttributeList" PICS: CONTENTLAUNCHER.S.A0000 command: "readAttribute" @@ -131,6 +141,7 @@ tests: contains: [2] - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index b9915d5645ac7a..3923c8291cf4d8 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -51,7 +51,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: DESC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && DESC.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -59,6 +59,16 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml index 5471c6dc125c74..ace91845fac089 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml @@ -71,7 +71,7 @@ tests: hasMasksSet: [0x2] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: DGETH.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -79,6 +79,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads optional attribute(PHYRate) in AttributeList" PICS: DGETH.S.A0000 && DGETH.S.Afffb command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml index 34afce0b702232..32e077de34c9d9 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml @@ -51,7 +51,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: DGGEN.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -59,6 +59,15 @@ tests: type: list contains: [0, 1, 8, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 8, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read optional attribute(UpTime) in AttributeList" PICS: DGGEN.S.A0002 && DGGEN.S.Afffb command: "readAttribute" @@ -165,7 +174,7 @@ tests: value: "y" - label: "Step 5a: Read the global attribute: EventList" - PICS: DGGEN.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -174,7 +183,7 @@ tests: contains: [3] - label: "Step 5b: Read optional event(HardwareFaultChange) in EventList" - PICS: DGGEN.S.Afffa && DGGEN.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -183,7 +192,7 @@ tests: contains: [0] - label: "Step 5c: Read optional event(RadioFaultChange) in EventList" - PICS: DGGEN.S.Afffa && DGGEN.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -192,7 +201,7 @@ tests: contains: [1] - label: "Step 5d: Read optional event(NetworkFaultChange) in EventList" - PICS: DGGEN.S.Afffa && DGGEN.S.E02 + PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E02 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml index f67ce21c7d8233..b8057505222a4e 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml @@ -62,7 +62,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: DGSW.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -70,6 +70,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList" PICS: DGSW.S.A0000 && DGSW.S.Afffb @@ -154,7 +163,7 @@ tests: value: "y" - label: "Step 5a: TH reads EventList from DUT" - PICS: DGSW.S.E00 && DGSW.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && DGSW.S.E00 && DGSW.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -163,7 +172,7 @@ tests: contains: [0] - label: "Step 5b: TH reads EventList from DUT" - PICS: " !DGSW.S.E00 && DGSW.S.Afffa " + PICS: "PICS_EVENT_LIST_ENABLED && !DGSW.S.E00 && DGSW.S.Afffa " command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml index 6749582c981195..1348b752bf9525 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml @@ -96,6 +96,7 @@ tests: hasMasksSet: [0x8] - label: "Step 4a: TH reads mandatory attributes in AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -128,6 +129,40 @@ tests: 65533, ] + - label: "Step 4a: TH reads mandatory attributes in AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0, + 1, + 2, + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 59, + 60, + 61, + 62, + 65528, + 65529, + + 65531, + 65532, + 65533, + ] + - label: "Step 4b: TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList" @@ -229,7 +264,7 @@ tests: contains: [58] - label: "Step 5a: TH reads EventList from DUT" - PICS: " !DGTHREAD.S.E00 && !DGTHREAD.S.E01 " + PICS: "PICS_EVENT_LIST_ENABLED && !DGTHREAD.S.E00 && !DGTHREAD.S.E01 " command: "readAttribute" attribute: "EventList" response: @@ -239,7 +274,7 @@ tests: - label: "Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList" - PICS: DGTHREAD.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -250,7 +285,7 @@ tests: - label: "Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList" - PICS: DGTHREAD.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E01 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml index 494794fef7d368..c37875850572fd 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml @@ -71,6 +71,7 @@ tests: hasMasksSet: [0x2] - label: "Step 4a: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -79,6 +80,15 @@ tests: contains: [0, 1, 2, 3, 4, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT" @@ -141,7 +151,9 @@ tests: type: list - label: "Step 7a: TH reads EventList from DUT" - PICS: " !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 " + PICS: + "PICS_EVENT_LIST_ENABLED && !DGWIFI.S.E00 && !DGWIFI.S.E01 && + !DGWIFI.S.E02 " command: "readAttribute" attribute: "EventList" response: @@ -152,7 +164,7 @@ tests: - label: "Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT" - PICS: DGWIFI.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && DGWIFI.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -163,7 +175,7 @@ tests: - label: "Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT" - PICS: DGWIFI.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && DGWIFI.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -174,7 +186,7 @@ tests: - label: "Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT" - PICS: DGWIFI.S.E02 + PICS: PICS_EVENT_LIST_ENABLED && DGWIFI.S.E02 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml index a1e3b2061764c3..133c6814e080ff 100644 --- a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: TTH reads AttributeList from DUT" - PICS: DLOG.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +58,16 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 + - label: "Step 4a: TTH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml index ff4790b6d922e5..7145d874775947 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml @@ -174,6 +174,7 @@ tests: hasMasksSet: [0x1000] - label: "Step 4a: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -182,6 +183,15 @@ tests: contains: [0, 1, 2, 37, 38, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 37, 38, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList" @@ -387,6 +397,7 @@ tests: contains: [44] - label: "Step 5a: TH reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -396,7 +407,7 @@ tests: - label: "Step 5b: TH reads optional event(Door position sensor) in EventList" - PICS: DRLK.S.F05 + PICS: PICS_EVENT_LIST_ENABLED && DRLK.S.F05 command: "readAttribute" attribute: "EventList" response: @@ -407,7 +418,7 @@ tests: - label: "Step 5c: TH reads optional event(User commands and database) in EventList" - PICS: DRLK.S.F08 + PICS: PICS_EVENT_LIST_ENABLED && DRLK.S.F08 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml index 76d4d0595eff3e..f716fec421c876 100644 --- a/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml @@ -128,6 +128,7 @@ tests: hasMasksSet: [0x20] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -135,6 +136,15 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml index 8e4a50781abfd2..6e24e7be5a7ded 100644 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: FLABEL.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +58,16 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL diff --git a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml index 16a92f0730d51b..f1e8e72ae0ada9 100644 --- a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: FLDCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index 0af7010cb4c098..cc69776a03ee47 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: FLW.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && FLW.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +58,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && FLW.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(Tolerance) in AttributeList" PICS: FLW.S.A0003 && FLW.S.Afffb command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_G_1_1.yaml b/src/app/tests/suites/certification/Test_TC_G_1_1.yaml index 8f4927fe319b06..f0e103e587b49b 100644 --- a/src/app/tests/suites/certification/Test_TC_G_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_1_1.yaml @@ -58,6 +58,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -65,7 +66,17 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: TH reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml index e45f21f5278bfb..24f4d7054afeaa 100644 --- a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml @@ -82,6 +82,7 @@ tests: hasMasksSet: [0x3] - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -89,6 +90,15 @@ tests: type: list contains: [2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList" @@ -112,6 +122,7 @@ tests: contains: [3] - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml index 6b310d61551de5..599e081a2b1c28 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml @@ -58,6 +58,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -65,6 +66,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(RegisteredClients) in AttributeList" @@ -97,6 +107,7 @@ tests: contains: [5] - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index 4153ca6fdaa1c8..09237368e061f5 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(Tolerance) in AttributeList" PICS: ILL.S.A0003 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml index d00001f702c1f6..75d3facf4851c9 100644 --- a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml @@ -58,6 +58,7 @@ tests: # type: bitmap32 - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -65,6 +66,15 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml index cbf14c8a461171..a13c83a6d3da94 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml @@ -84,6 +84,7 @@ tests: hasMasksSet: [0x4] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -91,6 +92,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -108,6 +118,7 @@ tests: contains: [1] - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml index 2b5aa4b8d8cce9..9797c149fd9fbf 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,7 +56,17 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml index 14ee69fa2aa8bf..5aca08d6cb6097 100644 --- a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml @@ -50,6 +50,7 @@ tests: type: bitmap32 - label: "Step 3: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -57,6 +58,15 @@ tests: constraints: type: list + - label: "Step 3: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + value: [65528, 65529, 65531, 65532, 65533] + constraints: + type: list + - label: "Step 4: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -74,6 +84,7 @@ tests: type: list - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml index b6e06b98e90e28..28f870762b67c0 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml @@ -51,7 +51,7 @@ tests: maxValue: 1 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: LTIME.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -59,6 +59,15 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT" @@ -82,7 +91,7 @@ tests: contains: [2] - label: "Step 5: TH reads EventList from DUT" - PICS: LTIME.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && LTIME.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml index b906430646784d..d11482abdfd4c2 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml @@ -61,7 +61,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: LUNIT.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -69,6 +69,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList" @@ -81,7 +90,7 @@ tests: contains: [0] - label: "Step 5: TH reads EventList from DUT" - PICS: LUNIT.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 9bc2842bf2cf50..95ea6eca309ea9 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -82,6 +82,7 @@ tests: hasMasksSet: [0x4] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -89,6 +90,15 @@ tests: type: list contains: [0, 15, 17, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 15, 17, 65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList" @@ -201,6 +211,7 @@ tests: type: list - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml index 8df3594f747c1a..19f5ac35d7d12a 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml @@ -62,6 +62,7 @@ tests: hasMasksSet: [0x1] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -69,6 +70,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(InputList) in AttributeList" PICS: MEDIAINPUT.S.A0000 command: "readAttribute" @@ -105,6 +115,7 @@ tests: type: list - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml index a15e6810320921..18b9fde6dcd66e 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml @@ -73,6 +73,7 @@ tests: hasMasksSet: [0x2] - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -80,6 +81,15 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(StartTime) in AttributeList" PICS: MEDIAPLAYBACK.S.A0001 command: "readAttribute" @@ -236,6 +246,7 @@ tests: contains: [10] - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml index 7e6b449c4146cd..068b590b4085f9 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml @@ -68,6 +68,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -75,6 +76,15 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT" @@ -98,6 +108,7 @@ tests: contains: [5] - label: "Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml index 454e30003321df..af7a3a19f81f3d 100644 --- a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: NDOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index 07f0440ef06e7a..ae73ecbd1b2307 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,7 +56,17 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index f2a06ce86fba47..06585d355cb309 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -70,6 +70,7 @@ tests: hasMasksSet: [0x2] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -77,6 +78,15 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the feature dependent(OO.S.F00) attribute in AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml index e980178fe6c028..a7a2561a78707e 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml @@ -53,7 +53,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: OPCREDS.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -75,6 +75,30 @@ tests: 0x05, ] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0xFFFD, + 0xFFFC, + 0xFFFB, + + 0xFFF9, + 0xFFF8, + 0x00, + 0x01, + 0x02, + 0x03, + 0x04, + 0x05, + ] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml index 36c9508c5165bf..6e107e0eea976c 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -56,6 +57,15 @@ tests: contains: [0, 1, 3, 4, 5, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 3, 4, 5, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT" @@ -68,6 +78,7 @@ tests: contains: [2] - label: "Step 5a: TH reads from the DUT the EventList attribute." + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -78,7 +89,7 @@ tests: - label: "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList." - PICS: OPSTATE.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && OPSTATE.S.E01 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml index df054fc3f3d83f..ea9734d4ef9a4c 100644 --- a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: OZCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index 229e4bda655e05..485b7492ddd9d2 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -129,7 +129,7 @@ tests: hasMasksSet: [0x40] - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: PCC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -152,6 +152,16 @@ tests: 65533, ] + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && PCC.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [0, 1, 2, 17, 18, 19, 32, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT" @@ -389,10 +399,10 @@ tests: - label: "Step 5a: TH reads EventList from DUT" PICS: - " PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 - && !PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 - && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && !PCC.S.E0c && !PCC.S.E0d - && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 " + "PICS_EVENT_LIST_ENABLED && PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 + && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 + && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b + && !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 " command: "readAttribute" attribute: "EventList" response: @@ -403,7 +413,7 @@ tests: - label: "Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute." - PICS: PCC.S.E00 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E00 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -414,7 +424,7 @@ tests: - label: "Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute." - PICS: PCC.S.E01 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E01 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -425,7 +435,7 @@ tests: - label: "Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute." - PICS: PCC.S.E02 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E02 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -436,7 +446,7 @@ tests: - label: "Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute." - PICS: PCC.S.E03 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E03 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -447,7 +457,7 @@ tests: - label: "Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute." - PICS: PCC.S.E04 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E04 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -458,7 +468,7 @@ tests: - label: "Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute." - PICS: PCC.S.E05 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E05 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -469,7 +479,7 @@ tests: - label: "Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute." - PICS: PCC.S.E06 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E06 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -480,7 +490,7 @@ tests: - label: "Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute." - PICS: PCC.S.E07 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E07 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -491,7 +501,7 @@ tests: - label: "Step 5j: TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute." - PICS: PCC.S.E08 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E08 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -502,7 +512,7 @@ tests: - label: "Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute." - PICS: PCC.S.E09 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E09 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -513,7 +523,7 @@ tests: - label: "Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute." - PICS: PCC.S.E0a && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0a && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -524,7 +534,7 @@ tests: - label: "Step 5m: TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute." - PICS: PCC.S.E0b && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0b && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -535,7 +545,7 @@ tests: - label: "Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute." - PICS: PCC.S.E0c && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0c && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -546,7 +556,7 @@ tests: - label: "Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute." - PICS: PCC.S.E0d && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0d && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -557,7 +567,7 @@ tests: - label: "Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute." - PICS: PCC.S.E0e && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0e && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -568,7 +578,7 @@ tests: - label: "Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute." - PICS: PCC.S.E0f && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0f && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -579,7 +589,7 @@ tests: - label: "Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute." - PICS: PCC.S.E10 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E10 && PCC.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml index 8f3f0208181f5a..11d21ffafccd24 100644 --- a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PMHCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml index 340c43e9b8ba64..1f453a6665ff74 100644 --- a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PMICONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml index 32c91718106373..cb6e896865502e 100644 --- a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PMKCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index eed8b3b7060a0f..402ab1e2e773c2 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -61,7 +61,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4a: Read the global mandatory attribute: AttributeList" - PICS: PRS.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && PRS.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -69,6 +69,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global mandatory attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && PRS.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(ScaledValue) in AttributeList" PICS: PRS.S.A0010 && PRS.S.Afffb diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml index 3f4568e5b04b43..97fa3f103c57b9 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4: TH reads the AttributeList attribute from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: TH reads the AcceptedCommandList attribute from the DUT" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index 77149171b3f08b..a4173700ab36e5 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -93,6 +93,7 @@ tests: hasMasksSet: [0x2, 0x8] - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -101,6 +102,15 @@ tests: contains: [0, 1, 2, 0x1f, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 0x1f, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList" @@ -162,7 +172,7 @@ tests: type: list - label: "Step 7a: Read the global attribute: EventList" - PICS: " !PS.S.E00 && !PS.S.E01 && !PS.S.E02 " + PICS: "PICS_EVENT_LIST_ENABLED && !PS.S.E00 && !PS.S.E01 && !PS.S.E02 " command: "readAttribute" attribute: "EventList" response: @@ -171,7 +181,7 @@ tests: type: list - label: "Step 7b: Read PS.S.E00(WiredFaultChange) event in EventList" - PICS: PS.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && PS.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -180,7 +190,7 @@ tests: contains: [0] - label: "Step 7c: Read PS.S.E01(BatFaultChange) event in EventList" - PICS: PS.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && PS.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -189,7 +199,7 @@ tests: contains: [1] - label: "Step 7d: Read PS.S.E02(BatChargeFaultChange) event in EventList" - PICS: PS.S.E02 + PICS: PICS_EVENT_LIST_ENABLED && PS.S.E02 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 7ff19e675ebc89..59d78f962099e6 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(Tolerance) in AttributeList" command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml index 60702f2b16cf51..ce361a6c946e16 100644 --- a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: RNCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml index ccc1f23c71d3eb..2120365090be5e 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml @@ -60,6 +60,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -67,6 +68,15 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT" @@ -101,7 +111,7 @@ tests: excludes: [3] - label: "Read the global attribute: EventList from the DUT" - PICS: RVCCLEANM.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RVCCLEANM.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml index d9f42eba8131fe..51b71ed89b691e 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: RVCOPSTATE.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -59,6 +59,15 @@ tests: contains: [0, 1, 3, 4, 5, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 3, 4, 5, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT" @@ -71,7 +80,7 @@ tests: contains: [2] - label: "Step 5a: TH reads from the DUT the EventList attribute." - PICS: RVCOPSTATE.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffa command: "readAttribute" attribute: "EventList" response: @@ -82,7 +91,7 @@ tests: - label: "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList." - PICS: RVCOPSTATE.S.E01 && RVCOPSTATE.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01 && RVCOPSTATE.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml index 928d4176f24911..9588d6434f7b31 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml @@ -60,6 +60,7 @@ tests: hasMasksSet: [0x1] - label: "TH reads the AttributeList attribute from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -67,6 +68,15 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "TH reads the AttributeList attribute from the DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT" @@ -101,7 +111,7 @@ tests: excludes: [3] - label: "Read the global attribute: EventList from the DUT" - PICS: RVCRUNM.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RVCRUNM.S.Afffa command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml index 9e19aa2e4228a5..c9762f148a7dc1 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml @@ -165,6 +165,7 @@ tests: contains: [12] - label: "TH reads from the DUT the EventList attribute" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -173,7 +174,7 @@ tests: contains: [2, 3, 4, 5, 10] - label: "TH reads from the DUT the EventList attribute(SmokeAlarm)" - PICS: SMOKECO.S.E00 + PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -182,7 +183,7 @@ tests: contains: [0] - label: "TH reads from the DUT the EventList attribute(COAlarm)" - PICS: SMOKECO.S.E01 + PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -191,7 +192,7 @@ tests: contains: [1] - label: "TH reads from the DUT the EventList attribute(AlarmMuted)" - PICS: SMOKECO.S.E06 + PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06 command: "readAttribute" attribute: "EventList" response: @@ -200,7 +201,7 @@ tests: contains: [6] - label: "TH reads from the DUT the EventList attribute(MuteEnded)" - PICS: SMOKECO.S.E07 + PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07 command: "readAttribute" attribute: "EventList" response: @@ -210,7 +211,7 @@ tests: - label: "TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)" - PICS: SMOKECO.S.E08 + PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08 command: "readAttribute" attribute: "EventList" response: @@ -220,7 +221,7 @@ tests: - label: "TH reads from the DUT the EventList attribute(InterconnectCOAlarm)" - PICS: SMOKECO.S.E09 + PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index b3951a3b5c85c1..f36c320453f30f 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -122,7 +122,7 @@ tests: contains: [2] - label: "Step 4b: Read the global attribute: AttributeList" - PICS: "!SWTCH.S.F04" + PICS: "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04" command: "readAttribute" attribute: "AttributeList" response: @@ -130,10 +130,19 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4b: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5a: Read the global attribute: EventList " PICS: - " !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && - !SWTCH.S.F04 " + "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F00 && !SWTCH.S.F01 && + !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 " command: "readAttribute" attribute: "EventList" response: @@ -142,7 +151,7 @@ tests: type: list - label: "Step 5b: Read EventList if SWTCH.S.F00(LS)" - PICS: SWTCH.S.F00 + PICS: PICS_EVENT_LIST_ENABLED && SWTCH.S.F00 command: "readAttribute" attribute: "EventList" response: @@ -151,7 +160,7 @@ tests: contains: [0] - label: "Step 5c: Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)" - PICS: SWTCH.S.F01 && !SWTCH.S.F02 + PICS: PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && !SWTCH.S.F02 command: "readAttribute" attribute: "EventList" response: @@ -162,7 +171,9 @@ tests: - label: "Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)" - PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 + PICS: + PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 + && !SWTCH.S.F04 command: "readAttribute" attribute: "EventList" response: @@ -173,7 +184,9 @@ tests: - label: "Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)" - PICS: SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04 + PICS: + PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 + && !SWTCH.S.F04 command: "readAttribute" attribute: "EventList" response: @@ -184,7 +197,9 @@ tests: - label: "Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " - PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04 + PICS: + PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 + && SWTCH.S.F04 command: "readAttribute" attribute: "EventList" response: @@ -195,7 +210,9 @@ tests: - label: "Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " - PICS: SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04 + PICS: + PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 + && SWTCH.S.F04 command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml index 2fdff088d49858..f35ea918bbd8a9 100644 --- a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml @@ -61,7 +61,7 @@ tests: type: bitmap32 - label: "Step 4a: Read AttributeList (global attribute 65531)" - PICS: S.S.A0005 + PICS: PICS_EVENT_LIST_ENABLED && S.S.A0005 command: "readAttribute" attribute: "AttributeList" response: @@ -85,8 +85,18 @@ tests: 65533, ] + - label: "Step 4a: Read AttributeList (global attribute 65531)" + PICS: "!PICS_EVENT_LIST_ENABLED && S.S.A0005" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [0, 1, 2, 3, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read AttributeList (global attribute 65531)" - PICS: (!S.S.A0005) + PICS: PICS_EVENT_LIST_ENABLED && (!S.S.A0005) command: "readAttribute" attribute: "AttributeList" response: @@ -109,7 +119,17 @@ tests: 65533, ] + - label: "Step 4b: Read AttributeList (global attribute 65531)" + PICS: "!PICS_EVENT_LIST_ENABLED && (!S.S.A0005)" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 6, 7, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read EventList (global attribute 65530)" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml index 7537ea4edb8bb0..636477d18707dd 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml @@ -50,6 +50,7 @@ tests: type: bitmap32 - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -57,6 +58,15 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + - label: "Step 3b: Read the optional attribute(CurrentTarget) in AttributeList" PICS: TGTNAV.S.A0001 @@ -84,6 +94,7 @@ tests: contains: [1] - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml index 7bdfdbc9b2d86b..89775774e07c39 100644 --- a/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml @@ -139,6 +139,7 @@ tests: ########################## # Mandatory entries - label: "TS4: Check for mandatory attributes in AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -155,6 +156,15 @@ tests: 0xFFFD, ] + # Optional + - label: "TS4: Check for mandatory attributes in AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + contains: [0x0000, 0x0001, 0xFFF8, 0xFFF9, 0xFFFB, 0xFFFC, 0xFFFD] + # Optional - label: "TS4: Check for optional attribute TimeSource in AttributeList" PICS: TIMESYNC.S.A0002 @@ -247,6 +257,7 @@ tests: ########################## # mandatory - label: "TS5: Check for mandatory events in EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -255,7 +266,7 @@ tests: # Feature TZ - label: "TS5: Check for TZ feature-based events in EventList" - PICS: TIMESYNC.S.F00 + PICS: PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00 command: "readAttribute" attribute: "EventList" response: @@ -263,7 +274,7 @@ tests: contains: [0x00, 0x01, 0x02] - label: "TS5: Check for TZ feature-based events not in EventList" - PICS: "!TIMESYNC.S.F00" + PICS: "PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F00" command: "readAttribute" attribute: "EventList" response: @@ -272,14 +283,14 @@ tests: # Feature TSC - label: "TS5: Check for TSC feature-based events in EventList" - PICS: TIMESYNC.S.F03 + PICS: PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03 command: "readAttribute" attribute: "EventList" response: constraints: contains: [0x04] - label: "TS5: Check for TSC feature-based events not in EventList" - PICS: "!TIMESYNC.S.F03" + PICS: "PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03" command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml index a1c51fee6ea683..6dddc6a8f78d5f 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute(Tolerance) in AttributeList" PICS: TMP.S.A0003 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 5e9b83c22e08c3..d43b6e8cf7cde1 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -117,6 +117,7 @@ tests: hasMasksSet: [0x20] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -124,6 +125,15 @@ tests: type: list contains: [0, 27, 28, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 27, 28, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index f6da6098719fea..0d5de8b817ae5a 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -48,6 +48,7 @@ tests: type: bitmap32 - label: "Step 4: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +56,15 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + - label: "Step 5: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml index 9e68e9a8b03819..4b27410e01e79f 100644 --- a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml @@ -188,12 +188,21 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "Step 4a: Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb" + response: + constraints: + type: list + contains: [9, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -308,7 +317,7 @@ tests: - label: "Step 5l: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: TVOCCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml index 3b49e75527b934..74de325fd20f8e 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml @@ -50,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: ULABEL.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -58,6 +58,16 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4b: Read the global attribute: AttributeList. 1.The list SHALL diff --git a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml index fe847f62ea2ddf..6f7a235bf0922b 100644 --- a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml @@ -50,6 +50,7 @@ tests: type: bitmap32 - label: "Step 3a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -57,6 +58,15 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65531, 65533] + - label: "Step 3a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65531, 65533] + - label: "Step 3b: Read the optional attribute(MACAddress) in AttributeList" PICS: WAKEONLAN.S.A0000 command: "readAttribute" @@ -83,6 +93,7 @@ tests: type: list - label: "Step 6: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 39ce76e6039753..4f4ec40afcb134 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -113,7 +113,7 @@ tests: - label: "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute" - PICS: WNCV.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb command: "readAttribute" attribute: "AttributeList" response: @@ -122,6 +122,16 @@ tests: contains: [0, 7, 10, 13, 23, 65528, 65529, 65530, 65531, 65532, 65533] + - label: + "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute" + PICS: "!PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 7, 10, 13, 23, 65528, 65529, 65531, 65532, 65533] + - label: "Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList" PICS: WNCV.S.Afffb && WNCV.S.A001a @@ -177,6 +187,7 @@ tests: contains: [12, 15] - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index e1ed9239dd0752..426f1a65956d06 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -58,6 +58,7 @@ DGSW.C.C00.Tx=1 PICS_USER_PROMPT=0 PICS_SKIP_SAMPLE_APP=0 PICS_SDK_CI_ONLY=1 +PICS_EVENT_LIST_ENABLED=1 # WindowCovering aka WNCV WNCV.S=1 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 94784a6ee76f92..7caa48359ca68f 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -2223,7 +2223,7 @@ class TestAccessControlClusterSuite : public TestCommand class Test_TC_ACL_1_1Suite : public TestCommand { public: - Test_TC_ACL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_1_1", 10, credsIssuerConfig) + Test_TC_ACL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_1_1", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2302,14 +2302,31 @@ class Test_TC_ACL_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2319,15 +2336,15 @@ class Test_TC_ACL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -2367,18 +2384,24 @@ class Test_TC_ACL_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads AttributeList attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: TH reads optional attribute (Extension) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: TH reads AttributeList attribute from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, + LogStep(5, "Step 4b: TH reads optional attribute (Extension) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001 && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -2393,14 +2416,14 @@ class Test_TC_ACL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Step 5a: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Step 5a: TH reads EventList attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::EventList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " @@ -2415,8 +2438,8 @@ class Test_TC_ACL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, + case 9: { + LogStep(9, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1. The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -2430,8 +2453,8 @@ class Test_TC_ACL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 9: { - LogStep(9, + case 10: { + LogStep(10, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -10143,7 +10166,7 @@ class Test_TC_AIRQUAL_1_1Suite : public TestCommand { public: Test_TC_AIRQUAL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AIRQUAL_1_1", 11, credsIssuerConfig) + TestCommand("Test_TC_AIRQUAL_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -10250,6 +10273,20 @@ class Test_TC_AIRQUAL_1_1Suite : public TestCommand } break; case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10261,7 +10298,7 @@ class Test_TC_AIRQUAL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10269,7 +10306,7 @@ class Test_TC_AIRQUAL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10341,21 +10378,29 @@ class Test_TC_AIRQUAL_1_1Suite : public TestCommand } case 7: { LogStep(7, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 5: TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::EventList::Id, true, + LogStep(8, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 6: Read the global attribute: AcceptedCommandList"); + LogStep(9, "Step 5: TH reads EventList attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::EventList::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 7: Read the global attribute: GeneratedCommandList"); + case 11: { + LogStep(11, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -10451,7 +10496,7 @@ class Test_TC_AIRQUAL_2_1Suite : public TestCommand class Test_TC_BOOL_1_1Suite : public TestCommand { public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 8, credsIssuerConfig) + Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -10522,6 +10567,20 @@ class Test_TC_BOOL_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10533,7 +10592,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10545,7 +10604,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10559,7 +10618,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10605,28 +10664,35 @@ class Test_TC_BOOL_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: Read the global attribute: AcceptedCommandList"); + LogStep(4, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Step 6: Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Step 6: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 7: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("BOOL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Step 7: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BOOL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::EventList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step 7: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip(" !BOOL.S.E00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Step 7: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !BOOL.S.E00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::EventList::Id, true, chip::NullOptional); } @@ -11093,19 +11159,19 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand } case 18: { LogStep(18, "Step 5a: TH reads optional event(StartUp) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } case 19: { LogStep(19, "Step 5b: TH reads optional attribute(ShutDown) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } case 20: { LogStep(20, "Step 5c: TH reads optional attribute(Leave) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } @@ -12110,7 +12176,7 @@ class Test_TC_BRBINFO_2_1Suite : public TestCommand class Test_TC_ACT_1_1Suite : public TestCommand { public: - Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 8, credsIssuerConfig) + Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12187,14 +12253,29 @@ class Test_TC_ACT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -12203,7 +12284,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 11)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -12249,17 +12330,24 @@ class Test_TC_ACT_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: Read the optional attribute(SetupURL) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: TH reads EventList attribute from DUT"); + LogStep(5, "Step 4b: Read the optional attribute(SetupURL) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Step 5: TH reads EventList attribute from DUT"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -12268,13 +12356,13 @@ class Test_TC_ACT_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Step 6: Read the global attribute: AcceptedCommandList"); + case 7: { + LogStep(7, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step 7: Read the global attribute: GeneratedCommandList"); + case 8: { + LogStep(8, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -12286,7 +12374,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand class Test_TC_BIND_1_1Suite : public TestCommand { public: - Test_TC_BIND_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_1_1", 8, credsIssuerConfig) + Test_TC_BIND_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12358,7 +12446,17 @@ class Test_TC_BIND_1_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -12372,6 +12470,10 @@ class Test_TC_BIND_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -12408,12 +12510,18 @@ class Test_TC_BIND_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("BIND.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BIND.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && BIND.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -12428,8 +12536,8 @@ class Test_TC_BIND_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -12443,8 +12551,8 @@ class Test_TC_BIND_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, + case 7: { + LogStep(7, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -12458,8 +12566,8 @@ class Test_TC_BIND_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -12481,7 +12589,7 @@ class Test_TC_BIND_1_1Suite : public TestCommand class Test_TC_CC_1_1Suite : public TestCommand { public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 78, credsIssuerConfig) + Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 79, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12605,7 +12713,15 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16394UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 10: @@ -12614,7 +12730,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 11: @@ -12623,7 +12739,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 12: @@ -12632,7 +12748,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 13: @@ -12641,7 +12757,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 14: @@ -12650,7 +12766,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 15: @@ -12659,7 +12775,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 16: @@ -12668,7 +12784,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; case 17: @@ -12677,7 +12793,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 18: @@ -12686,7 +12802,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; case 19: @@ -12695,7 +12811,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 20: @@ -12704,7 +12820,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; case 21: @@ -12713,7 +12829,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; case 22: @@ -12722,7 +12838,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); } break; case 23: @@ -12731,7 +12847,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); } break; case 24: @@ -12740,7 +12856,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); } break; case 25: @@ -12749,7 +12865,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; case 26: @@ -12758,7 +12874,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); } break; case 27: @@ -12767,7 +12883,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); } break; case 28: @@ -12776,7 +12892,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); } break; case 29: @@ -12785,7 +12901,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); } break; case 30: @@ -12794,7 +12910,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; case 31: @@ -12803,7 +12919,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); } break; case 32: @@ -12812,7 +12928,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); } break; case 33: @@ -12821,7 +12937,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); } break; case 34: @@ -12830,7 +12946,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); } break; case 35: @@ -12839,7 +12955,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); } break; case 36: @@ -12848,7 +12964,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); } break; case 37: @@ -12857,7 +12973,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); } break; case 38: @@ -12866,7 +12982,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); } break; case 39: @@ -12875,7 +12991,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); } break; case 40: @@ -12884,7 +13000,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); } break; case 41: @@ -12893,7 +13009,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); } break; case 42: @@ -12902,7 +13018,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); } break; case 43: @@ -12911,7 +13027,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); } break; case 44: @@ -12920,7 +13036,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); } break; case 45: @@ -12929,7 +13045,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 59UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); } break; case 46: @@ -12938,7 +13054,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 60UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 59UL)); } break; case 47: @@ -12947,7 +13063,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 60UL)); } break; case 48: @@ -12956,7 +13072,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } break; case 49: @@ -12965,7 +13081,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); } break; case 50: @@ -12974,7 +13090,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); } break; case 51: @@ -12983,7 +13099,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); } break; case 52: @@ -12992,7 +13108,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); } break; case 53: @@ -13001,7 +13117,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); } break; case 54: @@ -13010,7 +13126,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); } break; case 55: @@ -13019,7 +13135,7 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); } break; case 56: @@ -13028,10 +13144,19 @@ class Test_TC_CC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); } break; case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); + } + break; + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13043,7 +13168,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13052,7 +13177,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13061,7 +13186,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13070,7 +13195,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13079,7 +13204,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13088,7 +13213,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13097,7 +13222,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13106,7 +13231,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13115,7 +13240,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 66: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13124,7 +13249,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 67: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13133,7 +13258,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 68: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13142,7 +13267,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13151,7 +13276,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13160,7 +13285,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); } break; - case 71: + case 72: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13169,7 +13294,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; - case 72: + case 73: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13178,7 +13303,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); } break; - case 73: + case 74: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13187,7 +13312,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); } break; - case 74: + case 75: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13196,7 +13321,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); } break; - case 75: + case 76: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13205,7 +13330,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 75UL)); } break; - case 76: + case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13214,7 +13339,7 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 76UL)); } break; - case 77: + case 78: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -13292,418 +13417,426 @@ class Test_TC_CC_1_1Suite : public TestCommand } case 8: { LogStep(8, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4b: Read the optional attribute(CurrentHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4c: Read the optional attribute(CurrentSaturation) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 4b: Read the optional attribute(CurrentHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4d: Read the optional attribute(RemainingTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4c: Read the optional attribute(CurrentSaturation) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4e: Read the optional attribute(CurrentX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 4d: Read the optional attribute(RemainingTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 4f: Read the optional attribute(CurrentY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 4e: Read the optional attribute(CurrentX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4g: Read the optional attribute(DriftCompensation) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 4f: Read the optional attribute(CurrentY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4h: Read the optional attribute(CompensationText) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 4g: Read the optional attribute(DriftCompensation) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4i: Read the optional attribute(ColorTemperatureMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4h: Read the optional attribute(CompensationText) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 4j: Read the optional attribute(NumberOfPrimaries) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4i: Read the optional attribute(ColorTemperatureMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 4k: Read the optional attribute(Primary1X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "Step 4j: Read the optional attribute(NumberOfPrimaries) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Step 4l: Read the optional attribute(Primary1Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "Step 4k: Read the optional attribute(Primary1X) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Step 4m: Read the optional attribute(Primary1Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Step 4l: Read the optional attribute(Primary1Y) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Step 4n: Read the optional attribute(Primary2X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Step 4m: Read the optional attribute(Primary1Intensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "Step 4o: Read the optional attribute(Primary2Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "Step 4n: Read the optional attribute(Primary2X) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "Step 4p: Read the optional attribute(Primary2Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "Step 4o: Read the optional attribute(Primary2Y) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4q: Read the optional attribute(Primary3X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "Step 4p: Read the optional attribute(Primary2Intensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4r: Read the optional attribute(Primary3Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4q: Read the optional attribute(Primary3X) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 4s: Read the optional attribute(Primary3Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4r: Read the optional attribute(Primary3Y) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 4t: Read the optional attribute(Primary4X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 4s: Read the optional attribute(Primary3Intensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 4u: Read the optional attribute(Primary4Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 4t: Read the optional attribute(Primary4X) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 29: { - LogStep(29, "Step 4v: Read the optional attribute(Primary4Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(29, "Step 4u: Read the optional attribute(Primary4Y) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 30: { - LogStep(30, "Step 4w: Read the optional attribute(Primary5X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(30, "Step 4v: Read the optional attribute(Primary4Intensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 31: { - LogStep(31, "Step 4x: Read the optional attribute(Primary5Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(31, "Step 4w: Read the optional attribute(Primary5X) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 32: { - LogStep(32, "Step 4y: Read the optional attribute(Primary5Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(32, "Step 4x: Read the optional attribute(Primary5Y) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 33: { - LogStep(33, "Step 4z: Read the optional attribute(Primary6X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(33, "Step 4y: Read the optional attribute(Primary5Intensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 34: { - LogStep(34, "Step 4a1: Read the optional attribute(Primary6Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(34, "Step 4z: Read the optional attribute(Primary6X) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 35: { - LogStep(35, "Step 4a2: Read the optional attribute(Primary6Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "Step 4a1: Read the optional attribute(Primary6Y) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 36: { - LogStep(36, "Step 4a3: Read the optional attribute(WhitePointX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Step 4a2: Read the optional attribute(Primary6Intensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 37: { - LogStep(37, "Step 4a4: Read the optional attribute(WhitePointY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(37, "Step 4a3: Read the optional attribute(WhitePointX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 38: { - LogStep(38, "Step 4a5: Read the optional attribute(ColorPointRX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "Step 4a4: Read the optional attribute(WhitePointY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 39: { - LogStep(39, "Step 4a6: Read the optional attribute(ColorPointRY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Step 4a5: Read the optional attribute(ColorPointRX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 40: { - LogStep(40, "Step 4a7: Read the optional attribute(ColorPointRIntensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "Step 4a6: Read the optional attribute(ColorPointRY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 41: { - LogStep(41, "Step 4a8: Read the optional attribute(ColorPointGX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(41, "Step 4a7: Read the optional attribute(ColorPointRIntensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 42: { - LogStep(42, "Step 4a9: Read the optional attribute(ColorPointGY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(42, "Step 4a8: Read the optional attribute(ColorPointGX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 43: { - LogStep(43, "Step 4a10: Read the optional attribute(ColorPointGIntensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(43, "Step 4a9: Read the optional attribute(ColorPointGY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 44: { - LogStep(44, "Step 4a11: Read the optional attribute(ColorPointBX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(44, "Step 4a10: Read the optional attribute(ColorPointGIntensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 45: { - LogStep(45, "Step 4a12: Read the optional attribute(ColorPointBY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(45, "Step 4a11: Read the optional attribute(ColorPointBX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 46: { - LogStep(46, "Step 4a13: Read the optional attribute(ColorPointBIntensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(46, "Step 4a12: Read the optional attribute(ColorPointBY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 47: { - LogStep(47, "Step 4a14: Read the optional attribute(EnhancedCurrentHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(47, "Step 4a13: Read the optional attribute(ColorPointBIntensity) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 48: { - LogStep(48, "Step 4a15: Read the optional attribute(ColorLoopActive) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(48, "Step 4a14: Read the optional attribute(EnhancedCurrentHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 49: { - LogStep(49, "Step 4a16: Read the optional attribute(ColorLoopDirection) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(49, "Step 4a15: Read the optional attribute(ColorLoopActive) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 50: { - LogStep(50, "Step 4a17: Read the optional attribute(ColorLoopTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(50, "Step 4a16: Read the optional attribute(ColorLoopDirection) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 51: { - LogStep(51, "Step 4a18: Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(51, "Step 4a17: Read the optional attribute(ColorLoopTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 52: { - LogStep(52, "Step 4a19: Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(52, "Step 4a18: Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 53: { - LogStep(53, "Step 4a20: Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(53, "Step 4a19: Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 54: { - LogStep(54, "Step 4a21: Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(54, "Step 4a20: Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 55: { - LogStep(55, "Step 4a22: Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(55, "Step 4a21: Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 56: { - LogStep(56, "Step 4a23: Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(56, "Step 4a22: Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 57: { - LogStep(57, "Step 5: Read the global attribute: EventList"); + LogStep(57, "Step 4a23: Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 58: { + LogStep(58, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EventList::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "Step 6a: Read the optional command(MoveToHue) in AcceptedCommandList"); + case 59: { + LogStep(59, "Step 6a: Read the optional command(MoveToHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 59: { - LogStep(59, "Step 6b: Read the optional command(MoveHue) in AcceptedCommandList"); + case 60: { + LogStep(60, "Step 6b: Read the optional command(MoveHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "Step 6c: Read the optional command(StepHue) in AcceptedCommandList"); + case 61: { + LogStep(61, "Step 6c: Read the optional command(StepHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Step 6d: Read the optional command(MoveToSaturation) in AcceptedCommandList"); + case 62: { + LogStep(62, "Step 6d: Read the optional command(MoveToSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 62: { - LogStep(62, "Step 6e: Read the optional command(MoveSaturation) in AcceptedCommandList"); + case 63: { + LogStep(63, "Step 6e: Read the optional command(MoveSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 63: { - LogStep(63, "Step 6f: Read the optional command(StepSaturation) in AcceptedCommandList"); + case 64: { + LogStep(64, "Step 6f: Read the optional command(StepSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 64: { - LogStep(64, "Step 6g: Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); + case 65: { + LogStep(65, "Step 6g: Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 65: { - LogStep(65, "Step 6h: Read the optional command(MoveToColor) in AcceptedCommandList"); + case 66: { + LogStep(66, "Step 6h: Read the optional command(MoveToColor) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 66: { - LogStep(66, "Step 6i: Read the optional command(MoveColor) in AcceptedCommandList"); + case 67: { + LogStep(67, "Step 6i: Read the optional command(MoveColor) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 67: { - LogStep(67, "Step 6j: Read the optional command(StepColor) in AcceptedCommandList"); + case 68: { + LogStep(68, "Step 6j: Read the optional command(StepColor) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 68: { - LogStep(68, "Step 6k: Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); + case 69: { + LogStep(69, "Step 6k: Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 69: { - LogStep(69, "Step 6l: Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); + case 70: { + LogStep(70, "Step 6l: Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 70: { - LogStep(70, "Step 6m: Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); + case 71: { + LogStep(71, "Step 6m: Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 71: { - LogStep(71, "Step 6n: Read the optional command(EnhancedStepHue) in AcceptedCommandList"); + case 72: { + LogStep(72, "Step 6n: Read the optional command(EnhancedStepHue) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 72: { - LogStep(72, "Step 6o: Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); + case 73: { + LogStep(73, "Step 6o: Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 73: { - LogStep(73, "Step 6p: Read the optional command(ColorLoopSet) in AcceptedCommandList"); + case 74: { + LogStep(74, "Step 6p: Read the optional command(ColorLoopSet) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 74: { - LogStep(74, "Step 6q: Read the optional command(StopMoveStep) in AcceptedCommandList"); + case 75: { + LogStep(75, "Step 6q: Read the optional command(StopMoveStep) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 75: { - LogStep(75, "Step 6r: Read the optional command(MoveColorTemperature) in AcceptedCommandList"); + case 76: { + LogStep(76, "Step 6r: Read the optional command(MoveColorTemperature) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 76: { - LogStep(76, "Step 6s: Read the optional command(StepColorTemperature) in AcceptedCommandList"); + case 77: { + LogStep(77, "Step 6s: Read the optional command(StepColorTemperature) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 77: { - LogStep(77, "Step 7: Read the global attribute: GeneratedCommandList"); + case 78: { + LogStep(78, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -24143,7 +24276,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand { public: Test_TC_CDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CDOCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_CDOCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -24322,7 +24455,12 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -24331,10 +24469,19 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24346,7 +24493,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24359,7 +24506,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24369,7 +24516,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24379,7 +24526,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24389,7 +24536,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24399,7 +24546,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24408,7 +24555,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24417,7 +24564,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24429,7 +24576,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24441,7 +24588,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24555,100 +24702,106 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, + CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "CDOCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "CDOCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("CDOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, @@ -24899,7 +25052,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand { public: Test_TC_CMOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CMOCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_CMOCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25078,7 +25231,12 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -25087,10 +25245,19 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25102,7 +25269,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25115,7 +25282,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25125,7 +25292,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25135,7 +25302,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25145,7 +25312,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25155,7 +25322,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25164,7 +25331,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25173,7 +25340,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25185,7 +25352,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25197,7 +25364,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25311,100 +25478,106 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, + CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "CMOCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "CMOCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("CMOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, @@ -25657,7 +25830,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand { public: Test_TC_FLDCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FLDCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_FLDCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25836,7 +26009,12 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -25845,10 +26023,19 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25860,7 +26047,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25873,7 +26060,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25883,7 +26070,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25893,7 +26080,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25903,7 +26090,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25913,7 +26100,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25922,7 +26109,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25931,7 +26118,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25943,7 +26130,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25955,7 +26142,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26069,100 +26256,106 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, + FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "FLDCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "FLDCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("FLDCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, @@ -26411,7 +26604,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand { public: Test_TC_NDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_NDOCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_NDOCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26590,7 +26783,12 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -26599,10 +26797,19 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26614,7 +26821,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26627,7 +26834,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26637,7 +26844,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26647,7 +26854,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26657,7 +26864,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26667,7 +26874,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26676,7 +26883,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26685,7 +26892,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26697,7 +26904,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26709,7 +26916,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26824,100 +27031,106 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, + NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "NDOCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "NDOCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("NDOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, @@ -27170,7 +27383,7 @@ class Test_TC_NDOCONC_2_1Suite : public TestCommand class Test_TC_OZCONC_1_1Suite : public TestCommand { public: - Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 28, credsIssuerConfig) + Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27349,7 +27562,12 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -27358,10 +27576,19 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27373,7 +27600,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27386,7 +27613,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27396,7 +27623,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27406,7 +27633,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27416,7 +27643,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27426,7 +27653,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27435,7 +27662,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27444,7 +27671,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27456,7 +27683,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27468,7 +27695,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27582,99 +27809,105 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, + OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when OZCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "OZCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "OZCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("OZCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -27919,7 +28152,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand { public: Test_TC_PMHCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMHCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_PMHCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28098,7 +28331,12 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -28107,10 +28345,19 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28122,7 +28369,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28135,7 +28382,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28145,7 +28392,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28155,7 +28402,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28165,7 +28412,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28175,7 +28422,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28184,7 +28431,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28193,7 +28440,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28205,7 +28452,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28217,7 +28464,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28331,99 +28578,105 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, + Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "PMHCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "PMHCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PMHCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -28668,7 +28921,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand { public: Test_TC_PMICONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMICONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_PMICONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28847,7 +29100,12 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -28856,10 +29114,19 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28871,7 +29138,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28884,7 +29151,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28894,7 +29161,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28904,7 +29171,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28914,7 +29181,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28924,7 +29191,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28933,7 +29200,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28942,7 +29209,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28954,7 +29221,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28966,7 +29233,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29080,99 +29347,105 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, + Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when PMICONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "PMICONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "PMICONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PMICONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -29418,7 +29691,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand { public: Test_TC_PMKCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMKCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_PMKCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -29597,7 +29870,12 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -29606,10 +29884,19 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29621,7 +29908,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29634,7 +29921,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29644,7 +29931,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29654,7 +29941,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29664,7 +29951,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29674,7 +29961,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29683,7 +29970,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29692,7 +29979,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29704,7 +29991,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29716,7 +30003,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29830,99 +30117,105 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, + Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "PMKCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "PMKCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PMKCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -30167,7 +30460,7 @@ class Test_TC_PMKCONC_2_1Suite : public TestCommand class Test_TC_RNCONC_1_1Suite : public TestCommand { public: - Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 28, credsIssuerConfig) + Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30346,7 +30639,12 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -30355,10 +30653,19 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30370,7 +30677,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30383,7 +30690,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30393,7 +30700,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30403,7 +30710,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30413,7 +30720,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30423,7 +30730,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30432,7 +30739,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30441,7 +30748,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30453,7 +30760,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30465,7 +30772,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30579,99 +30886,105 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, + RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { + case 17: { LogStep( - 16, + 17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when RNCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "RNCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "RNCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("RNCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -30916,7 +31229,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand { public: Test_TC_TVOCCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TVOCCONC_1_1", 28, credsIssuerConfig) + TestCommand("Test_TC_TVOCCONC_1_1", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -31095,7 +31408,12 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: @@ -31104,10 +31422,19 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); + } + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31119,7 +31446,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31132,7 +31459,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31142,7 +31469,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31152,7 +31479,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31162,7 +31489,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31172,7 +31499,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31181,7 +31508,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31190,7 +31517,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31202,7 +31529,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31214,7 +31541,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31341,21 +31668,28 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + LogStep(15, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, + case 17: { + LogStep(17, "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not " "set"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31363,8 +31697,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " "and Measurement Unit in AttributeList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31372,8 +31706,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " "excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31381,8 +31715,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31390,8 +31724,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " "TVOCCONC.S.F04 (PEA) is not set"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31399,8 +31733,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, + case 22: { + LogStep(22, "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " "AttributeList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31408,8 +31742,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, + case 23: { + LogStep(23, "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " "TVOCCONC.S.F05 (AVG) is not set"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -31417,36 +31751,36 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + case 24: { + LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); + case 25: { + LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 5l: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Step 5l: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Step 6: Read the global attribute: AcceptedCommandList"); + case 27: { + LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Step 7: Read the global attribute: GeneratedCommandList"); + case 28: { + LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, @@ -32226,7 +32560,7 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand { public: Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_1_2", 10, credsIssuerConfig) + TestCommand("Test_TC_OPCREDS_1_2", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -32303,13 +32637,32 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32325,11 +32678,11 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32341,7 +32694,7 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -32381,12 +32734,18 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -32401,8 +32760,8 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -32416,14 +32775,14 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Step 6a: TH reads AcceptedCommandList from DUT"); + case 7: { + LogStep(7, "Step 6a: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("OPCREDS.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -32438,14 +32797,14 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Step 7a: TH reads GeneratedCommandList from DUT"); + case 9: { + LogStep(9, "Step 7a: TH reads GeneratedCommandList from DUT"); VerifyOrDo(!ShouldSkip("OPCREDS.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, + case 10: { + LogStep(10, "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -32467,7 +32826,7 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand class Test_TC_BINFO_1_1Suite : public TestCommand { public: - Test_TC_BINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_1_1", 21, credsIssuerConfig) + Test_TC_BINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_1_1", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -32554,7 +32913,23 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: @@ -32563,7 +32938,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; case 6: @@ -32572,7 +32947,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; case 7: @@ -32581,7 +32956,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); } break; case 8: @@ -32590,7 +32965,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); } break; case 9: @@ -32599,7 +32974,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; case 10: @@ -32608,7 +32983,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; case 11: @@ -32617,14 +32992,23 @@ class Test_TC_BINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + } break; case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32636,7 +33020,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32645,7 +33029,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32654,7 +33038,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32663,7 +33047,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -32672,15 +33056,15 @@ class Test_TC_BINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -32720,60 +33104,66 @@ class Test_TC_BINFO_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4c: TH reads optional attribute(PartNumber) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4d: TH reads optional attribute(ProductURL) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4c: TH reads optional attribute(PartNumber) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4e: TH reads optional attribute(ProductLabel) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4d: TH reads optional attribute(ProductURL) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4f: TH reads optional attribute(SerialNumber) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4e: TH reads optional attribute(ProductLabel) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4f: TH reads optional attribute(SerialNumber) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4h: TH reads optional attribute(Reachable) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4i: TH reads optional attribute(UniqueID) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4h: TH reads optional attribute(Reachable) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, + LogStep(12, "Step 4i: TH reads optional attribute(UniqueID) in attributeList"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, + BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "Step 4j: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -32788,39 +33178,45 @@ class Test_TC_BINFO_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Step 5a: TH1 reads EventList from DUT"); - VerifyOrDo(!ShouldSkip(" BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, - true, chip::NullOptional); - } case 14: { - LogStep(14, "Step 5b: Read BINFO.S.E00(StartUp) event in EventList"); - VerifyOrDo(!ShouldSkip("BINFO.S.E00 && BINFO.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 5a: TH1 reads EventList from DUT"); + VerifyOrDo( + !ShouldSkip( + "PICS_EVENT_LIST_ENABLED && BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 5c: Read BINFO.S.E01(ShutDown) event in EventList"); - VerifyOrDo(!ShouldSkip("BINFO.S.E01 && BINFO.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 5b: Read BINFO.S.E00(StartUp) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E00 && BINFO.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 5d: Read BINFO.S.E02(Leave) event in EventList"); - VerifyOrDo(!ShouldSkip("BINFO.S.E02 && BINFO.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 5c: Read BINFO.S.E01(ShutDown) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E01 && BINFO.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 5e: Read (ReachableChanged) event in EventList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 5d: Read BINFO.S.E02(Leave) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E02 && BINFO.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, + LogStep(18, "Step 5e: Read (ReachableChanged) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.A0011 && BINFO.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, + true, chip::NullOptional); + } + case 19: { + LogStep(19, "Step 5f: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " @@ -32835,8 +33231,8 @@ class Test_TC_BINFO_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -32850,8 +33246,8 @@ class Test_TC_BINFO_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -34363,7 +34759,7 @@ class Test_TC_BINFO_2_2Suite : public TestCommand class Test_TC_CNET_1_3Suite : public TestCommand { public: - Test_TC_CNET_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_1_3", 20, credsIssuerConfig) + Test_TC_CNET_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_1_3", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34456,6 +34852,19 @@ class Test_TC_CNET_1_3Suite : public TestCommand } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34469,7 +34878,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34478,7 +34887,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34487,15 +34896,15 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34507,7 +34916,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34516,7 +34925,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34525,7 +34934,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34536,11 +34945,11 @@ class Test_TC_CNET_1_3Suite : public TestCommand } } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34551,7 +34960,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -34562,7 +34971,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand } } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -34621,32 +35030,38 @@ class Test_TC_CNET_1_3Suite : public TestCommand } case 6: { LogStep(6, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, + LogStep(7, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, + NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 4b: Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true"); VerifyOrDo(!ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList"); + case 9: { + LogStep(9, "Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList"); VerifyOrDo(!ShouldSkip("CNET.S.A0002 && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList"); + case 10: { + LogStep(10, "Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList"); VerifyOrDo(!ShouldSkip("CNET.S.A0003 && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, + case 11: { + LogStep(11, "Step 4e: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -34661,8 +35076,8 @@ class Test_TC_CNET_1_3Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -34676,34 +35091,34 @@ class Test_TC_CNET_1_3Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { + case 13: { LogStep( - 12, + 13, "Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features CNET.S.F00(WI),CNET.S.F01(TH)"); VerifyOrDo(!ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true)"); + case 14: { + LogStep(14, "Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true)"); VerifyOrDo(!ShouldSkip("CNET.S.F00 && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true)"); + case 15: { + LogStep(15, "Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true)"); VerifyOrDo(!ShouldSkip("CNET.S.F01 && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is true)"); + case 16: { + LogStep(16, "Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is true)"); VerifyOrDo(!ShouldSkip("CNET.S.F02 && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, + case 17: { + LogStep(17, "Step 6e: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -34718,24 +35133,24 @@ class Test_TC_CNET_1_3Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) or " "CNET.S.F01(TH) is true)"); VerifyOrDo(!ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 18: { + case 19: { LogStep( - 18, + 19, "Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must be true)"); VerifyOrDo(!ShouldSkip("CNET.S.F02 && CNET.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 7c: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -34757,7 +35172,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand class Test_TC_DESC_1_1Suite : public TestCommand { public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 8, credsIssuerConfig) + Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34832,7 +35247,20 @@ class Test_TC_DESC_1_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -34846,6 +35274,10 @@ class Test_TC_DESC_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -34882,12 +35314,18 @@ class Test_TC_DESC_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -34902,8 +35340,8 @@ class Test_TC_DESC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -34917,8 +35355,8 @@ class Test_TC_DESC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, + case 7: { + LogStep(7, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -34932,8 +35370,8 @@ class Test_TC_DESC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -34955,7 +35393,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand class Test_TC_DLOG_1_1Suite : public TestCommand { public: - Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 10, credsIssuerConfig) + Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -35026,13 +35464,26 @@ class Test_TC_DLOG_1_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35046,11 +35497,11 @@ class Test_TC_DLOG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35064,7 +35515,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -35104,12 +35555,18 @@ class Test_TC_DLOG_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TTH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("DLOG.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Step 4a: TTH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in " "the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY " "contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " @@ -35124,8 +35581,8 @@ class Test_TC_DLOG_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Step 4b: TTH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -35139,14 +35596,14 @@ class Test_TC_DLOG_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Step 6a: TTH reads AcceptedCommandList from DUT"); + case 7: { + LogStep(7, "Step 6a: TTH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("DLOG.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 6b: TTH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -35161,14 +35618,14 @@ class Test_TC_DLOG_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Step 7a: TTH reads GeneratedCommandList from DUT"); + case 9: { + LogStep(9, "Step 7a: TTH reads GeneratedCommandList from DUT"); VerifyOrDo(!ShouldSkip("DLOG.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, + case 10: { + LogStep(10, "Step 7b: TTH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -35190,7 +35647,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand class Test_TC_DGETH_1_1Suite : public TestCommand { public: - Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 21, credsIssuerConfig) + Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -35283,7 +35740,11 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 7: @@ -35292,7 +35753,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 8: @@ -35301,7 +35762,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 9: @@ -35310,7 +35771,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 10: @@ -35319,7 +35780,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 11: @@ -35328,7 +35789,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 12: @@ -35337,7 +35798,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 13: @@ -35346,7 +35807,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; case 14: @@ -35355,18 +35816,27 @@ class Test_TC_DGETH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35375,7 +35845,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35387,11 +35857,11 @@ class Test_TC_DGETH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -35444,76 +35914,82 @@ class Test_TC_DGETH_1_1Suite : public TestCommand } case 5: { LogStep(5, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4b: TH reads optional attribute(PHYRate) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4c: TH reads optional attribute(FullDuplex) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4b: TH reads optional attribute(PHYRate) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { + LogStep(8, "Step 4c: TH reads optional attribute(FullDuplex) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 9: { LogStep( - 8, + 9, "Step 4d: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0002 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { + case 10: { LogStep( - 9, + 10, "Step 4e: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0003 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { + case 11: { LogStep( - 10, + 11, "Step 4f: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0004 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 11: { + case 12: { LogStep( - 11, + 12, "Step 4g: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0005 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 12: { + case 13: { LogStep( - 12, + 13, "Step 4h: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0006 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList"); + case 14: { + LogStep(14, "Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0007 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList"); + case 15: { + LogStep(15, "Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList"); VerifyOrDo(!ShouldSkip("DGETH.S.A0008 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, + case 16: { + LogStep(16, "Step 4k: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -35528,8 +36004,8 @@ class Test_TC_DGETH_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 16: { - LogStep(16, + case 17: { + LogStep(17, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -35543,22 +36019,22 @@ class Test_TC_DGETH_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Step 6a: TH reads AcceptedCommandList from DUT"); + case 18: { + LogStep(18, "Step 6a: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Step 6b: TH reads AcceptedCommandList from DUT"); + case 19: { + LogStep(19, "Step 6b: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, + case 20: { + LogStep(20, "Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -35573,8 +36049,8 @@ class Test_TC_DGETH_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -36288,7 +36764,7 @@ class Test_TC_DGETH_2_2Suite : public TestCommand class Test_TC_FLW_1_1Suite : public TestCommand { public: - Test_TC_FLW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_1_1", 9, credsIssuerConfig) + Test_TC_FLW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_1_1", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -36366,12 +36842,24 @@ class Test_TC_FLW_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36385,6 +36873,10 @@ class Test_TC_FLW_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -36421,18 +36913,24 @@ class Test_TC_FLW_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("FLW.S.A0003 && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, + LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("FLW.S.A0003 && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, + FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -36447,8 +36945,8 @@ class Test_TC_FLW_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, + case 7: { + LogStep(7, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -36462,8 +36960,8 @@ class Test_TC_FLW_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -36478,8 +36976,8 @@ class Test_TC_FLW_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, + case 9: { + LogStep(9, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -36637,7 +37135,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand class Test_TC_FLABEL_1_1Suite : public TestCommand { public: - Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 8, credsIssuerConfig) + Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -36709,7 +37207,17 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36723,6 +37231,10 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -36759,12 +37271,18 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("FLABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -36779,8 +37297,8 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -36794,8 +37312,8 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, + case 7: { + LogStep(7, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -36809,8 +37327,8 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -36949,7 +37467,7 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand class Test_TC_FAN_1_1Suite : public TestCommand { public: - Test_TC_FAN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_1_1", 16, credsIssuerConfig) + Test_TC_FAN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_1_1", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -37072,6 +37590,23 @@ class Test_TC_FAN_1_1Suite : public TestCommand } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -37082,7 +37617,7 @@ class Test_TC_FAN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -37092,7 +37627,7 @@ class Test_TC_FAN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -37102,7 +37637,7 @@ class Test_TC_FAN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -37111,7 +37646,7 @@ class Test_TC_FAN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -37123,7 +37658,7 @@ class Test_TC_FAN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -37209,41 +37744,48 @@ class Test_TC_FAN_1_1Suite : public TestCommand } case 9: { LogStep(9, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("FAN.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("FAN.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("FAN.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(14, "Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("FAN.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "Step 4: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip(" !FAN.S.C00.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Step 5: Read the optional command (ResetCondition) in AcceptedCommandList"); + case 16: { + LogStep(16, "Step 5: Read the optional command (ResetCondition) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("FAN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); @@ -38311,7 +38853,7 @@ class Test_TC_FAN_3_6Suite : public TestCommand class Test_TC_CGEN_1_1Suite : public TestCommand { public: - Test_TC_CGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_1_1", 7, credsIssuerConfig) + Test_TC_CGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -38386,6 +38928,24 @@ class Test_TC_CGEN_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38397,7 +38957,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38408,7 +38968,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38453,21 +39013,29 @@ class Test_TC_CGEN_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, GeneralCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: Read the global attribute: EventList"); + LogStep(4, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::EventList::Id, true, chip::NullOptional); + GeneralCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 6: Read the global attribute: AcceptedCommandList"); + LogStep(5, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + GeneralCommissioning::Attributes::EventList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 7: Read the global attribute: GeneratedCommandList"); + LogStep(6, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, + GeneralCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, GeneralCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -38646,7 +39214,7 @@ class Test_TC_CGEN_2_1Suite : public TestCommand class Test_TC_DGGEN_1_1Suite : public TestCommand { public: - Test_TC_DGGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_1_1", 19, credsIssuerConfig) + Test_TC_DGGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_1_1", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -38724,7 +39292,14 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: @@ -38733,7 +39308,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 6: @@ -38742,7 +39317,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 7: @@ -38751,7 +39326,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 8: @@ -38760,7 +39335,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 9: @@ -38769,14 +39344,23 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38785,7 +39369,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38794,7 +39378,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38803,7 +39387,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38812,11 +39396,11 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -38825,11 +39409,11 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -38869,48 +39453,54 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: Read optional attribute(UpTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4b: Read optional attribute(UpTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4d: Read optional attribute(BootReason) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4d: Read optional attribute(BootReason) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, + LogStep(10, "Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -38925,32 +39515,35 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 11: { - LogStep(11, "Step 5a: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } case 12: { - LogStep(12, "Step 5b: Read optional event(HardwareFaultChange) in EventList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 5a: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 5c: Read optional event(RadioFaultChange) in EventList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 5b: Read optional event(HardwareFaultChange) in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E00"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 5d: Read optional event(NetworkFaultChange) in EventList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 5c: Read optional event(RadioFaultChange) in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E01"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, + LogStep(15, "Step 5d: Read optional event(NetworkFaultChange) in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E02"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 5e: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -38964,14 +39557,14 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 17: { + LogStep(17, "Step 6a: Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("DGGEN.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -38986,8 +39579,8 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -39311,7 +39904,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand class Test_TC_ICDM_1_1Suite : public TestCommand { public: - Test_TC_ICDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_1_1", 13, credsIssuerConfig) + Test_TC_ICDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_1_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -39398,7 +39991,14 @@ class Test_TC_ICDM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -39407,7 +40007,7 @@ class Test_TC_ICDM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 7: @@ -39416,10 +40016,19 @@ class Test_TC_ICDM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -39431,7 +40040,7 @@ class Test_TC_ICDM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -39441,7 +40050,7 @@ class Test_TC_ICDM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -39450,7 +40059,7 @@ class Test_TC_ICDM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -39462,7 +40071,7 @@ class Test_TC_ICDM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -39512,51 +40121,59 @@ class Test_TC_ICDM_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4b: Read the optional attribute(RegisteredClients) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4c: Read the optional attribute(IcdCounter) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4b: Read the optional attribute(RegisteredClients) in AttributeList"); + VerifyOrDo(!ShouldSkip("ICDM.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4c: Read the optional attribute(IcdCounter) in AttributeList"); + VerifyOrDo(!ShouldSkip("ICDM.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 5: Read the global attribute: EventList"); + LogStep(8, "Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList"); + VerifyOrDo(!ShouldSkip("ICDM.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 9: { + LogStep(9, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::EventList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 10: { + LogStep(10, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 6b: Read the optional command (StayActiveRequest) in AttributeList"); + case 11: { + LogStep(11, "Step 6b: Read the optional command (StayActiveRequest) in AttributeList"); VerifyOrDo(!ShouldSkip("ICDM.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 7: Read the global attribute: GeneratedCommandList"); + case 12: { + LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip(" !ICDM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); + case 13: { + LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("ICDM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -39731,7 +40348,7 @@ class Test_TC_ICDM_2_1Suite : public TestCommand class Test_TC_I_1_1Suite : public TestCommand { public: - Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 8, credsIssuerConfig) + Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -39805,10 +40422,16 @@ class Test_TC_I_1_1Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: @@ -39817,10 +40440,19 @@ class Test_TC_I_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -39832,7 +40464,7 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -39870,27 +40502,34 @@ class Test_TC_I_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, + LogStep(4, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 6: Read the optional command(TriggerEffect) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, + LogStep(6, "Step 6: Read the optional command(TriggerEffect) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, + LogStep(7, "Step 6: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Step 7: Read EventList attribute from the DUT. For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -40590,7 +41229,7 @@ class Test_TC_I_2_3Suite : public TestCommand class Test_TC_ILL_1_1Suite : public TestCommand { public: - Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 9, credsIssuerConfig) + Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -40668,7 +41307,14 @@ class Test_TC_ILL_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: @@ -40677,14 +41323,23 @@ class Test_TC_ILL_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -40696,7 +41351,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -40742,23 +41397,30 @@ class Test_TC_ILL_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("ILL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4c: Read the optional attribute(LightSensorType) in AttributeList"); - VerifyOrDo(!ShouldSkip("ILL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("ILL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, + LogStep(6, "Step 4c: Read the optional attribute(LightSensorType) in AttributeList"); + VerifyOrDo(!ShouldSkip("ILL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -40769,13 +41431,13 @@ class Test_TC_ILL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Step 6: Read the global attribute: AcceptedCommandList"); + case 8: { + LogStep(8, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 7: Read the global attribute: GeneratedCommandList"); + case 9: { + LogStep(9, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -41114,7 +41776,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand class Test_TC_LVL_1_1Suite : public TestCommand { public: - Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 19, credsIssuerConfig) + Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -41214,6 +41876,22 @@ class Test_TC_LVL_1_1Suite : public TestCommand } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41223,7 +41901,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41234,7 +41912,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41243,7 +41921,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41252,7 +41930,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41261,7 +41939,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41270,7 +41948,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41279,7 +41957,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41288,7 +41966,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41304,7 +41982,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41313,7 +41991,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41325,7 +42003,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -41390,75 +42068,83 @@ class Test_TC_LVL_1_1Suite : public TestCommand } case 6: { LogStep(6, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3d: Read the optional attribute(MinLevel) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3e: Read the optional attribute(MaxLevel) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3d: Read the optional attribute(MinLevel) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3e: Read the optional attribute(MaxLevel) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4a: Read the global attribute: AcceptedCommandList"); + LogStep(15, "Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList"); + VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 4a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList"); + case 17: { + LogStep(17, "Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Step 4b: Read the global attribute: GeneratedCommandList"); + case 18: { + LogStep(18, "Step 4b: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Step 5: Read the global attribute: EventList"); + case 19: { + LogStep(19, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::EventList::Id, true, chip::NullOptional); } @@ -44459,7 +45145,7 @@ class Test_TC_LVL_7_1Suite : public TestCommand class Test_TC_LCFG_1_1Suite : public TestCommand { public: - Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 7, credsIssuerConfig) + Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -44531,6 +45217,21 @@ class Test_TC_LCFG_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -44542,7 +45243,7 @@ class Test_TC_LCFG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -44554,7 +45255,7 @@ class Test_TC_LCFG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -44600,21 +45301,29 @@ class Test_TC_LCFG_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: Read the global attribute: EventList"); + LogStep(4, "Step 4: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::EventList::Id, true, chip::NullOptional); + LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 6: TH reads AcceptedCommandList from DUT"); + LogStep(5, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LocalizationConfiguration::Attributes::EventList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 7: TH reads GeneratedCommandList from DUT"); + LogStep(6, "Step 6: TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 7: TH reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, LocalizationConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -44626,7 +45335,7 @@ class Test_TC_LCFG_1_1Suite : public TestCommand class Test_TC_LUNIT_1_2Suite : public TestCommand { public: - Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 9, credsIssuerConfig) + Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -44710,10 +45419,23 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -44725,7 +45447,7 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -44737,7 +45459,7 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -44791,30 +45513,36 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 5: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 5: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::EventList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step 6: TH reads AcceptedCommandList from DUT"); + case 8: { + LogStep(8, "Step 6: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("LUNIT.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 7: TH reads GeneratedCommandList from DUT"); + case 9: { + LogStep(9, "Step 7: TH reads GeneratedCommandList from DUT"); VerifyOrDo(!ShouldSkip("LUNIT.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -44998,7 +45726,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand class Test_TC_LTIME_1_2Suite : public TestCommand { public: - Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 9, credsIssuerConfig) + Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -45075,7 +45803,12 @@ class Test_TC_LTIME_1_2Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: @@ -45084,10 +45817,19 @@ class Test_TC_LTIME_1_2Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45099,7 +45841,7 @@ class Test_TC_LTIME_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45111,7 +45853,7 @@ class Test_TC_LTIME_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45159,36 +45901,42 @@ class Test_TC_LTIME_1_2Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 5: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::EventList::Id, true, chip::NullOptional); + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 6: TH reads AcceptedCommandList from DUT"); + LogStep(7, "Step 5: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::EventList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 6: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("LTIME.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 7: TH reads GeneratedCommandList from DUT"); + case 9: { + LogStep(9, "Step 7: TH reads GeneratedCommandList from DUT"); VerifyOrDo(!ShouldSkip("LTIME.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -45202,7 +45950,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand { public: Test_TC_LOWPOWER_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_LOWPOWER_1_1", 7, credsIssuerConfig) + TestCommand("Test_TC_LOWPOWER_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -45282,6 +46030,28 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45295,7 +46065,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45307,7 +46077,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45353,21 +46123,29 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 3: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AcceptedCommandList::Id, true, + LogStep(4, "Step 3: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::GeneratedCommandList::Id, true, + LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 6: Read the global attribute: EventList"); + LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::EventList::Id, true, chip::NullOptional); } @@ -45380,7 +46158,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { public: Test_TC_KEYPADINPUT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_1_2", 10, credsIssuerConfig) + TestCommand("Test_TC_KEYPADINPUT_1_2", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -45477,6 +46255,19 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45485,7 +46276,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45494,7 +46285,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45560,21 +46351,29 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand } case 6: { LogStep(6, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(7, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 5: Read the global attribute: GeneratedCommandList"); + case 9: { + LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6: Read the global attribute: EventList"); + case 10: { + LogStep(10, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::EventList::Id, true, chip::NullOptional); } @@ -45587,7 +46386,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { public: Test_TC_APPLAUNCHER_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_1_3", 10, credsIssuerConfig) + TestCommand("Test_TC_APPLAUNCHER_1_3", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -45671,7 +46470,11 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -45680,10 +46483,19 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45694,7 +46506,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45703,7 +46515,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45756,33 +46568,41 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand } case 4: { LogStep(4, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3b: Read the optional attribute(CatalogList) in AttributeList"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3c: Read the optional attribute(CurrentApp) in AttributeList"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3b: Read the optional attribute(CatalogList) in AttributeList"); + VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(7, "Step 3c: Read the optional attribute(CurrentApp) in AttributeList"); + VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 5: Read the global attribute: GeneratedCommandList"); + LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + ApplicationLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 6: Read the global attribute: EventList"); + LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, + ApplicationLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::EventList::Id, true, chip::NullOptional); } @@ -45795,7 +46615,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { public: Test_TC_MEDIAINPUT_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_1_4", 10, credsIssuerConfig) + TestCommand("Test_TC_MEDIAINPUT_1_4", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -45879,7 +46699,11 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -45888,10 +46712,19 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45903,7 +46736,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45915,7 +46748,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -45968,33 +46801,41 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand } case 4: { LogStep(4, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3b: Read the optional attribute(InputList) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3c: Read the optional attribute(CurrentInput) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3b: Read the optional attribute(InputList) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(7, "Step 3c: Read the optional attribute(CurrentInput) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 5: Read the global attribute: GeneratedCommandList"); + case 9: { + LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6: Read the global attribute: EventList"); + case 10: { + LogStep(10, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::EventList::Id, true, chip::NullOptional); } @@ -46007,7 +46848,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand { public: Test_TC_WAKEONLAN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WAKEONLAN_1_5", 8, credsIssuerConfig) + TestCommand("Test_TC_WAKEONLAN_1_5", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -46082,10 +46923,23 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46097,7 +46951,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46109,7 +46963,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46155,27 +47009,35 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand } case 3: { LogStep(3, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3b: Read the optional attribute(MACAddress) in AttributeList"); - VerifyOrDo(!ShouldSkip("WAKEONLAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(5, "Step 3b: Read the optional attribute(MACAddress) in AttributeList"); + VerifyOrDo(!ShouldSkip("WAKEONLAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); + case 7: { + LogStep(7, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step 6: Read the global attribute: EventList"); + case 8: { + LogStep(8, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::EventList::Id, true, chip::NullOptional); } @@ -46188,7 +47050,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { public: Test_TC_CHANNEL_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_1_6", 15, credsIssuerConfig) + TestCommand("Test_TC_CHANNEL_1_6", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -46281,7 +47143,11 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 7: @@ -46290,7 +47156,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 8: @@ -46299,10 +47165,19 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46311,7 +47186,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46320,7 +47195,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46329,7 +47204,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46341,7 +47216,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46350,7 +47225,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46409,59 +47284,67 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand } case 5: { LogStep(5, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3b: Read the optional attribute(ChannelList): AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3c: Reading optional attribute(Lineup) in AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3b: Read the optional attribute(ChannelList): AttributeList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3d: Read the optional attribute(CurrentChannel): AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3c: Reading optional attribute(Lineup) in AttributeList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4a: Read the optional command(ChangeChannel) in AcceptedCommandList"); + LogStep(9, "Step 3d: Read the optional attribute(CurrentChannel): AttributeList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Step 4a: Read the optional command(ChangeChannel) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 4b: Read the optional command(ChangeChannelByNumber) in AcceptedCommandList"); + case 11: { + LogStep(11, "Step 4b: Read the optional command(ChangeChannelByNumber) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 4c: Read the optional command(SkipChannel) in AcceptedCommandList"); + case 12: { + LogStep(12, "Step 4c: Read the optional command(SkipChannel) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 5a: Read the global attribute: GeneratedCommandList"); + case 13: { + LogStep(13, "Step 5a: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 5b: Read the global attribute: GeneratedCommandList"); + case 14: { + LogStep(14, "Step 5b: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("CHANNEL.S.F00 || CHANNEL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 6: Read the global attribute: EventList"); + case 15: { + LogStep(15, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::EventList::Id, true, chip::NullOptional); } @@ -46474,7 +47357,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { public: Test_TC_MEDIAPLAYBACK_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 23, credsIssuerConfig) + TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -46568,7 +47451,12 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 7: @@ -46577,7 +47465,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 8: @@ -46586,7 +47474,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 9: @@ -46595,7 +47483,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 10: @@ -46604,7 +47492,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 11: @@ -46613,10 +47501,19 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46627,7 +47524,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46636,7 +47533,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46645,7 +47542,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46654,7 +47551,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46663,7 +47560,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46672,7 +47569,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46681,7 +47578,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46690,7 +47587,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46699,7 +47596,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46708,7 +47605,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46768,105 +47665,113 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand } case 5: { LogStep(5, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3b: Read the optional attribute(StartTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3c: Read the optional attribute(Duration) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3b: Read the optional attribute(StartTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3d: Read the optional attribute(SampledPosition) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3c: Read the optional attribute(Duration) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3e: Read the optional attribute(PlaybackSpeed) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3d: Read the optional attribute(SampledPosition) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3f: Read the optional attribute(SeekRangeEnd) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3e: Read the optional attribute(PlaybackSpeed) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3g: Read the optional attribute(SeekRangeStart) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3f: Read the optional attribute(SeekRangeEnd) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4a: Read the global attribute: AcceptedCommandList"); + LogStep(12, "Step 3g: Read the optional attribute(SeekRangeStart) in AttributeList"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 13: { + LogStep(13, "Step 4a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 4b: Read the optional command(StartOver) in AcceptedCommandList"); + case 14: { + LogStep(14, "Step 4b: Read the optional command(StartOver) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 4c: Read the optional command(Previous) in AcceptedCommandList"); + case 15: { + LogStep(15, "Step 4c: Read the optional command(Previous) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Step 4d: Read the optional command(Next) in AcceptedCommandList"); + case 16: { + LogStep(16, "Step 4d: Read the optional command(Next) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Step 4e: Read the optional command(Rewind) in AcceptedCommandList"); + case 17: { + LogStep(17, "Step 4e: Read the optional command(Rewind) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Step 4f: Read the optional command(FastForward) in AcceptedCommandList"); + case 18: { + LogStep(18, "Step 4f: Read the optional command(FastForward) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Step 4g: Read the optional command(SkipForward) in AcceptedCommandList"); + case 19: { + LogStep(19, "Step 4g: Read the optional command(SkipForward) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Step 4h: Read the optional command(SkipBackward) in AcceptedCommandList"); + case 20: { + LogStep(20, "Step 4h: Read the optional command(SkipBackward) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Step 4i: Read the optional command(Seek) in AcceptedCommandList"); + case 21: { + LogStep(21, "Step 4i: Read the optional command(Seek) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Step 5: Read the global attribute: GeneratedCommandList"); + case 22: { + LogStep(22, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Step 6: Read the global attribute: EventList"); + case 23: { + LogStep(23, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::EventList::Id, true, chip::NullOptional); } @@ -46879,7 +47784,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { public: Test_TC_AUDIOOUTPUT_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_1_8", 8, credsIssuerConfig) + TestCommand("Test_TC_AUDIOOUTPUT_1_8", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -46962,13 +47867,28 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -46980,7 +47900,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47033,21 +47953,29 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand } case 4: { LogStep(4, "Step 3: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(5, "Step 3: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); + case 7: { + LogStep(7, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step 6: Read the global attribute: EventList"); + case 8: { + LogStep(8, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::EventList::Id, true, chip::NullOptional); } @@ -47059,7 +47987,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand class Test_TC_TGTNAV_1_9Suite : public TestCommand { public: - Test_TC_TGTNAV_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_1_9", 8, credsIssuerConfig) + Test_TC_TGTNAV_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_1_9", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -47120,7 +48048,208 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Step 1: read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 2: Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 3b: Read the optional attribute(CurrentTarget) in AttributeList"); + VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 4: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 5: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::EventList::Id, + true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_APBSC_1_10Suite : public TestCommand +{ +public: + Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 11, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_APBSC_1_10Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); @@ -47130,166 +48259,6 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3b: Read the optional attribute(CurrentTarget) in AttributeList"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: Read the global attribute: EventList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::EventList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APBSC_1_10Suite : public TestCommand -{ -public: - Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APBSC_1_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47302,13 +48271,12 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47317,7 +48285,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47326,7 +48294,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47335,7 +48303,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47347,7 +48315,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47359,7 +48327,7 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47405,39 +48373,47 @@ class Test_TC_APBSC_1_10Suite : public TestCommand } case 3: { LogStep(3, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3b: Read the optional attribute(VendorName) in AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3c: Read the optional attribute(VendorID) in AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3b: Read the optional attribute(VendorName) in AttributeList"); + VerifyOrDo(!ShouldSkip("APBSC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3d: Read the optional attribute(ProductID) in AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3c: Read the optional attribute(VendorID) in AttributeList"); + VerifyOrDo(!ShouldSkip("APBSC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(7, "Step 3d: Read the optional attribute(ProductID) in AttributeList"); + VerifyOrDo(!ShouldSkip("APBSC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 5: Read the global attribute: GeneratedCommandList"); + LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 6: Read the global attribute: EventList"); + LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::EventList::Id, true, chip::NullOptional); } @@ -47450,7 +48426,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { public: Test_TC_CONTENTLAUNCHER_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 12, credsIssuerConfig) + TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -47543,7 +48519,11 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 7: @@ -47552,10 +48532,19 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47564,7 +48553,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47573,7 +48562,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47582,7 +48571,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47642,40 +48631,48 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand } case 5: { LogStep(5, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3b: Read the optional attribute(AcceptHeader): AttributeList"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3c: Read the optional attribute(SupportedStreamingProtocols): AttributeList"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3b: Read the optional attribute(AcceptHeader): AttributeList"); + VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4a: Read the optional command(LaunchContent) in AcceptedCommandList attribute"); + LogStep(8, "Step 3c: Read the optional attribute(SupportedStreamingProtocols): AttributeList"); + VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, + ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Step 4a: Read the optional command(LaunchContent) in AcceptedCommandList attribute"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 4b: Read the optional command(LaunchURL) in AcceptedCommandList attribute"); + case 10: { + LogStep(10, "Step 4b: Read the optional command(LaunchURL) in AcceptedCommandList attribute"); VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 5: Read the global attribute: GeneratedCommandList"); + case 11: { + LogStep(11, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 6: Read the global attribute: EventList"); + case 12: { + LogStep(12, "Step 6: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::EventList::Id, true, chip::NullOptional); } @@ -47688,7 +48685,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { public: Test_TC_ALOGIN_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ALOGIN_1_12", 7, credsIssuerConfig) + TestCommand("Test_TC_ALOGIN_1_12", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -47758,6 +48755,19 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47768,7 +48778,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47777,7 +48787,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -47823,21 +48833,29 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand } case 3: { LogStep(3, "Step 3: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4: Read the global attribute: AcceptedCommandList"); + LogStep(4, "Step 3: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Step 5: Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 6: TH reads EventList attribute from DUT"); + case 7: { + LogStep(7, "Step 6: TH reads EventList attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::EventList::Id, true, chip::NullOptional); } @@ -52760,7 +53778,7 @@ class Test_TC_CONTENTLAUNCHER_10_7Suite : public TestCommand class Test_TC_MOD_1_1Suite : public TestCommand { public: - Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 10, credsIssuerConfig) + Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -52843,7 +53861,15 @@ class Test_TC_MOD_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -52852,10 +53878,19 @@ class Test_TC_MOD_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -52867,7 +53902,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -52876,7 +53911,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -52934,33 +53969,41 @@ class Test_TC_MOD_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("MOD.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4c: TH reads the optional attribute(OnMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("MOD.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("MOD.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the global attribute: EventList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::EventList::Id, true, + LogStep(7, "Step 4c: TH reads the optional attribute(OnMode) in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("MOD.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 5: Read the global attribute: AcceptedCommandList"); + LogStep(8, "Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::EventList::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Step 5: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6: Read the global attribute: GeneratedCommandList"); + case 10: { + LogStep(10, "Step 6: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -53240,7 +54283,7 @@ class OTA_SuccessfulTransferSuite : public TestCommand class Test_TC_OCC_1_1Suite : public TestCommand { public: - Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 7, credsIssuerConfig) + Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -53313,6 +54356,22 @@ class Test_TC_OCC_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53324,7 +54383,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53336,7 +54395,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53382,21 +54441,29 @@ class Test_TC_OCC_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: Read the global attribute: EventList"); + LogStep(4, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::EventList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Step 6: Read the global attribute: AcceptedCommandList"); + case 6: { + LogStep(6, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 7: Read the global attribute: GeneratedCommandList"); + case 7: { + LogStep(7, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -53770,7 +54837,7 @@ class Test_TC_OCC_2_3Suite : public TestCommand class Test_TC_OO_1_1Suite : public TestCommand { public: - Test_TC_OO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_1_1", 11, credsIssuerConfig) + Test_TC_OO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -53860,6 +54927,20 @@ class Test_TC_OO_1_1Suite : public TestCommand } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53871,11 +54952,11 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53886,7 +54967,7 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53897,7 +54978,7 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -53956,17 +55037,24 @@ class Test_TC_OO_1_1Suite : public TestCommand } case 5: { LogStep(5, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4b: Read the feature dependent(OO.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, + LogStep(7, "Step 4b: Read the feature dependent(OO.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -53977,19 +55065,19 @@ class Test_TC_OO_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 9: { + LogStep(9, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList"); + case 10: { + LogStep(10, "Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 7: Read the global attribute: GeneratedCommandList"); + case 11: { + LogStep(11, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -54944,7 +56032,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand { public: Test_TC_OPSTATE_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPSTATE_1_1", 12, credsIssuerConfig) + TestCommand("Test_TC_OPSTATE_1_1", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -55024,10 +56112,28 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55036,7 +56142,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55045,7 +56151,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55055,7 +56161,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55064,7 +56170,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55074,7 +56180,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55084,7 +56190,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55127,52 +56233,60 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("OPSTATE.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5a: TH reads from the DUT the EventList attribute."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::EventList::Id, - true, chip::NullOptional); + LogStep(5, "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("OPSTATE.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList."); - VerifyOrDo(!ShouldSkip("OPSTATE.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 5a: TH reads from the DUT the EventList attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::EventList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 6a: Read the optional command(Start) in AcceptedCommandList"); + LogStep(7, "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OPSTATE.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::EventList::Id, + true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 6a: Read the optional command(Start) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OPSTATE.S.C02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 6b: Read the optional command(Stop) in AcceptedCommandList"); + case 9: { + LogStep(9, "Step 6b: Read the optional command(Stop) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OPSTATE.S.C01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6c: Read the optional command(Pause) in AcceptedCommandList"); + case 10: { + LogStep(10, "Step 6c: Read the optional command(Pause) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OPSTATE.S.C00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 6d: Read the optional command(Resume) in AcceptedCommandList"); + case 11: { + LogStep(11, "Step 6d: Read the optional command(Resume) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OPSTATE.S.C03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 7: Read the global attribute: GeneratedCommandList"); + case 12: { + LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("(OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, @@ -55186,7 +56300,7 @@ class Test_TC_OPSTATE_1_1Suite : public TestCommand class Test_TC_PS_1_1Suite : public TestCommand { public: - Test_TC_PS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_1_1", 19, credsIssuerConfig) + Test_TC_PS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_1_1", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -55303,10 +56417,27 @@ class Test_TC_PS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55317,7 +56448,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55327,7 +56458,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55337,7 +56468,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55349,7 +56480,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55361,7 +56492,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55373,7 +56504,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55382,7 +56513,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55391,7 +56522,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -55400,7 +56531,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -55464,69 +56595,77 @@ class Test_TC_PS_1_1Suite : public TestCommand } case 7: { LogStep(7, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4b: Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("PS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4c: Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 4b: Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("PS.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4d: Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4c: Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("PS.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); + LogStep(12, "Step 4d: Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("PS.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 13: { - LogStep(13, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::GeneratedCommandList::Id, + LogStep(13, "Step 5: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 7a: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip(" !PS.S.E00 && !PS.S.E01 && !PS.S.E02 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, - chip::NullOptional); + LogStep(14, "Step 6: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); } case 15: { - LogStep(15, "Step 7b: Read PS.S.E00(WiredFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PS.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 7a: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !PS.S.E00 && !PS.S.E01 && !PS.S.E02 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 7c: Read PS.S.E01(BatFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PS.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 7b: Read PS.S.E00(WiredFaultChange) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 7d: Read PS.S.E02(BatChargeFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PS.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 7c: Read PS.S.E01(BatFaultChange) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, + LogStep(18, "Step 7d: Read PS.S.E02(BatChargeFaultChange) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Step 7e: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -56107,7 +57246,7 @@ class Test_TC_PS_2_1Suite : public TestCommand class Test_TC_PRS_1_1Suite : public TestCommand { public: - Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 15, credsIssuerConfig) + Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -56194,7 +57333,14 @@ class Test_TC_PRS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -56203,7 +57349,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; case 7: @@ -56212,7 +57358,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 8: @@ -56221,7 +57367,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; case 9: @@ -56230,7 +57376,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; case 10: @@ -56239,12 +57385,17 @@ class Test_TC_PRS_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -56258,6 +57409,10 @@ class Test_TC_PRS_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -56300,48 +57455,54 @@ class Test_TC_PRS_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: Read the global mandatory attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4b: Read the optional attribute(ScaledValue) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0010 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: Read the global mandatory attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4c: Read the optional attribute(MinScaledValue) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0011 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4b: Read the optional attribute(ScaledValue) in AttributeList"); + VerifyOrDo(!ShouldSkip("PRS.S.A0010 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0012 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4c: Read the optional attribute(MinScaledValue) in AttributeList"); + VerifyOrDo(!ShouldSkip("PRS.S.A0011 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4e: Read the optional attribute(Scale) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0014 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList"); + VerifyOrDo(!ShouldSkip("PRS.S.A0012 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4f: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0003 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4e: Read the optional attribute(Scale) in AttributeList"); + VerifyOrDo(!ShouldSkip("PRS.S.A0014 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0013 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 4f: Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("PRS.S.A0003 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, + LogStep(11, "Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("PRS.S.A0013 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, + PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -56356,8 +57517,8 @@ class Test_TC_PRS_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, + case 13: { + LogStep(13, "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -56371,8 +57532,8 @@ class Test_TC_PRS_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 13: { - LogStep(13, + case 14: { + LogStep(14, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -56386,8 +57547,8 @@ class Test_TC_PRS_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 14: { - LogStep(14, + case 15: { + LogStep(15, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -56751,7 +57912,7 @@ class Test_TC_PRS_2_2Suite : public TestCommand class Test_TC_PCC_1_1Suite : public TestCommand { public: - Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 49, credsIssuerConfig) + Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 50, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -56896,7 +58057,18 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 12: @@ -56905,7 +58077,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 13: @@ -56914,7 +58086,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 14: @@ -56923,7 +58095,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 15: @@ -56932,7 +58104,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; case 16: @@ -56941,7 +58113,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: @@ -56950,7 +58122,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; case 18: @@ -56959,7 +58131,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; case 19: @@ -56968,7 +58140,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; case 20: @@ -56977,7 +58149,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; case 21: @@ -56986,7 +58158,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; case 22: @@ -56995,7 +58167,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; case 23: @@ -57004,7 +58176,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; case 24: @@ -57013,7 +58185,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); } break; case 25: @@ -57022,7 +58194,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); } break; case 26: @@ -57031,14 +58203,23 @@ class Test_TC_PCC_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); } break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); + } break; case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57050,7 +58231,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57059,7 +58240,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57068,7 +58249,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57077,7 +58258,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57086,7 +58267,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57095,7 +58276,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57104,7 +58285,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57113,7 +58294,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57122,7 +58303,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57131,7 +58312,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57140,7 +58321,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57149,7 +58330,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57158,7 +58339,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57167,7 +58348,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57176,7 +58357,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57185,7 +58366,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57194,7 +58375,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -57203,15 +58384,15 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -57295,108 +58476,114 @@ class Test_TC_PCC_1_1Suite : public TestCommand } case 10: { LogStep(10, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0003 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0004 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0003 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0005 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0004 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0006 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0005 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0007 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0006 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0008 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0007 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0009 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0008 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A000a && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0009 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A000b && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A000a && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A000c && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A000b && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0010 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A000c && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0014 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0010 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0014 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0016 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0015 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0016 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0021 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0017 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, + LogStep(27, "Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0021 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 4r: TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -57410,119 +58597,137 @@ class Test_TC_PCC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 28: { - LogStep(28, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip(" PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && " - "!PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b " - "&& !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } case 29: { - LogStep(29, "Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E00 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(29, "Step 5a: TH reads EventList from DUT"); + VerifyOrDo( + !ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && " + "!PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && " + "!PCC.S.E0b && !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 30: { - LogStep(30, "Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E01 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(30, "Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E00 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 31: { - LogStep(31, "Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E02 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(31, "Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E01 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 32: { - LogStep(32, "Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E03 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(32, "Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E02 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 33: { - LogStep(33, "Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E04 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(33, "Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E03 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 34: { - LogStep(34, "Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E05 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(34, "Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E04 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 35: { - LogStep(35, "Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E06 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E05 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 36: { - LogStep(36, "Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E07 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E06 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 37: { - LogStep(37, "Step 5j: TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E08 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(37, "Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E07 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 38: { - LogStep(38, "Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E09 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "Step 5j: TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E08 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 39: { - LogStep(39, "Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E0a && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E09 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 40: { - LogStep(40, "Step 5m: TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E0b && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0a && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 41: { - LogStep(41, "Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E0c && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(41, "Step 5m: TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0b && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 42: { - LogStep(42, "Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E0d && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(42, "Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0c && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 43: { - LogStep(43, "Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E0e && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(43, "Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0d && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 44: { - LogStep(44, "Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E0f && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(44, "Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0e && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 45: { - LogStep(45, "Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.E10 && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(45, "Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0f && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); } case 46: { - LogStep(46, + LogStep(46, "Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E10 && PCC.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); + } + case 47: { + LogStep(47, "Step 5s: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " @@ -57537,8 +58742,8 @@ class Test_TC_PCC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 47: { - LogStep(47, + case 48: { + LogStep(48, "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -57552,8 +58757,8 @@ class Test_TC_PCC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 48: { - LogStep(48, + case 49: { + LogStep(49, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -58682,7 +59887,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand class Test_TC_PSCFG_1_1Suite : public TestCommand { public: - Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_1_1", 7, credsIssuerConfig) + Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -58753,6 +59958,20 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -58764,7 +59983,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -58776,7 +59995,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -58814,21 +60033,28 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: TH reads the AcceptedCommandList attribute from the DUT"); + LogStep(4, "Step 4: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + PowerSourceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 6: TH reads the GeneratedCommandList attribute from the DUT"); + LogStep(5, "Step 5: TH reads the AcceptedCommandList attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + PowerSourceConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, + LogStep(6, "Step 6: TH reads the GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, + PowerSourceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -58928,7 +60154,7 @@ class Test_TC_PSCFG_2_1Suite : public TestCommand class Test_TC_RH_1_1Suite : public TestCommand { public: - Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 8, credsIssuerConfig) + Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -59006,10 +60232,26 @@ class Test_TC_RH_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -59021,7 +60263,7 @@ class Test_TC_RH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -59033,7 +60275,7 @@ class Test_TC_RH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -59071,27 +60313,34 @@ class Test_TC_RH_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); + LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 6: Read the global attribute: GeneratedCommandList"); + LogStep(6, "Step 5: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, + LogStep(7, "Step 6: Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -59620,42 +60869,43 @@ class Test_TC_SMOKECO_1_1Suite : public TestCommand } case 15: { LogStep(15, "TH reads from the DUT the EventList attribute"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } case 16: { LogStep(16, "TH reads from the DUT the EventList attribute(SmokeAlarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } case 17: { LogStep(17, "TH reads from the DUT the EventList attribute(COAlarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } case 18: { LogStep(18, "TH reads from the DUT the EventList attribute(AlarmMuted)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } case 19: { LogStep(19, "TH reads from the DUT the EventList attribute(MuteEnded)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E07"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } case 20: { LogStep(20, "TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } case 21: { LogStep(21, "TH reads from the DUT the EventList attribute(InterconnectCOAlarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E09"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, chip::NullOptional); } @@ -63885,7 +65135,7 @@ class Test_TC_SMOKECO_2_6Suite : public TestCommand class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 19, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -64024,6 +65274,21 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64035,7 +65300,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64044,7 +65309,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64053,7 +65318,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64063,7 +65328,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64075,7 +65340,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64087,7 +65352,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64101,7 +65366,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64109,7 +65374,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64193,64 +65458,73 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand } case 9: { LogStep(9, "Step 4b: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 5a: Read the global attribute: EventList "); - VerifyOrDo(!ShouldSkip(" !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + LogStep(10, "Step 4b: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 5b: Read EventList if SWTCH.S.F00(LS)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 5a: Read the global attribute: EventList "); + VerifyOrDo( + !ShouldSkip( + "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 5c: Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && !SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 5b: Read EventList if SWTCH.S.F00(LS)"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), + LogStep(13, "Step 5c: Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && !SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04"), + LogStep(14, "Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04"), + LogStep(15, "Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04"), + LogStep(16, "Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + LogStep(17, "Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 7: Read the global attribute: GeneratedCommandList"); + LogStep(18, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -64378,7 +65652,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand class Test_TC_TMP_1_1Suite : public TestCommand { public: - Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 8, credsIssuerConfig) + Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -64456,10 +65730,26 @@ class Test_TC_TMP_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64471,7 +65761,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64483,7 +65773,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -64521,27 +65811,34 @@ class Test_TC_TMP_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: Read AcceptedCommandList attribute from the DUT"); + LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 6: Read GeneratedCommandList attribute from the DUT"); + LogStep(6, "Step 5: Read AcceptedCommandList attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + TemperatureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, + LogStep(7, "Step 6: Read GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -64696,7 +65993,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 25, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 26, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -64828,7 +66125,14 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 11: @@ -64837,7 +66141,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; case 12: @@ -64846,7 +66150,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 13: @@ -64855,7 +66159,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 14: @@ -64864,10 +66168,19 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + } + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64878,7 +66191,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64889,7 +66202,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64900,7 +66213,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64911,7 +66224,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64920,7 +66233,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64932,7 +66245,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64944,7 +66257,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64953,7 +66266,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -64962,7 +66275,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -65038,94 +66351,101 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } case 9: { LogStep(9, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Step 5a: Read the global attribute: AcceptedCommandList"); + LogStep(19, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 20: { + LogStep(20, "Step 5a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); + case 21: { + LogStep(21, "Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Step 6a: Read the global attribute: GeneratedCommandList"); + case 22: { + LogStep(22, "Step 6a: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); + case 23: { + LogStep(23, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); + case 24: { + LogStep(24, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, + case 25: { + LogStep(25, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -66312,7 +67632,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand class Test_TC_TSUIC_1_1Suite : public TestCommand { public: - Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 7, credsIssuerConfig) + Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -66385,6 +67705,22 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66396,7 +67732,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66408,7 +67744,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -66446,23 +67782,30 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 5: Read the global attribute: AcceptedCommandList"); + LogStep(4, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Step 6: Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Step 6: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, + case 7: { + LogStep(7, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -67163,7 +68506,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand { public: Test_TC_DGTHREAD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_1_1", 20, credsIssuerConfig) + TestCommand("Test_TC_DGTHREAD_1_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -67291,10 +68634,40 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 59UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 60UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 61UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 62UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67310,7 +68683,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67352,7 +68725,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67361,7 +68734,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67370,7 +68743,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67379,7 +68752,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67391,7 +68764,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67400,7 +68773,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67409,7 +68782,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67421,7 +68794,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67430,7 +68803,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -67502,77 +68875,85 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand } case 7: { LogStep(7, "Step 4a: TH reads mandatory attributes in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4b: TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4a: TH reads mandatory attributes in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4c: TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4b: TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4d: TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 4c: TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4e: Read the optional attribute (ActiveTimestamp) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4d: TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4f: Read the optional attribute (PendingTimestamp) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 4e: Read the optional attribute (ActiveTimestamp) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 4g: Read the optional attribute (Delay) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 4f: Read the optional attribute (PendingTimestamp) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGTHREAD.S.E00 && !DGTHREAD.S.E01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 4g: Read the optional attribute (Delay) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 5a: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGTHREAD.S.E00 && !DGTHREAD.S.E01 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 6a: TH reads AcceptedCommandList from DUT"); + LogStep(17, "Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); + } + case 18: { + LogStep(18, "Step 6a: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip(" !DGTHREAD.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Step 6b: TH reads AcceptedCommandList from DUT"); + case 19: { + LogStep(19, "Step 6b: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Step 7: TH reads GeneratedCommandList from DUT"); + case 20: { + LogStep(20, "Step 7: TH reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -68939,7 +70320,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand { public: Test_TC_TIMESYNC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TIMESYNC_1_1", 35, credsIssuerConfig) + TestCommand("Test_TC_TIMESYNC_1_1", 36, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69076,7 +70457,13 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 12: @@ -69084,10 +70471,18 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); + } + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69100,7 +70495,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69113,7 +70508,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 11UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69122,7 +70517,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69131,7 +70526,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 12UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69139,7 +70534,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69147,7 +70542,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 9UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69155,7 +70550,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69163,7 +70558,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69171,7 +70566,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69181,7 +70576,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69191,7 +70586,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69199,7 +70594,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69207,7 +70602,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69215,7 +70610,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69224,7 +70619,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69233,7 +70628,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69241,7 +70636,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69249,7 +70644,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69257,7 +70652,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69265,7 +70660,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69273,7 +70668,7 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69358,147 +70753,155 @@ class Test_TC_TIMESYNC_1_1Suite : public TestCommand } case 10: { LogStep(10, "TS4: Check for mandatory attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "TS4: Check for optional attribute TimeSource in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TS4: Check for mandatory attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TS4: Check for optional attribute TimeSource not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "TS4: Check for optional attribute TimeSource in AttributeList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "TS4: Check for TZ feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "TS4: Check for optional attribute TimeSource not in AttributeList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "TS4: Check for TZ feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "TS4: Check for TZ feature-based attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "TS4: Check for NTPC feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "TS4: Check for TZ feature-based attributes not in AttributeList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "TS4: Check for NTPC feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "TS4: Check for NTPC feature-based attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "TS4: Check for NTPS feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "TS4: Check for NTPC feature-based attributes not in AttributeList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "TS4: Check for NTPS feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "TS4: Check for NTPS feature-based attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "TS4: Check for TSC feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "TS4: Check for NTPS feature-based attributes not in AttributeList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "TS4: Check for TSC feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "TS4: Check for TSC feature-based attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "TS5: Check for mandatory events in EventList"); + LogStep(21, "TS4: Check for TSC feature-based attributes not in AttributeList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); + TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "TS5: Check for TZ feature-based events in EventList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "TS5: Check for mandatory events in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "TS5: Check for TZ feature-based events not in EventList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "TS5: Check for TZ feature-based events in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "TS5: Check for TSC feature-based events in EventList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "TS5: Check for TZ feature-based events not in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "TS5: Check for TSC feature-based events not in EventList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "TS5: Check for TSC feature-based events in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "TS6: Check for mandatory commands in AcceptedCommandList"); + LogStep(26, "TS5: Check for TSC feature-based events not in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "TS6: Check for TZ feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "TS6: Check for mandatory commands in AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "TS6: Check for TZ feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "TS6: Check for TZ feature-based commands in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 29: { - LogStep(29, "TS6: Check for NTPC feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(29, "TS6: Check for TZ feature-based commands in not AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 30: { - LogStep(30, "TS6: Check for NTPC feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(30, "TS6: Check for NTPC feature-based commands in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 31: { - LogStep(31, "TS6: Check for TSC feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(31, "TS6: Check for NTPC feature-based commands in not AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 32: { - LogStep(32, "TS6: Check for TSC feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(32, "TS6: Check for TSC feature-based commands in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 33: { - LogStep(33, "TS6: Check for TZ feature-based commands in AcceptedCommandList"); + LogStep(33, "TS6: Check for TSC feature-based commands in not AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, + TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 34: { + LogStep(34, "TS6: Check for TZ feature-based commands in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "TS6: Check for TZ feature-based commands in not AcceptedCommandList"); + case 35: { + LogStep(35, "TS6: Check for TZ feature-based commands in not AcceptedCommandList"); VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, TimeSynchronization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -69677,7 +71080,7 @@ class Test_TC_TIMESYNC_2_3Suite : public TestCommand class Test_TC_ULABEL_1_1Suite : public TestCommand { public: - Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 8, credsIssuerConfig) + Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69749,7 +71152,17 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -69763,6 +71176,10 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -69799,12 +71216,18 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("ULABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: Read the global attribute: AttributeList. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -69819,8 +71242,8 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Step 5: Read the global attribute: EventList. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -69834,8 +71257,8 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, + case 7: { + LogStep(7, "Step 6: Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -69849,8 +71272,8 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 7: Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -70358,7 +71781,7 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand class Test_TC_DGWIFI_1_1Suite : public TestCommand { public: - Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 16, credsIssuerConfig) + Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70451,6 +71874,24 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70463,7 +71904,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70473,7 +71914,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70482,7 +71923,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70494,7 +71935,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70503,7 +71944,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70515,7 +71956,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70527,7 +71968,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70536,7 +71977,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70545,7 +71986,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -70601,66 +72042,73 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand } case 5: { LogStep(5, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4b: TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4c: TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4b: TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4d: TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4c: TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 5a: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGWIFI.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4d: TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 5b: TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 5a: TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip(" !DGWIFI.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 6: TH reads GeneratedCommandList from DUT"); + LogStep(11, "Step 5b: TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 7a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 6: TH reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); + WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 7a: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } @@ -71121,7 +72569,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand class Test_TC_WNCV_1_1Suite : public TestCommand { public: - Test_TC_WNCV_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_1_1", 20, credsIssuerConfig) + Test_TC_WNCV_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_1_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71248,10 +72696,28 @@ class Test_TC_WNCV_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); + } + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71261,7 +72727,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71271,7 +72737,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71281,7 +72747,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71291,7 +72757,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71303,7 +72769,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71314,7 +72780,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71323,7 +72789,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71332,7 +72798,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71341,7 +72807,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -71420,73 +72886,80 @@ class Test_TC_WNCV_1_1Suite : public TestCommand } case 8: { LogStep(8, "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList"); + LogStep(10, "Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList"); + VerifyOrDo(!ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList"); + case 12: { + LogStep(12, "Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList"); + case 13: { + LogStep(13, "Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList"); + case 14: { + LogStep(14, "Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 5: Read the global attribute: EventList"); + case 15: { + LogStep(15, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::EventList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute"); + case 16: { + LogStep(16, "Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute"); VerifyOrDo(!ShouldSkip("WNCV.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList"); + case 17: { + LogStep(17, "Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList"); + case 18: { + LogStep(18, "Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList"); + case 19: { + LogStep(19, "Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute"); + case 20: { + LogStep(20, "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute"); VerifyOrDo(!ShouldSkip("WNCV.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -89893,7 +91366,7 @@ class TestBasicInformationSuite : public TestCommand { public: TestBasicInformationSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestBasicInformation", 19, credsIssuerConfig) + TestCommand("TestBasicInformation", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90018,15 +91491,76 @@ class TestBasicInformationSuite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 7UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 8UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 9UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); + VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 10UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); + VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 11UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); + VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 12UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); + VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(), 13UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 14)); + VerifyOrReturn(CheckValue("attributeList[14]", iter_0.GetValue(), 14UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 15)); + VerifyOrReturn(CheckValue("attributeList[15]", iter_0.GetValue(), 15UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); + VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(), 16UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); + VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 18UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); + VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 19UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); + VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 20UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); + VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 21)); + VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 22)); + VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 23)); + VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 24)); + VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 25)); + } } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); + } break; case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -90034,7 +91568,7 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("My node", 7))); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -90042,10 +91576,10 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckValue("localConfigDisabled", value, false)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -90053,15 +91587,15 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -90069,10 +91603,10 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("My node", 7))); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -90080,10 +91614,10 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; @@ -90143,34 +91677,41 @@ class TestBasicInformationSuite : public TestCommand } case 5: { LogStep(5, "Read AttributeList value"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read NodeLabel"); + LogStep(6, "Read AttributeList value"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, + BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Read NodeLabel"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Write NodeLabel"); + case 8: { + LogStep(8, "Write NodeLabel"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("My nodegarbage: not in length on purpose", 7); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "Read back NodeLabel"); + case 9: { + LogStep(9, "Read back NodeLabel"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read LocalConfigDisabled"); + case 10: { + LogStep(10, "Read LocalConfigDisabled"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Write LocalConfigDisabled"); + case 11: { + LogStep(11, "Write LocalConfigDisabled"); ListFreer listFreer; bool value; value = true; @@ -90178,44 +91719,44 @@ class TestBasicInformationSuite : public TestCommand BasicInformation::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "Read back LocalConfigDisabled"); + case 12: { + LogStep(12, "Read back LocalConfigDisabled"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Reboot the device"); + case 13: { + LogStep(13, "Reboot the device"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Connect to the device again"); + case 14: { + LogStep(14, "Connect to the device again"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read back NodeLabel after reboot"); + case 15: { + LogStep(15, "Read back NodeLabel after reboot"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Restore initial NodeLabel value"); + case 16: { + LogStep(16, "Restore initial NodeLabel value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("garbage: not in length on purpose", 0); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Read back LocalConfigDisabled after reboot"); + case 17: { + LogStep(17, "Read back LocalConfigDisabled after reboot"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Restore initial LocalConfigDisabled value"); + case 18: { + LogStep(18, "Restore initial LocalConfigDisabled value"); ListFreer listFreer; bool value; value = false; @@ -90223,8 +91764,8 @@ class TestBasicInformationSuite : public TestCommand BasicInformation::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, chip::NullOptional); } - case 18: { - LogStep(18, "Read the ProductApppearance value"); + case 19: { + LogStep(19, "Read the ProductApppearance value"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); } @@ -97484,7 +99025,7 @@ class TestMultiAdminSuite : public TestCommand class Test_TC_DGSW_1_1Suite : public TestCommand { public: - Test_TC_DGSW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_1_1", 17, credsIssuerConfig) + Test_TC_DGSW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_1_1", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97568,7 +99109,11 @@ class Test_TC_DGSW_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -97577,7 +99122,7 @@ class Test_TC_DGSW_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 7: @@ -97586,7 +99131,7 @@ class Test_TC_DGSW_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 8: @@ -97595,14 +99140,23 @@ class Test_TC_DGSW_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -97611,7 +99165,7 @@ class Test_TC_DGSW_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -97623,11 +99177,11 @@ class Test_TC_DGSW_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -97636,7 +99190,7 @@ class Test_TC_DGSW_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -97648,11 +99202,11 @@ class Test_TC_DGSW_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -97698,37 +99252,43 @@ class Test_TC_DGSW_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0000 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0001 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0000 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0002 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0001 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList"); + LogStep(8, "Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0002 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList"); VerifyOrDo(!ShouldSkip("( DGSW.S.F00 || DGSW.S.A0003 ) && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, + case 10: { + LogStep(10, "Step 4f: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " @@ -97743,20 +99303,22 @@ class Test_TC_DGSW_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.E00 && DGSW.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Step 5a: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.E00 && DGSW.S.Afffa"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 5b: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGSW.S.E00 && DGSW.S.Afffa "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Step 5b: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGSW.S.E00 && DGSW.S.Afffa "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, + case 13: { + LogStep(13, "Step 5c: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " @@ -97770,20 +99332,20 @@ class Test_TC_DGSW_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Step 6a: TH reads AcceptedCommandList from DUT"); + case 14: { + LogStep(14, "Step 6a: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip("DGSW.S.F00 && DGSW.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 6b: TH reads AcceptedCommandList from DUT"); + case 15: { + LogStep(15, "Step 6b: TH reads AcceptedCommandList from DUT"); VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 && DGSW.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, + case 16: { + LogStep(16, "Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " @@ -97798,8 +99360,8 @@ class Test_TC_DGSW_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 16: { - LogStep(16, + case 17: { + LogStep(17, "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " @@ -105369,7 +106931,7 @@ class DL_SchedulesSuite : public TestCommand class Test_TC_DRLK_1_1Suite : public TestCommand { public: - Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 48, credsIssuerConfig) + Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 49, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105548,10 +107110,28 @@ class Test_TC_DRLK_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105562,7 +107142,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105573,7 +107153,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105584,7 +107164,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105593,7 +107173,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105602,7 +107182,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105611,7 +107191,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105621,7 +107201,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105630,7 +107210,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105639,7 +107219,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105648,7 +107228,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105657,7 +107237,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105666,7 +107246,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105675,7 +107255,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105684,7 +107264,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105693,7 +107273,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105702,7 +107282,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105711,7 +107291,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 43UL)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105720,7 +107300,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 44UL)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105731,7 +107311,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105740,7 +107320,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105749,7 +107329,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105759,7 +107339,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105770,7 +107350,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105781,7 +107361,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105792,7 +107372,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105801,7 +107381,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105815,7 +107395,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105824,7 +107404,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105833,7 +107413,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105842,7 +107422,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105851,7 +107431,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -105965,201 +107545,209 @@ class Test_TC_DRLK_1_1Suite : public TestCommand } case 14: { LogStep(14, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4b: TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4c: TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4b: TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 4d: TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4c: TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 4e: TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "Step 4d: TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Step 4f: TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "Step 4e: TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Step 4g: TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Step 4f: TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Step 4h: TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Step 4g: TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "Step 4i: TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "Step 4h: TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "Step 4j: TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 || DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "Step 4i: TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4k: TH reads optional attribute(Language) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "Step 4j: TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 || DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4l: TH reads optional attribute(LEDSettings) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4k: TH reads optional attribute(Language) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 4m: TH reads optional attribute(AutoRelockTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4l: TH reads optional attribute(LEDSettings) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 4n: TH reads optional attribute(SoundVolume) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 4m: TH reads optional attribute(AutoRelockTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 4o: TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 4n: TH reads optional attribute(SoundVolume) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 29: { - LogStep(29, "Step 4p: TH reads optional attribute(EnableLocalProgramming) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(29, "Step 4o: TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 30: { - LogStep(30, "Step 4q: TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(30, "Step 4p: TH reads optional attribute(EnableLocalProgramming) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 31: { - LogStep(31, "Step 4r: TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(31, "Step 4q: TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 32: { - LogStep(32, "Step 4s: TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(32, "Step 4r: TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 33: { - LogStep(33, "Step 4t: TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(33, "Step 4s: TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 34: { - LogStep(34, "Step 5a: TH reads EventList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, + LogStep(34, "Step 4t: TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 35: { - LogStep(35, "Step 5b: TH reads optional event(Door position sensor) in EventList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "Step 5a: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, chip::NullOptional); } case 36: { - LogStep(36, "Step 5c: TH reads optional event(User commands and database) in EventList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Step 5b: TH reads optional event(Door position sensor) in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, chip::NullOptional); } case 37: { - LogStep(37, "Step 6a: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, + LogStep(37, "Step 5c: TH reads optional event(User commands and database) in EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, chip::NullOptional); } case 38: { - LogStep(38, "Step 6b: TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "Step 6a: TH reads AcceptedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 39: { - LogStep(39, "Step 6c: TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Step 6b: TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 40: { - LogStep(40, "Step 6d: TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "Step 6c: TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 41: { - LogStep(41, "Step 6e: TH reads Feature dependent commands(DRLK.S.F0c) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(41, "Step 6d: TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 42: { - LogStep(42, "Step 6f: TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(42, "Step 6e: TH reads Feature dependent commands(DRLK.S.F0c) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 43: { - LogStep(43, "Step 6g: TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(43, "Step 6f: TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 44: { - LogStep(44, "Step 7a: TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); + LogStep(44, "Step 6g: TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 45: { + LogStep(45, "Step 7a: TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Step 7b: TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList"); + case 46: { + LogStep(46, "Step 7b: TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Step 7c: TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList"); + case 47: { + LogStep(47, "Step 7c: TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Step 7d: TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); + case 48: { + LogStep(48, "Step 7d: TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -113334,7 +114922,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand class Test_TC_G_1_1Suite : public TestCommand { public: - Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 8, credsIssuerConfig) + Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113414,6 +115002,20 @@ class Test_TC_G_1_1Suite : public TestCommand } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -113425,7 +115027,7 @@ class Test_TC_G_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -113439,7 +115041,7 @@ class Test_TC_G_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -113492,21 +115094,29 @@ class Test_TC_G_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: TH reads EventList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::EventList::Id, true, + LogStep(5, "Step 4: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 6: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, + LogStep(6, "Step 5: TH reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::EventList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 7: TH reads GeneratedCommandList from DUT"); + LogStep(7, "Step 6: TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Step 7: TH reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -113889,7 +115499,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand { public: Test_TC_ACFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_1_1", 13, credsIssuerConfig) + TestCommand("Test_TC_ACFREMON_1_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113987,6 +115597,20 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -113997,7 +115621,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114006,7 +115630,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114018,7 +115642,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114026,7 +115650,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114035,7 +115659,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114101,39 +115725,47 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand } case 6: { LogStep(6, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4b: Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4b: Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 5: TH reads EventList attribute from DUT"); + LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 6a: Read the global attribute: AcceptedCommandList"); + LogStep(10, "Step 5: TH reads EventList attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); + LogStep(12, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -114306,7 +115938,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand { public: Test_TC_HEPAFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_1_1", 13, credsIssuerConfig) + TestCommand("Test_TC_HEPAFREMON_1_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -114404,6 +116036,20 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114414,7 +116060,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114423,7 +116069,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114435,7 +116081,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114443,7 +116089,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114452,7 +116098,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114518,39 +116164,47 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand } case 6: { LogStep(6, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 4: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 5: TH reads EventList attribute from DUT"); + LogStep(9, "Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 6a: Read the global attribute: AcceptedCommandList"); + LogStep(10, "Step 5: TH reads EventList attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); + LogStep(12, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -138620,7 +140274,7 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand { public: Test_TC_RVCCLEANM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_1_1", 11, credsIssuerConfig) + TestCommand("Test_TC_RVCCLEANM_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -138706,7 +140360,13 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -138715,7 +140375,7 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 7: @@ -138724,10 +140384,19 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + } + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -138739,7 +140408,7 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -138753,7 +140422,7 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -138808,45 +140477,52 @@ class Test_TC_RVCCLEANM_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, + LogStep(6, "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("RVCCLEANM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList " "from the DUT"); VerifyOrDo(!ShouldSkip("RVCCLEANM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList " "from the DUT"); VerifyOrDo(!ShouldSkip(" !RVCCLEANM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the global attribute: EventList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read the global attribute: EventList from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCCLEANM.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::EventList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)"); + case 10: { + LogStep(10, "Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)"); VerifyOrDo(!ShouldSkip("RVCCLEANM.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)"); + case 11: { + LogStep(11, "Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)"); VerifyOrDo(!ShouldSkip("RVCCLEANM.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -139308,7 +140984,7 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand { public: Test_TC_RVCRUNM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_1_1", 11, credsIssuerConfig) + TestCommand("Test_TC_RVCRUNM_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -139394,7 +141070,13 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -139403,7 +141085,7 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 7: @@ -139412,10 +141094,19 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + } + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -139427,7 +141118,7 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -139441,7 +141132,7 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -139496,45 +141187,52 @@ class Test_TC_RVCRUNM_1_1Suite : public TestCommand } case 4: { LogStep(4, "TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, + LogStep(6, "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("RVCRUNM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from " "the DUT"); VerifyOrDo(!ShouldSkip("RVCRUNM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList " "from the DUT"); VerifyOrDo(!ShouldSkip(" !RVCRUNM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the global attribute: EventList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read the global attribute: EventList from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCRUNM.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::EventList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)"); + case 10: { + LogStep(10, "Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)"); VerifyOrDo(!ShouldSkip("RVCRUNM.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)"); + case 11: { + LogStep(11, "Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)"); VerifyOrDo(!ShouldSkip("RVCRUNM.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -141408,7 +143106,7 @@ class Test_TC_BIND_2_3Suite : public TestCommand class Test_TC_S_1_1Suite : public TestCommand { public: - Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 15, credsIssuerConfig) + Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141505,11 +143203,11 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); @@ -141518,12 +143216,53 @@ class Test_TC_S_1_1Suite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141541,7 +143280,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); } break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141556,7 +143295,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141574,7 +143313,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); } break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141589,7 +143328,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141604,7 +143343,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141613,7 +143352,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); } break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141622,7 +143361,7 @@ class Test_TC_S_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); } break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -141672,66 +143411,79 @@ class Test_TC_S_1_1Suite : public TestCommand } case 4: { LogStep(4, "Step 4a: Read AttributeList (global attribute 65531)"); - VerifyOrDo(!ShouldSkip("S.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && S.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 4b: Read AttributeList (global attribute 65531)"); - VerifyOrDo(!ShouldSkip("(!S.S.A0005)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 4a: Read AttributeList (global attribute 65531)"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && S.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 5: Read EventList (global attribute 65530)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::EventList::Id, true, + LogStep(6, "Step 4b: Read AttributeList (global attribute 65531)"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && (!S.S.A0005)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 6a: Read AcceptedCommandList (global attribute 65529)"); + LogStep(7, "Step 4b: Read AttributeList (global attribute 65531)"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && (!S.S.A0005)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Step 5: Read EventList (global attribute 65530)"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::EventList::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Step 6a: Read AcceptedCommandList (global attribute 65529)"); VerifyOrDo(!ShouldSkip("S.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 6b: Read AcceptedCommandList (global attribute 65529)"); + case 10: { + LogStep(10, "Step 6b: Read AcceptedCommandList (global attribute 65529)"); VerifyOrDo(!ShouldSkip("(!S.S.C40.Rsp)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 6c: Read AcceptedCommandList (global attribute 65529)"); + case 11: { + LogStep(11, "Step 6c: Read AcceptedCommandList (global attribute 65529)"); VerifyOrDo(!ShouldSkip("S.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 6d: Read AcceptedCommandList (global attribute 65529)"); + case 12: { + LogStep(12, "Step 6d: Read AcceptedCommandList (global attribute 65529)"); VerifyOrDo(!ShouldSkip("(!S.C.C40.Tx)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 7a: Read GeneratedCommandList (global attribute 65528)"); + case 13: { + LogStep(13, "Step 7a: Read GeneratedCommandList (global attribute 65528)"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, + case 14: { + LogStep(14, "Step 7b: Read optional command(EnhancedAddSceneResponse) in GeneratedCommandList (global attribute 65528)"); VerifyOrDo(!ShouldSkip("S.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, + case 15: { + LogStep(15, "Step 7c: Read optional command(EnhancedViewSceneResponse) in GeneratedCommandList (global attribute 65528)"); VerifyOrDo(!ShouldSkip("S.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Step 7d: Read optional command(CopySceneResponse) in GeneratedCommandList (global attribute 65528)"); + case 16: { + LogStep(16, "Step 7d: Read optional command(CopySceneResponse) in GeneratedCommandList (global attribute 65528)"); VerifyOrDo(!ShouldSkip("S.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 22b20b80ff9eb9..a7e81dca8316ac 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -2531,23 +2531,31 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList attribute from DUT\n"); - if (ShouldSkip("ACL.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: TH reads optional attribute (Extension) in AttributeList\n"); - if (ShouldSkip("ACL.S.A0001 && ACL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList attribute from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && ACL.S.Afffb")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeExtensionInAttributeList_4(); + err = TestStep4aThReadsAttributeListAttributeFromDut_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: TH reads optional attribute (Extension) in AttributeList\n"); + if (ShouldSkip("ACL.S.A0001 && ACL.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4bThReadsOptionalAttributeExtensionInAttributeList_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 6 : Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -2557,19 +2565,19 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads EventList attribute from DUT\n"); - if (ShouldSkip("ACL.S.Afffa")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " + " ***** Test Step 8 : Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " @@ -2579,11 +2587,11 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1. The list MAY contain values in " + " ***** Test Step 9 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1. The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -2592,11 +2600,11 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 10 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -2605,7 +2613,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; } @@ -2648,6 +2656,9 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -2661,7 +2672,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -2754,7 +2765,36 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeExtensionInAttributeList_4() + CHIP_ERROR TestStep4aThReadsAttributeListAttributeFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributeExtensionInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -2776,7 +2816,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -2787,7 +2827,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -2798,7 +2838,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -2809,7 +2849,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -6402,19 +6442,35 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_9(); - break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_11(); break; } @@ -6460,6 +6516,9 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -6473,7 +6532,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -6639,7 +6698,33 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_9() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6658,7 +6743,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6853,27 +6938,39 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 7: Read the global attribute: EventList\n"); - if (ShouldSkip("BOOL.S.E00")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BOOL.S.E00")) { NextTest(); return; } NextTest(); return; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: Read the global attribute: EventList\n"); - if (ShouldSkip(" !BOOL.S.E00 ")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !BOOL.S.E00 ")) { NextTest(); return; } @@ -6914,6 +7011,9 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -6927,7 +7027,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -7017,7 +7117,33 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7041,7 +7167,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7356,7 +7482,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5a: TH reads optional event(StartUp) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E00")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E00")) { NextTest(); return; } @@ -7364,7 +7490,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5b: TH reads optional attribute(ShutDown) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E01")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E01")) { NextTest(); return; } @@ -7372,7 +7498,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5c: TH reads optional attribute(Leave) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E02")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E02")) { NextTest(); return; } @@ -8024,31 +8150,43 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: Read the optional attribute(SetupURL) in AttributeList\n"); - if (ShouldSkip("ACT.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeSetupURLInAttributeList_4(); + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(SetupURL) in AttributeList\n"); + if (ShouldSkip("ACT.S.A0002")) { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut_5(); + err = TestStep4bReadTheOptionalAttributeSetupURLInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestStep5ThReadsEventListAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_8(); break; } @@ -8085,6 +8223,9 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8098,7 +8239,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -8189,7 +8330,34 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeSetupURLInAttributeList_4() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeSetupURLInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8210,7 +8378,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThReadsEventListAttributeFromDut_5() + CHIP_ERROR TestStep5ThReadsEventListAttributeFromDut_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -8220,7 +8388,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_6() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8240,7 +8408,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_7() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8325,15 +8493,23 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("BIND.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BIND.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && BIND.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -8343,11 +8519,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -8356,11 +8532,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -8369,11 +8545,11 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -8382,7 +8558,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; } @@ -8419,6 +8595,9 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8432,7 +8611,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -8522,8 +8701,34 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -8534,7 +8739,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -8545,7 +8750,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -8556,7 +8761,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -8668,602 +8873,618 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4b: Read the optional attribute(CurrentHue) in AttributeList\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeCurrentHueInAttributeList_9(); + err = TestStep4aReadTheGlobalAttributeAttributeList_9(); break; case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4b: Read the optional attribute(CurrentHue) in AttributeList\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeCurrentHueInAttributeList_10(); + break; + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 4c: Read the optional attribute(CurrentSaturation) in AttributeList\n"); + chipTool, " ***** Test Step 11 : Step 4c: Read the optional attribute(CurrentSaturation) in AttributeList\n"); if (ShouldSkip("CC.S.A0001")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeCurrentSaturationInAttributeList_10(); + err = TestStep4cReadTheOptionalAttributeCurrentSaturationInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 4d: Read the optional attribute(RemainingTime) in AttributeList\n"); + chipTool, " ***** Test Step 12 : Step 4d: Read the optional attribute(RemainingTime) in AttributeList\n"); if (ShouldSkip("CC.S.A0002")) { NextTest(); return; } - err = TestStep4dReadTheOptionalAttributeRemainingTimeInAttributeList_11(); + err = TestStep4dReadTheOptionalAttributeRemainingTimeInAttributeList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4e: Read the optional attribute(CurrentX) in AttributeList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4e: Read the optional attribute(CurrentX) in AttributeList\n"); if (ShouldSkip("CC.S.A0003")) { NextTest(); return; } - err = TestStep4eReadTheOptionalAttributeCurrentXInAttributeList_12(); + err = TestStep4eReadTheOptionalAttributeCurrentXInAttributeList_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4f: Read the optional attribute(CurrentY) in AttributeList\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4f: Read the optional attribute(CurrentY) in AttributeList\n"); if (ShouldSkip("CC.S.A0004")) { NextTest(); return; } - err = TestStep4fReadTheOptionalAttributeCurrentYInAttributeList_13(); + err = TestStep4fReadTheOptionalAttributeCurrentYInAttributeList_14(); break; - case 14: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 4g: Read the optional attribute(DriftCompensation) in AttributeList\n"); + chipTool, " ***** Test Step 15 : Step 4g: Read the optional attribute(DriftCompensation) in AttributeList\n"); if (ShouldSkip("CC.S.A0005")) { NextTest(); return; } - err = TestStep4gReadTheOptionalAttributeDriftCompensationInAttributeList_14(); + err = TestStep4gReadTheOptionalAttributeDriftCompensationInAttributeList_15(); break; - case 15: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 4h: Read the optional attribute(CompensationText) in AttributeList\n"); + chipTool, " ***** Test Step 16 : Step 4h: Read the optional attribute(CompensationText) in AttributeList\n"); if (ShouldSkip("CC.S.A0006")) { NextTest(); return; } - err = TestStep4hReadTheOptionalAttributeCompensationTextInAttributeList_15(); + err = TestStep4hReadTheOptionalAttributeCompensationTextInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 4i: Read the optional attribute(ColorTemperatureMireds) in AttributeList\n"); + chipTool, " ***** Test Step 17 : Step 4i: Read the optional attribute(ColorTemperatureMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A0007")) { NextTest(); return; } - err = TestStep4iReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_16(); + err = TestStep4iReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 4j: Read the optional attribute(NumberOfPrimaries) in AttributeList\n"); + chipTool, " ***** Test Step 18 : Step 4j: Read the optional attribute(NumberOfPrimaries) in AttributeList\n"); if (ShouldSkip("CC.S.A0010")) { NextTest(); return; } - err = TestStep4jReadTheOptionalAttributeNumberOfPrimariesInAttributeList_17(); + err = TestStep4jReadTheOptionalAttributeNumberOfPrimariesInAttributeList_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 4k: Read the optional attribute(Primary1X) in AttributeList\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4k: Read the optional attribute(Primary1X) in AttributeList\n"); if (ShouldSkip("CC.S.A0011")) { NextTest(); return; } - err = TestStep4kReadTheOptionalAttributePrimary1XInAttributeList_18(); + err = TestStep4kReadTheOptionalAttributePrimary1XInAttributeList_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4l: Read the optional attribute(Primary1Y) in AttributeList\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 4l: Read the optional attribute(Primary1Y) in AttributeList\n"); if (ShouldSkip("CC.S.A0012")) { NextTest(); return; } - err = TestStep4lReadTheOptionalAttributePrimary1YInAttributeList_19(); + err = TestStep4lReadTheOptionalAttributePrimary1YInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress( - chipTool, " ***** Test Step 20 : Step 4m: Read the optional attribute(Primary1Intensity) in AttributeList\n"); + chipTool, " ***** Test Step 21 : Step 4m: Read the optional attribute(Primary1Intensity) in AttributeList\n"); if (ShouldSkip("CC.S.A0013")) { NextTest(); return; } - err = TestStep4mReadTheOptionalAttributePrimary1IntensityInAttributeList_20(); + err = TestStep4mReadTheOptionalAttributePrimary1IntensityInAttributeList_21(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4n: Read the optional attribute(Primary2X) in AttributeList\n"); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4n: Read the optional attribute(Primary2X) in AttributeList\n"); if (ShouldSkip("CC.S.A0015")) { NextTest(); return; } - err = TestStep4nReadTheOptionalAttributePrimary2XInAttributeList_21(); + err = TestStep4nReadTheOptionalAttributePrimary2XInAttributeList_22(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4o: Read the optional attribute(Primary2Y) in AttributeList\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4o: Read the optional attribute(Primary2Y) in AttributeList\n"); if (ShouldSkip("CC.S.A0016")) { NextTest(); return; } - err = TestStep4oReadTheOptionalAttributePrimary2YInAttributeList_22(); + err = TestStep4oReadTheOptionalAttributePrimary2YInAttributeList_23(); break; - case 23: + case 24: ChipLogProgress( - chipTool, " ***** Test Step 23 : Step 4p: Read the optional attribute(Primary2Intensity) in AttributeList\n"); + chipTool, " ***** Test Step 24 : Step 4p: Read the optional attribute(Primary2Intensity) in AttributeList\n"); if (ShouldSkip("CC.S.A0017")) { NextTest(); return; } - err = TestStep4pReadTheOptionalAttributePrimary2IntensityInAttributeList_23(); + err = TestStep4pReadTheOptionalAttributePrimary2IntensityInAttributeList_24(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Step 4q: Read the optional attribute(Primary3X) in AttributeList\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4q: Read the optional attribute(Primary3X) in AttributeList\n"); if (ShouldSkip("CC.S.A0019")) { NextTest(); return; } - err = TestStep4qReadTheOptionalAttributePrimary3XInAttributeList_24(); + err = TestStep4qReadTheOptionalAttributePrimary3XInAttributeList_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4r: Read the optional attribute(Primary3Y) in AttributeList\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 4r: Read the optional attribute(Primary3Y) in AttributeList\n"); if (ShouldSkip("CC.S.A001a")) { NextTest(); return; } - err = TestStep4rReadTheOptionalAttributePrimary3YInAttributeList_25(); + err = TestStep4rReadTheOptionalAttributePrimary3YInAttributeList_26(); break; - case 26: + case 27: ChipLogProgress( - chipTool, " ***** Test Step 26 : Step 4s: Read the optional attribute(Primary3Intensity) in AttributeList\n"); + chipTool, " ***** Test Step 27 : Step 4s: Read the optional attribute(Primary3Intensity) in AttributeList\n"); if (ShouldSkip("CC.S.A001b")) { NextTest(); return; } - err = TestStep4sReadTheOptionalAttributePrimary3IntensityInAttributeList_26(); + err = TestStep4sReadTheOptionalAttributePrimary3IntensityInAttributeList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 4t: Read the optional attribute(Primary4X) in AttributeList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4t: Read the optional attribute(Primary4X) in AttributeList\n"); if (ShouldSkip("CC.S.A0020")) { NextTest(); return; } - err = TestStep4tReadTheOptionalAttributePrimary4XInAttributeList_27(); + err = TestStep4tReadTheOptionalAttributePrimary4XInAttributeList_28(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4u: Read the optional attribute(Primary4Y) in AttributeList\n"); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 4u: Read the optional attribute(Primary4Y) in AttributeList\n"); if (ShouldSkip("CC.S.A0021")) { NextTest(); return; } - err = TestStep4uReadTheOptionalAttributePrimary4YInAttributeList_28(); + err = TestStep4uReadTheOptionalAttributePrimary4YInAttributeList_29(); break; - case 29: + case 30: ChipLogProgress( - chipTool, " ***** Test Step 29 : Step 4v: Read the optional attribute(Primary4Intensity) in AttributeList\n"); + chipTool, " ***** Test Step 30 : Step 4v: Read the optional attribute(Primary4Intensity) in AttributeList\n"); if (ShouldSkip("CC.S.A0022")) { NextTest(); return; } - err = TestStep4vReadTheOptionalAttributePrimary4IntensityInAttributeList_29(); + err = TestStep4vReadTheOptionalAttributePrimary4IntensityInAttributeList_30(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 4w: Read the optional attribute(Primary5X) in AttributeList\n"); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Step 4w: Read the optional attribute(Primary5X) in AttributeList\n"); if (ShouldSkip("CC.S.A0024")) { NextTest(); return; } - err = TestStep4wReadTheOptionalAttributePrimary5XInAttributeList_30(); + err = TestStep4wReadTheOptionalAttributePrimary5XInAttributeList_31(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Step 4x: Read the optional attribute(Primary5Y) in AttributeList\n"); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Step 4x: Read the optional attribute(Primary5Y) in AttributeList\n"); if (ShouldSkip("CC.S.A0025")) { NextTest(); return; } - err = TestStep4xReadTheOptionalAttributePrimary5YInAttributeList_31(); + err = TestStep4xReadTheOptionalAttributePrimary5YInAttributeList_32(); break; - case 32: + case 33: ChipLogProgress( - chipTool, " ***** Test Step 32 : Step 4y: Read the optional attribute(Primary5Intensity) in AttributeList\n"); + chipTool, " ***** Test Step 33 : Step 4y: Read the optional attribute(Primary5Intensity) in AttributeList\n"); if (ShouldSkip("CC.S.A0026")) { NextTest(); return; } - err = TestStep4yReadTheOptionalAttributePrimary5IntensityInAttributeList_32(); + err = TestStep4yReadTheOptionalAttributePrimary5IntensityInAttributeList_33(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Step 4z: Read the optional attribute(Primary6X) in AttributeList\n"); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Step 4z: Read the optional attribute(Primary6X) in AttributeList\n"); if (ShouldSkip("CC.S.A0028")) { NextTest(); return; } - err = TestStep4zReadTheOptionalAttributePrimary6XInAttributeList_33(); + err = TestStep4zReadTheOptionalAttributePrimary6XInAttributeList_34(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Step 4a1: Read the optional attribute(Primary6Y) in AttributeList\n"); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Step 4a1: Read the optional attribute(Primary6Y) in AttributeList\n"); if (ShouldSkip("CC.S.A0029")) { NextTest(); return; } - err = TestStep4a1ReadTheOptionalAttributePrimary6YInAttributeList_34(); + err = TestStep4a1ReadTheOptionalAttributePrimary6YInAttributeList_35(); break; - case 35: + case 36: ChipLogProgress( - chipTool, " ***** Test Step 35 : Step 4a2: Read the optional attribute(Primary6Intensity) in AttributeList\n"); + chipTool, " ***** Test Step 36 : Step 4a2: Read the optional attribute(Primary6Intensity) in AttributeList\n"); if (ShouldSkip("CC.S.A002a")) { NextTest(); return; } - err = TestStep4a2ReadTheOptionalAttributePrimary6IntensityInAttributeList_35(); + err = TestStep4a2ReadTheOptionalAttributePrimary6IntensityInAttributeList_36(); break; - case 36: + case 37: ChipLogProgress( - chipTool, " ***** Test Step 36 : Step 4a3: Read the optional attribute(WhitePointX) in AttributeList\n"); + chipTool, " ***** Test Step 37 : Step 4a3: Read the optional attribute(WhitePointX) in AttributeList\n"); if (ShouldSkip("CC.S.A0030")) { NextTest(); return; } - err = TestStep4a3ReadTheOptionalAttributeWhitePointXInAttributeList_36(); + err = TestStep4a3ReadTheOptionalAttributeWhitePointXInAttributeList_37(); break; - case 37: + case 38: ChipLogProgress( - chipTool, " ***** Test Step 37 : Step 4a4: Read the optional attribute(WhitePointY) in AttributeList\n"); + chipTool, " ***** Test Step 38 : Step 4a4: Read the optional attribute(WhitePointY) in AttributeList\n"); if (ShouldSkip("CC.S.A0031")) { NextTest(); return; } - err = TestStep4a4ReadTheOptionalAttributeWhitePointYInAttributeList_37(); + err = TestStep4a4ReadTheOptionalAttributeWhitePointYInAttributeList_38(); break; - case 38: + case 39: ChipLogProgress( - chipTool, " ***** Test Step 38 : Step 4a5: Read the optional attribute(ColorPointRX) in AttributeList\n"); + chipTool, " ***** Test Step 39 : Step 4a5: Read the optional attribute(ColorPointRX) in AttributeList\n"); if (ShouldSkip("CC.S.A0032")) { NextTest(); return; } - err = TestStep4a5ReadTheOptionalAttributeColorPointRXInAttributeList_38(); + err = TestStep4a5ReadTheOptionalAttributeColorPointRXInAttributeList_39(); break; - case 39: + case 40: ChipLogProgress( - chipTool, " ***** Test Step 39 : Step 4a6: Read the optional attribute(ColorPointRY) in AttributeList\n"); + chipTool, " ***** Test Step 40 : Step 4a6: Read the optional attribute(ColorPointRY) in AttributeList\n"); if (ShouldSkip("CC.S.A0033")) { NextTest(); return; } - err = TestStep4a6ReadTheOptionalAttributeColorPointRYInAttributeList_39(); + err = TestStep4a6ReadTheOptionalAttributeColorPointRYInAttributeList_40(); break; - case 40: + case 41: ChipLogProgress( - chipTool, " ***** Test Step 40 : Step 4a7: Read the optional attribute(ColorPointRIntensity) in AttributeList\n"); + chipTool, " ***** Test Step 41 : Step 4a7: Read the optional attribute(ColorPointRIntensity) in AttributeList\n"); if (ShouldSkip("CC.S.A0034")) { NextTest(); return; } - err = TestStep4a7ReadTheOptionalAttributeColorPointRIntensityInAttributeList_40(); + err = TestStep4a7ReadTheOptionalAttributeColorPointRIntensityInAttributeList_41(); break; - case 41: + case 42: ChipLogProgress( - chipTool, " ***** Test Step 41 : Step 4a8: Read the optional attribute(ColorPointGX) in AttributeList\n"); + chipTool, " ***** Test Step 42 : Step 4a8: Read the optional attribute(ColorPointGX) in AttributeList\n"); if (ShouldSkip("CC.S.A0036")) { NextTest(); return; } - err = TestStep4a8ReadTheOptionalAttributeColorPointGXInAttributeList_41(); + err = TestStep4a8ReadTheOptionalAttributeColorPointGXInAttributeList_42(); break; - case 42: + case 43: ChipLogProgress( - chipTool, " ***** Test Step 42 : Step 4a9: Read the optional attribute(ColorPointGY) in AttributeList\n"); + chipTool, " ***** Test Step 43 : Step 4a9: Read the optional attribute(ColorPointGY) in AttributeList\n"); if (ShouldSkip("CC.S.A0037")) { NextTest(); return; } - err = TestStep4a9ReadTheOptionalAttributeColorPointGYInAttributeList_42(); + err = TestStep4a9ReadTheOptionalAttributeColorPointGYInAttributeList_43(); break; - case 43: + case 44: ChipLogProgress( - chipTool, " ***** Test Step 43 : Step 4a10: Read the optional attribute(ColorPointGIntensity) in AttributeList\n"); + chipTool, " ***** Test Step 44 : Step 4a10: Read the optional attribute(ColorPointGIntensity) in AttributeList\n"); if (ShouldSkip("CC.S.A0038")) { NextTest(); return; } - err = TestStep4a10ReadTheOptionalAttributeColorPointGIntensityInAttributeList_43(); + err = TestStep4a10ReadTheOptionalAttributeColorPointGIntensityInAttributeList_44(); break; - case 44: + case 45: ChipLogProgress( - chipTool, " ***** Test Step 44 : Step 4a11: Read the optional attribute(ColorPointBX) in AttributeList\n"); + chipTool, " ***** Test Step 45 : Step 4a11: Read the optional attribute(ColorPointBX) in AttributeList\n"); if (ShouldSkip("CC.S.A003a")) { NextTest(); return; } - err = TestStep4a11ReadTheOptionalAttributeColorPointBXInAttributeList_44(); + err = TestStep4a11ReadTheOptionalAttributeColorPointBXInAttributeList_45(); break; - case 45: + case 46: ChipLogProgress( - chipTool, " ***** Test Step 45 : Step 4a12: Read the optional attribute(ColorPointBY) in AttributeList\n"); + chipTool, " ***** Test Step 46 : Step 4a12: Read the optional attribute(ColorPointBY) in AttributeList\n"); if (ShouldSkip("CC.S.A003b")) { NextTest(); return; } - err = TestStep4a12ReadTheOptionalAttributeColorPointBYInAttributeList_45(); + err = TestStep4a12ReadTheOptionalAttributeColorPointBYInAttributeList_46(); break; - case 46: + case 47: ChipLogProgress( - chipTool, " ***** Test Step 46 : Step 4a13: Read the optional attribute(ColorPointBIntensity) in AttributeList\n"); + chipTool, " ***** Test Step 47 : Step 4a13: Read the optional attribute(ColorPointBIntensity) in AttributeList\n"); if (ShouldSkip("CC.S.A003c")) { NextTest(); return; } - err = TestStep4a13ReadTheOptionalAttributeColorPointBIntensityInAttributeList_46(); + err = TestStep4a13ReadTheOptionalAttributeColorPointBIntensityInAttributeList_47(); break; - case 47: + case 48: ChipLogProgress( - chipTool, " ***** Test Step 47 : Step 4a14: Read the optional attribute(EnhancedCurrentHue) in AttributeList\n"); + chipTool, " ***** Test Step 48 : Step 4a14: Read the optional attribute(EnhancedCurrentHue) in AttributeList\n"); if (ShouldSkip("CC.S.A4000")) { NextTest(); return; } - err = TestStep4a14ReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_47(); + err = TestStep4a14ReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_48(); break; - case 48: + case 49: ChipLogProgress( - chipTool, " ***** Test Step 48 : Step 4a15: Read the optional attribute(ColorLoopActive) in AttributeList\n"); + chipTool, " ***** Test Step 49 : Step 4a15: Read the optional attribute(ColorLoopActive) in AttributeList\n"); if (ShouldSkip("CC.S.A4002")) { NextTest(); return; } - err = TestStep4a15ReadTheOptionalAttributeColorLoopActiveInAttributeList_48(); + err = TestStep4a15ReadTheOptionalAttributeColorLoopActiveInAttributeList_49(); break; - case 49: + case 50: ChipLogProgress( - chipTool, " ***** Test Step 49 : Step 4a16: Read the optional attribute(ColorLoopDirection) in AttributeList\n"); + chipTool, " ***** Test Step 50 : Step 4a16: Read the optional attribute(ColorLoopDirection) in AttributeList\n"); if (ShouldSkip("CC.S.A4003")) { NextTest(); return; } - err = TestStep4a16ReadTheOptionalAttributeColorLoopDirectionInAttributeList_49(); + err = TestStep4a16ReadTheOptionalAttributeColorLoopDirectionInAttributeList_50(); break; - case 50: + case 51: ChipLogProgress( - chipTool, " ***** Test Step 50 : Step 4a17: Read the optional attribute(ColorLoopTime) in AttributeList\n"); + chipTool, " ***** Test Step 51 : Step 4a17: Read the optional attribute(ColorLoopTime) in AttributeList\n"); if (ShouldSkip("CC.S.A4004")) { NextTest(); return; } - err = TestStep4a17ReadTheOptionalAttributeColorLoopTimeInAttributeList_50(); + err = TestStep4a17ReadTheOptionalAttributeColorLoopTimeInAttributeList_51(); break; - case 51: + case 52: ChipLogProgress(chipTool, - " ***** Test Step 51 : Step 4a18: Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList\n"); + " ***** Test Step 52 : Step 4a18: Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList\n"); if (ShouldSkip("CC.S.A4005")) { NextTest(); return; } - err = TestStep4a18ReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_51(); + err = TestStep4a18ReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_52(); break; - case 52: + case 53: ChipLogProgress(chipTool, - " ***** Test Step 52 : Step 4a19: Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList\n"); + " ***** Test Step 53 : Step 4a19: Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList\n"); if (ShouldSkip("CC.S.A4006")) { NextTest(); return; } - err = TestStep4a19ReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_52(); + err = TestStep4a19ReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_53(); break; - case 53: + case 54: ChipLogProgress(chipTool, - " ***** Test Step 53 : Step 4a20: Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList\n"); + " ***** Test Step 54 : Step 4a20: Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A400b")) { NextTest(); return; } - err = TestStep4a20ReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_53(); + err = TestStep4a20ReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_54(); break; - case 54: + case 55: ChipLogProgress(chipTool, - " ***** Test Step 54 : Step 4a21: Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList\n"); + " ***** Test Step 55 : Step 4a21: Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A400c")) { NextTest(); return; } - err = TestStep4a21ReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_54(); + err = TestStep4a21ReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_55(); break; - case 55: + case 56: ChipLogProgress(chipTool, - " ***** Test Step 55 : Step 4a22: Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList\n"); + " ***** Test Step 56 : Step 4a22: Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A400d")) { NextTest(); return; } - err = TestStep4a22ReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_55(); + err = TestStep4a22ReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_56(); break; - case 56: + case 57: ChipLogProgress(chipTool, - " ***** Test Step 56 : Step 4a23: Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList\n"); + " ***** Test Step 57 : Step 4a23: Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList\n"); if (ShouldSkip("CC.S.A4010")) { NextTest(); return; } - err = TestStep4a23ReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_56(); + err = TestStep4a23ReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_57(); break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Step 5: Read the global attribute: EventList\n"); + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 58: + case 59: ChipLogProgress( - chipTool, " ***** Test Step 58 : Step 6a: Read the optional command(MoveToHue) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 59 : Step 6a: Read the optional command(MoveToHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6aReadTheOptionalCommandMoveToHueInAcceptedCommandList_58(); + err = TestStep6aReadTheOptionalCommandMoveToHueInAcceptedCommandList_59(); break; - case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Step 6b: Read the optional command(MoveHue) in AcceptedCommandList\n"); + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : Step 6b: Read the optional command(MoveHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C01.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandMoveHueInAcceptedCommandList_59(); + err = TestStep6bReadTheOptionalCommandMoveHueInAcceptedCommandList_60(); break; - case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Step 6c: Read the optional command(StepHue) in AcceptedCommandList\n"); + case 61: + ChipLogProgress(chipTool, " ***** Test Step 61 : Step 6c: Read the optional command(StepHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C02.Rsp")) { NextTest(); return; } - err = TestStep6cReadTheOptionalCommandStepHueInAcceptedCommandList_60(); + err = TestStep6cReadTheOptionalCommandStepHueInAcceptedCommandList_61(); break; - case 61: + case 62: ChipLogProgress( - chipTool, " ***** Test Step 61 : Step 6d: Read the optional command(MoveToSaturation) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 62 : Step 6d: Read the optional command(MoveToSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C03.Rsp")) { NextTest(); return; } - err = TestStep6dReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_61(); + err = TestStep6dReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_62(); break; - case 62: + case 63: ChipLogProgress( - chipTool, " ***** Test Step 62 : Step 6e: Read the optional command(MoveSaturation) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 63 : Step 6e: Read the optional command(MoveSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C04.Rsp")) { NextTest(); return; } - err = TestStep6eReadTheOptionalCommandMoveSaturationInAcceptedCommandList_62(); + err = TestStep6eReadTheOptionalCommandMoveSaturationInAcceptedCommandList_63(); break; - case 63: + case 64: ChipLogProgress( - chipTool, " ***** Test Step 63 : Step 6f: Read the optional command(StepSaturation) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 64 : Step 6f: Read the optional command(StepSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C05.Rsp")) { NextTest(); return; } - err = TestStep6fReadTheOptionalCommandStepSaturationInAcceptedCommandList_63(); + err = TestStep6fReadTheOptionalCommandStepSaturationInAcceptedCommandList_64(); break; - case 64: + case 65: ChipLogProgress(chipTool, - " ***** Test Step 64 : Step 6g: Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList\n"); + " ***** Test Step 65 : Step 6g: Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C06.Rsp")) { NextTest(); return; } - err = TestStep6gReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_64(); + err = TestStep6gReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_65(); break; - case 65: + case 66: ChipLogProgress( - chipTool, " ***** Test Step 65 : Step 6h: Read the optional command(MoveToColor) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 66 : Step 6h: Read the optional command(MoveToColor) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C07.Rsp")) { NextTest(); return; } - err = TestStep6hReadTheOptionalCommandMoveToColorInAcceptedCommandList_65(); + err = TestStep6hReadTheOptionalCommandMoveToColorInAcceptedCommandList_66(); break; - case 66: + case 67: ChipLogProgress( - chipTool, " ***** Test Step 66 : Step 6i: Read the optional command(MoveColor) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 67 : Step 6i: Read the optional command(MoveColor) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C08.Rsp")) { NextTest(); return; } - err = TestStep6iReadTheOptionalCommandMoveColorInAcceptedCommandList_66(); + err = TestStep6iReadTheOptionalCommandMoveColorInAcceptedCommandList_67(); break; - case 67: + case 68: ChipLogProgress( - chipTool, " ***** Test Step 67 : Step 6j: Read the optional command(StepColor) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 68 : Step 6j: Read the optional command(StepColor) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C09.Rsp")) { NextTest(); return; } - err = TestStep6jReadTheOptionalCommandStepColorInAcceptedCommandList_67(); + err = TestStep6jReadTheOptionalCommandStepColorInAcceptedCommandList_68(); break; - case 68: + case 69: ChipLogProgress(chipTool, - " ***** Test Step 68 : Step 6k: Read the optional command(MoveToColorTemperature) in AcceptedCommandList\n"); + " ***** Test Step 69 : Step 6k: Read the optional command(MoveToColorTemperature) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C0a.Rsp")) { NextTest(); return; } - err = TestStep6kReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_68(); + err = TestStep6kReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_69(); break; - case 69: + case 70: ChipLogProgress( - chipTool, " ***** Test Step 69 : Step 6l: Read the optional command(EnhancedMoveToHue) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 70 : Step 6l: Read the optional command(EnhancedMoveToHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C40.Rsp")) { NextTest(); return; } - err = TestStep6lReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_69(); + err = TestStep6lReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_70(); break; - case 70: + case 71: ChipLogProgress( - chipTool, " ***** Test Step 70 : Step 6m: Read the optional command(EnhancedMoveHue) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 71 : Step 6m: Read the optional command(EnhancedMoveHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C41.Rsp")) { NextTest(); return; } - err = TestStep6mReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_70(); + err = TestStep6mReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_71(); break; - case 71: + case 72: ChipLogProgress( - chipTool, " ***** Test Step 71 : Step 6n: Read the optional command(EnhancedStepHue) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 72 : Step 6n: Read the optional command(EnhancedStepHue) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C42.Rsp")) { NextTest(); return; } - err = TestStep6nReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_71(); + err = TestStep6nReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_72(); break; - case 72: + case 73: ChipLogProgress(chipTool, - " ***** Test Step 72 : Step 6o: Read the optional command(EnhancedMoveToHueAndSaturation) in " + " ***** Test Step 73 : Step 6o: Read the optional command(EnhancedMoveToHueAndSaturation) in " "AcceptedCommandList\n"); if (ShouldSkip("CC.S.C43.Rsp")) { NextTest(); return; } - err = TestStep6oReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_72(); + err = TestStep6oReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_73(); break; - case 73: + case 74: ChipLogProgress( - chipTool, " ***** Test Step 73 : Step 6p: Read the optional command(ColorLoopSet) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 74 : Step 6p: Read the optional command(ColorLoopSet) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C44.Rsp")) { NextTest(); return; } - err = TestStep6pReadTheOptionalCommandColorLoopSetInAcceptedCommandList_73(); + err = TestStep6pReadTheOptionalCommandColorLoopSetInAcceptedCommandList_74(); break; - case 74: + case 75: ChipLogProgress( - chipTool, " ***** Test Step 74 : Step 6q: Read the optional command(StopMoveStep) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 75 : Step 6q: Read the optional command(StopMoveStep) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C47.Rsp")) { NextTest(); return; } - err = TestStep6qReadTheOptionalCommandStopMoveStepInAcceptedCommandList_74(); + err = TestStep6qReadTheOptionalCommandStopMoveStepInAcceptedCommandList_75(); break; - case 75: + case 76: ChipLogProgress(chipTool, - " ***** Test Step 75 : Step 6r: Read the optional command(MoveColorTemperature) in AcceptedCommandList\n"); + " ***** Test Step 76 : Step 6r: Read the optional command(MoveColorTemperature) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestStep6rReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_75(); + err = TestStep6rReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_76(); break; - case 76: + case 77: ChipLogProgress(chipTool, - " ***** Test Step 76 : Step 6s: Read the optional command(StepColorTemperature) in AcceptedCommandList\n"); + " ***** Test Step 77 : Step 6s: Read the optional command(StepColorTemperature) in AcceptedCommandList\n"); if (ShouldSkip("CC.S.C4c.Rsp")) { NextTest(); return; } - err = TestStep6sReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_76(); + err = TestStep6sReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_77(); break; - case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_77(); + case 78: + ChipLogProgress(chipTool, " ***** Test Step 78 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_78(); break; } @@ -9510,6 +9731,9 @@ class Test_TC_CC_1_1 : public TestCommandBridge { case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 78: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -9523,7 +9747,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 78; + const uint16_t mTestCount = 79; chip::Optional mNodeId; chip::Optional mCluster; @@ -9711,7 +9935,36 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeCurrentHueInAttributeList_9() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16394UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeCurrentHueInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9732,7 +9985,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeCurrentSaturationInAttributeList_10() + CHIP_ERROR TestStep4cReadTheOptionalAttributeCurrentSaturationInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9753,7 +10006,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheOptionalAttributeRemainingTimeInAttributeList_11() + CHIP_ERROR TestStep4dReadTheOptionalAttributeRemainingTimeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9774,7 +10027,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheOptionalAttributeCurrentXInAttributeList_12() + CHIP_ERROR TestStep4eReadTheOptionalAttributeCurrentXInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9795,7 +10048,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalAttributeCurrentYInAttributeList_13() + CHIP_ERROR TestStep4fReadTheOptionalAttributeCurrentYInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9816,7 +10069,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheOptionalAttributeDriftCompensationInAttributeList_14() + CHIP_ERROR TestStep4gReadTheOptionalAttributeDriftCompensationInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9837,7 +10090,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalAttributeCompensationTextInAttributeList_15() + CHIP_ERROR TestStep4hReadTheOptionalAttributeCompensationTextInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9858,7 +10111,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_16() + CHIP_ERROR TestStep4iReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9879,7 +10132,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalAttributeNumberOfPrimariesInAttributeList_17() + CHIP_ERROR TestStep4jReadTheOptionalAttributeNumberOfPrimariesInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9900,7 +10153,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kReadTheOptionalAttributePrimary1XInAttributeList_18() + CHIP_ERROR TestStep4kReadTheOptionalAttributePrimary1XInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9921,7 +10174,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4lReadTheOptionalAttributePrimary1YInAttributeList_19() + CHIP_ERROR TestStep4lReadTheOptionalAttributePrimary1YInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9942,7 +10195,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4mReadTheOptionalAttributePrimary1IntensityInAttributeList_20() + CHIP_ERROR TestStep4mReadTheOptionalAttributePrimary1IntensityInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9963,7 +10216,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4nReadTheOptionalAttributePrimary2XInAttributeList_21() + CHIP_ERROR TestStep4nReadTheOptionalAttributePrimary2XInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -9984,7 +10237,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4oReadTheOptionalAttributePrimary2YInAttributeList_22() + CHIP_ERROR TestStep4oReadTheOptionalAttributePrimary2YInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10005,7 +10258,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4pReadTheOptionalAttributePrimary2IntensityInAttributeList_23() + CHIP_ERROR TestStep4pReadTheOptionalAttributePrimary2IntensityInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10026,7 +10279,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4qReadTheOptionalAttributePrimary3XInAttributeList_24() + CHIP_ERROR TestStep4qReadTheOptionalAttributePrimary3XInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10047,7 +10300,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4rReadTheOptionalAttributePrimary3YInAttributeList_25() + CHIP_ERROR TestStep4rReadTheOptionalAttributePrimary3YInAttributeList_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10068,7 +10321,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4sReadTheOptionalAttributePrimary3IntensityInAttributeList_26() + CHIP_ERROR TestStep4sReadTheOptionalAttributePrimary3IntensityInAttributeList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10089,7 +10342,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4tReadTheOptionalAttributePrimary4XInAttributeList_27() + CHIP_ERROR TestStep4tReadTheOptionalAttributePrimary4XInAttributeList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10110,7 +10363,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4uReadTheOptionalAttributePrimary4YInAttributeList_28() + CHIP_ERROR TestStep4uReadTheOptionalAttributePrimary4YInAttributeList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10131,7 +10384,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4vReadTheOptionalAttributePrimary4IntensityInAttributeList_29() + CHIP_ERROR TestStep4vReadTheOptionalAttributePrimary4IntensityInAttributeList_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10152,7 +10405,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4wReadTheOptionalAttributePrimary5XInAttributeList_30() + CHIP_ERROR TestStep4wReadTheOptionalAttributePrimary5XInAttributeList_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10173,7 +10426,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4xReadTheOptionalAttributePrimary5YInAttributeList_31() + CHIP_ERROR TestStep4xReadTheOptionalAttributePrimary5YInAttributeList_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10194,7 +10447,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4yReadTheOptionalAttributePrimary5IntensityInAttributeList_32() + CHIP_ERROR TestStep4yReadTheOptionalAttributePrimary5IntensityInAttributeList_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10215,7 +10468,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4zReadTheOptionalAttributePrimary6XInAttributeList_33() + CHIP_ERROR TestStep4zReadTheOptionalAttributePrimary6XInAttributeList_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10236,7 +10489,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a1ReadTheOptionalAttributePrimary6YInAttributeList_34() + CHIP_ERROR TestStep4a1ReadTheOptionalAttributePrimary6YInAttributeList_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10257,7 +10510,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a2ReadTheOptionalAttributePrimary6IntensityInAttributeList_35() + CHIP_ERROR TestStep4a2ReadTheOptionalAttributePrimary6IntensityInAttributeList_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10278,7 +10531,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a3ReadTheOptionalAttributeWhitePointXInAttributeList_36() + CHIP_ERROR TestStep4a3ReadTheOptionalAttributeWhitePointXInAttributeList_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10299,7 +10552,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a4ReadTheOptionalAttributeWhitePointYInAttributeList_37() + CHIP_ERROR TestStep4a4ReadTheOptionalAttributeWhitePointYInAttributeList_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10320,7 +10573,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a5ReadTheOptionalAttributeColorPointRXInAttributeList_38() + CHIP_ERROR TestStep4a5ReadTheOptionalAttributeColorPointRXInAttributeList_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10341,7 +10594,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a6ReadTheOptionalAttributeColorPointRYInAttributeList_39() + CHIP_ERROR TestStep4a6ReadTheOptionalAttributeColorPointRYInAttributeList_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10362,7 +10615,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a7ReadTheOptionalAttributeColorPointRIntensityInAttributeList_40() + CHIP_ERROR TestStep4a7ReadTheOptionalAttributeColorPointRIntensityInAttributeList_41() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10383,7 +10636,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a8ReadTheOptionalAttributeColorPointGXInAttributeList_41() + CHIP_ERROR TestStep4a8ReadTheOptionalAttributeColorPointGXInAttributeList_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10404,7 +10657,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a9ReadTheOptionalAttributeColorPointGYInAttributeList_42() + CHIP_ERROR TestStep4a9ReadTheOptionalAttributeColorPointGYInAttributeList_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10425,7 +10678,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a10ReadTheOptionalAttributeColorPointGIntensityInAttributeList_43() + CHIP_ERROR TestStep4a10ReadTheOptionalAttributeColorPointGIntensityInAttributeList_44() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10446,7 +10699,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a11ReadTheOptionalAttributeColorPointBXInAttributeList_44() + CHIP_ERROR TestStep4a11ReadTheOptionalAttributeColorPointBXInAttributeList_45() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10467,7 +10720,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a12ReadTheOptionalAttributeColorPointBYInAttributeList_45() + CHIP_ERROR TestStep4a12ReadTheOptionalAttributeColorPointBYInAttributeList_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10488,7 +10741,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a13ReadTheOptionalAttributeColorPointBIntensityInAttributeList_46() + CHIP_ERROR TestStep4a13ReadTheOptionalAttributeColorPointBIntensityInAttributeList_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10509,7 +10762,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a14ReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_47() + CHIP_ERROR TestStep4a14ReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10530,7 +10783,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a15ReadTheOptionalAttributeColorLoopActiveInAttributeList_48() + CHIP_ERROR TestStep4a15ReadTheOptionalAttributeColorLoopActiveInAttributeList_49() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10551,7 +10804,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a16ReadTheOptionalAttributeColorLoopDirectionInAttributeList_49() + CHIP_ERROR TestStep4a16ReadTheOptionalAttributeColorLoopDirectionInAttributeList_50() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10572,7 +10825,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a17ReadTheOptionalAttributeColorLoopTimeInAttributeList_50() + CHIP_ERROR TestStep4a17ReadTheOptionalAttributeColorLoopTimeInAttributeList_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10593,7 +10846,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a18ReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_51() + CHIP_ERROR TestStep4a18ReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10614,7 +10867,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a19ReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_52() + CHIP_ERROR TestStep4a19ReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10635,7 +10888,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a20ReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_53() + CHIP_ERROR TestStep4a20ReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10656,7 +10909,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a21ReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_54() + CHIP_ERROR TestStep4a21ReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10677,7 +10930,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a22ReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_55() + CHIP_ERROR TestStep4a22ReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10698,7 +10951,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a23ReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_56() + CHIP_ERROR TestStep4a23ReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10719,7 +10972,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheOptionalCommandMoveToHueInAcceptedCommandList_58() + CHIP_ERROR TestStep6aReadTheOptionalCommandMoveToHueInAcceptedCommandList_59() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10740,7 +10993,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandMoveHueInAcceptedCommandList_59() + CHIP_ERROR TestStep6bReadTheOptionalCommandMoveHueInAcceptedCommandList_60() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10761,7 +11014,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadTheOptionalCommandStepHueInAcceptedCommandList_60() + CHIP_ERROR TestStep6cReadTheOptionalCommandStepHueInAcceptedCommandList_61() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10782,7 +11035,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_61() + CHIP_ERROR TestStep6dReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_62() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10803,7 +11056,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6eReadTheOptionalCommandMoveSaturationInAcceptedCommandList_62() + CHIP_ERROR TestStep6eReadTheOptionalCommandMoveSaturationInAcceptedCommandList_63() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10824,7 +11077,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6fReadTheOptionalCommandStepSaturationInAcceptedCommandList_63() + CHIP_ERROR TestStep6fReadTheOptionalCommandStepSaturationInAcceptedCommandList_64() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10845,7 +11098,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6gReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_64() + CHIP_ERROR TestStep6gReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_65() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10866,7 +11119,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6hReadTheOptionalCommandMoveToColorInAcceptedCommandList_65() + CHIP_ERROR TestStep6hReadTheOptionalCommandMoveToColorInAcceptedCommandList_66() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10887,7 +11140,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6iReadTheOptionalCommandMoveColorInAcceptedCommandList_66() + CHIP_ERROR TestStep6iReadTheOptionalCommandMoveColorInAcceptedCommandList_67() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10908,7 +11161,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6jReadTheOptionalCommandStepColorInAcceptedCommandList_67() + CHIP_ERROR TestStep6jReadTheOptionalCommandStepColorInAcceptedCommandList_68() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10929,7 +11182,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6kReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_68() + CHIP_ERROR TestStep6kReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_69() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10950,7 +11203,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6lReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_69() + CHIP_ERROR TestStep6lReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_70() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10971,7 +11224,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6mReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_70() + CHIP_ERROR TestStep6mReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_71() { MTRBaseDevice * device = GetDevice("alpha"); @@ -10992,7 +11245,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6nReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_71() + CHIP_ERROR TestStep6nReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_72() { MTRBaseDevice * device = GetDevice("alpha"); @@ -11013,7 +11266,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6oReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_72() + CHIP_ERROR TestStep6oReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_73() { MTRBaseDevice * device = GetDevice("alpha"); @@ -11034,7 +11287,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6pReadTheOptionalCommandColorLoopSetInAcceptedCommandList_73() + CHIP_ERROR TestStep6pReadTheOptionalCommandColorLoopSetInAcceptedCommandList_74() { MTRBaseDevice * device = GetDevice("alpha"); @@ -11055,7 +11308,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6qReadTheOptionalCommandStopMoveStepInAcceptedCommandList_74() + CHIP_ERROR TestStep6qReadTheOptionalCommandStopMoveStepInAcceptedCommandList_75() { MTRBaseDevice * device = GetDevice("alpha"); @@ -11076,7 +11329,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6rReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_75() + CHIP_ERROR TestStep6rReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_76() { MTRBaseDevice * device = GetDevice("alpha"); @@ -11097,7 +11350,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6sReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_76() + CHIP_ERROR TestStep6sReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_77() { MTRBaseDevice * device = GetDevice("alpha"); @@ -11118,7 +11371,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_77() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_78() { MTRBaseDevice * device = GetDevice("alpha"); @@ -27459,132 +27712,140 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "CDOCONC.S.A0007 is not set\n"); if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when CDOCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when CDOCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("CDOCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("CDOCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("CDOCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -27681,6 +27942,9 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -27694,7 +27958,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -28016,7 +28280,35 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28039,7 +28331,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28065,7 +28357,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28094,7 +28386,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28123,7 +28415,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28150,7 +28442,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28176,7 +28468,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28203,7 +28495,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28229,7 +28521,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28252,7 +28544,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28276,7 +28568,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28302,7 +28594,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28949,132 +29241,140 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "CMOCONC.S.A0007 is not set\n"); if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when CMOCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when CMOCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("CMOCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("CMOCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("CMOCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -29171,6 +29471,9 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -29184,7 +29487,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -29506,7 +29809,35 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29529,7 +29860,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29555,7 +29886,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29584,7 +29915,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29613,7 +29944,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29640,7 +29971,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29666,7 +29997,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29693,7 +30024,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29719,7 +30050,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29742,7 +30073,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29766,7 +30097,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29792,7 +30123,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30439,132 +30770,140 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "FLDCONC.S.A0007 is not set\n"); if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when FLDCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when FLDCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("FLDCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("FLDCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("FLDCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -30661,6 +31000,9 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30674,7 +31016,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -30996,7 +31338,35 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31019,7 +31389,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31045,7 +31415,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31074,7 +31444,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31103,7 +31473,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31130,7 +31500,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31156,7 +31526,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31183,7 +31553,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31209,7 +31579,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31232,7 +31602,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31256,7 +31626,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31282,7 +31652,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31929,132 +32299,140 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "NDOCONC.S.A0007 is not set\n"); if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when NDOCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_22(); + err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_24(); + err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("NDOCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("NDOCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("NDOCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -32151,6 +32529,9 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -32164,7 +32545,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -32486,7 +32867,35 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32509,7 +32918,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32535,7 +32944,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32564,7 +32973,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32593,7 +33002,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32620,7 +33029,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32646,7 +33055,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32673,7 +33082,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_22() + TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32699,7 +33108,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32722,7 +33131,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32746,7 +33155,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32772,7 +33181,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33417,132 +33826,140 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "OZCONC.S.A0007 is not set\n"); if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when OZCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when OZCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when OZCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("OZCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("OZCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("OZCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -33639,6 +34056,9 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -33652,7 +34072,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -33974,7 +34394,35 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33997,7 +34445,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34023,7 +34471,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34052,7 +34500,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34081,7 +34529,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34107,7 +34555,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_20() + CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34133,7 +34581,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34160,7 +34608,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34186,7 +34634,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34209,7 +34657,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34233,7 +34681,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34259,7 +34707,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34906,132 +35354,140 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "PMHCONC.S.A0007 is not set\n"); if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when PMHCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when PMHCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PMHCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("PMHCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PMHCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -35128,6 +35584,9 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -35141,7 +35600,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -35463,7 +35922,35 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35486,7 +35973,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35512,7 +35999,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35541,7 +36028,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35570,7 +36057,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35597,7 +36084,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35623,7 +36110,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35650,7 +36137,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35676,7 +36163,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35699,7 +36186,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35723,7 +36210,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35749,7 +36236,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36396,132 +36883,140 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "PMICONC.S.A0007 is not set\n"); if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when PMICONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when PMICONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when PMICONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PMICONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("PMICONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PMICONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -36618,6 +37113,9 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -36631,7 +37129,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -36953,7 +37451,35 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36976,7 +37502,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37002,7 +37528,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37031,7 +37557,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37060,7 +37586,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37087,7 +37613,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37113,7 +37639,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37140,7 +37666,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37166,7 +37692,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37189,7 +37715,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37213,7 +37739,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37239,7 +37765,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37886,132 +38412,140 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "PMKCONC.S.A0007 is not set\n"); if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when PMKCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when PMKCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PMKCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("PMKCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PMKCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -38108,6 +38642,9 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -38121,7 +38658,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -38443,7 +38980,35 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38466,7 +39031,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38492,7 +39057,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38521,7 +39086,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38550,7 +39115,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38577,7 +39142,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38603,7 +39168,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38630,7 +39195,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38656,7 +39221,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38679,7 +39244,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38703,7 +39268,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38729,7 +39294,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39374,132 +39939,140 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "RNCONC.S.A0007 is not set\n"); if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when RNCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when RNCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when RNCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("RNCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("RNCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("RNCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -39596,6 +40169,9 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -39609,7 +40185,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -39931,7 +40507,35 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39954,7 +40558,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39980,7 +40584,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40009,7 +40613,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40038,7 +40642,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40064,7 +40668,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_20() + CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40090,7 +40694,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40117,7 +40721,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40143,7 +40747,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40166,7 +40770,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40190,7 +40794,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40216,7 +40820,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40867,132 +41471,140 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15(); + err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " "TVOCCONC.S.A0007 is not set\n"); if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_16(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " "MaxMeasuredValue and Measurement Unit in AttributeList\n"); if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " "Uncertainty are excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set\n"); if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_18(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " "PeakMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " "AttributeList when TVOCCONC.S.F04 (PEA) is not set\n"); if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_20(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " "AverageMeasuredValueWindow in AttributeList\n"); if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when TVOCCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_22(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is " + " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_24(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5l: Read the global attribute: EventList\n"); - if (ShouldSkip("TVOCCONC.S.Afffa")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5l: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 6: Read the global attribute: AcceptedCommandList\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("TVOCCONC.S.Afff9")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_26(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("TVOCCONC.S.Afff8")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_27(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); break; } @@ -41089,6 +41701,9 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -41102,7 +41717,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -41438,7 +42053,36 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41462,7 +42106,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_16() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41489,7 +42133,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_17() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41519,7 +42163,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_18() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41549,7 +42193,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_19() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41577,7 +42221,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_20() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41604,7 +42248,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_21() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41632,7 +42276,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_22() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41659,7 +42303,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_23() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41683,7 +42327,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_24() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41708,7 +42352,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_26() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41735,7 +42379,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_27() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -43278,15 +43922,23 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -43296,11 +43948,11 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -43309,19 +43961,19 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6a: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("OPCREDS.S.Afff9")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_6(); + err = TestStep6aThReadsAcceptedCommandListFromDut_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 8 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -43331,19 +43983,19 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7a: TH reads GeneratedCommandList from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7a: TH reads GeneratedCommandList from DUT\n"); if (ShouldSkip("OPCREDS.S.Afff8")) { NextTest(); return; } - err = TestStep7aThReadsGeneratedCommandListFromDut_8(); + err = TestStep7aThReadsGeneratedCommandListFromDut_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 10 : Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -43352,7 +44004,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { NextTest(); return; } - err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; } @@ -43395,6 +44047,9 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -43408,7 +44063,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -43509,8 +44164,41 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -43521,7 +44209,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -43531,7 +44219,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -43562,7 +44250,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { } CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -43572,7 +44260,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep7aThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestStep7aThReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -43599,7 +44287,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { } CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -43670,81 +44358,89 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("BINFO.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList\n"); + chipTool, " ***** Test Step 5 : Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList\n"); if (ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeManufacturingDateInAttributeList_4(); + err = TestStep4bThReadsOptionalAttributeManufacturingDateInAttributeList_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4c: TH reads optional attribute(PartNumber) in attributeList\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4c: TH reads optional attribute(PartNumber) in attributeList\n"); if (ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributePartNumberInAttributeList_5(); + err = TestStep4cThReadsOptionalAttributePartNumberInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4d: TH reads optional attribute(ProductURL) in attributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4d: TH reads optional attribute(ProductURL) in attributeList\n"); if (ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4dThReadsOptionalAttributeProductURLInAttributeList_6(); + err = TestStep4dThReadsOptionalAttributeProductURLInAttributeList_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4e: TH reads optional attribute(ProductLabel) in attributeList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4e: TH reads optional attribute(ProductLabel) in attributeList\n"); if (ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4eThReadsOptionalAttributeProductLabelInAttributeList_7(); + err = TestStep4eThReadsOptionalAttributeProductLabelInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4f: TH reads optional attribute(SerialNumber) in attributeList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4f: TH reads optional attribute(SerialNumber) in attributeList\n"); if (ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4fThReadsOptionalAttributeSerialNumberInAttributeList_8(); + err = TestStep4fThReadsOptionalAttributeSerialNumberInAttributeList_9(); break; - case 9: + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList\n"); + chipTool, " ***** Test Step 10 : Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList\n"); if (ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4gThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9(); + err = TestStep4gThReadsOptionalAttributeLocalConfigDisabledInAttributeList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4h: TH reads optional attribute(Reachable) in attributeList\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4h: TH reads optional attribute(Reachable) in attributeList\n"); if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4hThReadsOptionalAttributeReachableInAttributeList_10(); + err = TestStep4hThReadsOptionalAttributeReachableInAttributeList_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4i: TH reads optional attribute(UniqueID) in attributeList\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4i: TH reads optional attribute(UniqueID) in attributeList\n"); if (ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb")) { NextTest(); return; } - err = TestStep4iThReadsOptionalAttributeUniqueIDInAttributeList_11(); + err = TestStep4iThReadsOptionalAttributeUniqueIDInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4j: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 13 : Step 4j: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -43754,51 +44450,52 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + err = TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: TH1 reads EventList from DUT\n"); - if (ShouldSkip(" BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 ")) { - NextTest(); - return; - } - NextTest(); - return; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5b: Read BINFO.S.E00(StartUp) event in EventList\n"); - if (ShouldSkip("BINFO.S.E00 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5a: TH1 reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && " + "!BINFO.S.A0011 ")) { NextTest(); return; } NextTest(); return; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5c: Read BINFO.S.E01(ShutDown) event in EventList\n"); - if (ShouldSkip("BINFO.S.E01 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5b: Read BINFO.S.E00(StartUp) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E00 && BINFO.S.Afffa")) { NextTest(); return; } NextTest(); return; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5d: Read BINFO.S.E02(Leave) event in EventList\n"); - if (ShouldSkip("BINFO.S.E02 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5c: Read BINFO.S.E01(ShutDown) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E01 && BINFO.S.Afffa")) { NextTest(); return; } NextTest(); return; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5e: Read (ReachableChanged) event in EventList\n"); - if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5d: Read BINFO.S.E02(Leave) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E02 && BINFO.S.Afffa")) { NextTest(); return; } NextTest(); return; case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5e: Read (ReachableChanged) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.A0011 && BINFO.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 5f: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " + " ***** Test Step 19 : Step 5f: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " @@ -43808,11 +44505,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); + err = TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 20 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -43821,11 +44518,11 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 21 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -43834,7 +44531,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21(); break; } @@ -43910,6 +44607,9 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -43923,7 +44623,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -44024,7 +44724,44 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeManufacturingDateInAttributeList_4() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributeManufacturingDateInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44045,7 +44782,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributePartNumberInAttributeList_5() + CHIP_ERROR TestStep4cThReadsOptionalAttributePartNumberInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44066,7 +44803,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsOptionalAttributeProductURLInAttributeList_6() + CHIP_ERROR TestStep4dThReadsOptionalAttributeProductURLInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44087,7 +44824,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eThReadsOptionalAttributeProductLabelInAttributeList_7() + CHIP_ERROR TestStep4eThReadsOptionalAttributeProductLabelInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44108,7 +44845,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsOptionalAttributeSerialNumberInAttributeList_8() + CHIP_ERROR TestStep4fThReadsOptionalAttributeSerialNumberInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44129,7 +44866,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gThReadsOptionalAttributeLocalConfigDisabledInAttributeList_9() + CHIP_ERROR TestStep4gThReadsOptionalAttributeLocalConfigDisabledInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44150,7 +44887,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hThReadsOptionalAttributeReachableInAttributeList_10() + CHIP_ERROR TestStep4hThReadsOptionalAttributeReachableInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44171,7 +44908,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iThReadsOptionalAttributeUniqueIDInAttributeList_11() + CHIP_ERROR TestStep4iThReadsOptionalAttributeUniqueIDInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44193,7 +44930,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44204,7 +44941,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() + TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44215,7 +44952,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44226,7 +44963,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44324,43 +45061,51 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("CNET.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CNET.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CNET.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 4b: Read mandatory attributes in AttributeList if " + " ***** Test Step 8 : Step 4b: Read mandatory attributes in AttributeList if " "CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true\n"); if (ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_7(); + err = TestStep4bReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList\n"); + chipTool, " ***** Test Step 9 : Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList\n"); if (ShouldSkip("CNET.S.A0002 && CNET.S.Afffb")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_8(); + err = TestStep4cReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_9(); break; - case 9: + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList\n"); + chipTool, " ***** Test Step 10 : Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList\n"); if (ShouldSkip("CNET.S.A0003 && CNET.S.Afffb")) { NextTest(); return; } - err = TestStep4dReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_9(); + err = TestStep4dReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4e: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 11 : Step 4e: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -44370,11 +45115,11 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { NextTest(); return; } - err = TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + err = TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -44383,51 +45128,51 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " + " ***** Test Step 13 : Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " "CNET.S.F00(WI),CNET.S.F01(TH)\n"); if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9")) { NextTest(); return; } - err = TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12(); + err = TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is " + " ***** Test Step 14 : Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is " "true)\n"); if (ShouldSkip("CNET.S.F00 && CNET.S.Afff9")) { NextTest(); return; } - err = TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13(); + err = TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is " + " ***** Test Step 15 : Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is " "true)\n"); if (ShouldSkip("CNET.S.F01 && CNET.S.Afff9")) { NextTest(); return; } - err = TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14(); + err = TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) " + " ***** Test Step 16 : Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) " "is true)\n"); if (ShouldSkip("CNET.S.F02 && CNET.S.Afff9")) { NextTest(); return; } - err = TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15(); + err = TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 6e: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 17 : Step 6e: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -44437,31 +45182,31 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { NextTest(); return; } - err = TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related " + " ***** Test Step 18 : Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related " "features(CNET.S.F00(WI) or CNET.S.F01(TH) is true)\n"); if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8")) { NextTest(); return; } - err = TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_17(); + err = TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related " + " ***** Test Step 19 : Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related " "features(CNET.S.F02(ET) must be true)\n"); if (ShouldSkip("CNET.S.F02 && CNET.S.Afff8")) { NextTest(); return; } - err = TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_18(); + err = TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 7c: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 20 : Step 7c: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -44470,7 +45215,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { NextTest(); return; } - err = TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + err = TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); break; } @@ -44543,6 +45288,9 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -44556,7 +45304,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -44725,7 +45473,34 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_7() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadMandatoryAttributesInAttributeListIfCnetsf00wiCnetsf01thCnetsf02etIsTrue_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44755,7 +45530,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_8() + CHIP_ERROR TestStep4cReadTheOptionalAttributeScanMaxTimeSecondsAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44778,7 +45553,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_9() + CHIP_ERROR TestStep4dReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44802,7 +45577,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { } CHIP_ERROR - TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() + TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44813,7 +45588,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44823,7 +45598,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12() + CHIP_ERROR TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44851,7 +45626,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13() + CHIP_ERROR TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44875,7 +45650,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14() + CHIP_ERROR TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44899,7 +45674,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15() + CHIP_ERROR TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44926,7 +45701,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { } CHIP_ERROR - TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() + TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -44936,7 +45711,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_17() + CHIP_ERROR TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44963,7 +45738,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_18() + CHIP_ERROR TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44991,7 +45766,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { } CHIP_ERROR - TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45062,15 +45837,23 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("DESC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DESC.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -45080,11 +45863,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -45093,11 +45876,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -45106,11 +45889,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -45119,7 +45902,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; } @@ -45156,6 +45939,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -45169,7 +45955,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -45262,8 +46048,37 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45274,7 +46089,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45285,7 +46100,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45296,7 +46111,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45367,15 +46182,23 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TTH reads AttributeList from DUT\n"); - if (ShouldSkip("DLOG.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb")) { NextTest(); return; } err = TestStep4aTthReadsAttributeListFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TTH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aTthReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 5 : Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -45385,11 +46208,11 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bTthReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestStep4bTthReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TTH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 6 : Step 4b: TTH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -45398,19 +46221,19 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bTthReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep4bTthReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6a: TTH reads AcceptedCommandList from DUT\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6a: TTH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DLOG.S.Afff9")) { NextTest(); return; } - err = TestStep6aTthReadsAcceptedCommandListFromDut_6(); + err = TestStep6aTthReadsAcceptedCommandListFromDut_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6b: TTH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 8 : Step 6b: TTH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -45420,20 +46243,20 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7a: TTH reads GeneratedCommandList from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7a: TTH reads GeneratedCommandList from DUT\n"); if (ShouldSkip("DLOG.S.Afff8")) { NextTest(); return; } - err = TestStep7aTthReadsGeneratedCommandListFromDut_8(); + err = TestStep7aTthReadsGeneratedCommandListFromDut_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 7b: TTH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + " ***** Test Step 10 : Step 7b: TTH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values " + "in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); @@ -45441,7 +46264,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; } @@ -45484,6 +46307,9 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -45497,7 +46323,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -45586,8 +46412,33 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestStep4aTthReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TTH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestStep4bTthReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + TestStep4bTthReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45598,7 +46449,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4bTthReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep4bTthReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45608,7 +46459,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aTthReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestStep6aTthReadsAcceptedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45634,7 +46485,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45644,7 +46495,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep7aTthReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestStep7aTthReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45670,7 +46521,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -45759,99 +46610,107 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("DGETH.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4b: TH reads optional attribute(PHYRate) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributePHYRateInAttributeList_6(); + err = TestStep4aThReadsAttributeListFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: TH reads optional attribute(FullDuplex) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b: TH reads optional attribute(PHYRate) in AttributeList\n"); + if (ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributeFullDuplexInAttributeList_7(); + err = TestStep4bThReadsOptionalAttributePHYRateInAttributeList_7(); break; case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4c: TH reads optional attribute(FullDuplex) in AttributeList\n"); + if (ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4cThReadsOptionalAttributeFullDuplexInAttributeList_8(); + break; + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4d: TH reads optional attribute(PacketRxCount) and Feature " + " ***** Test Step 9 : Step 4d: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F00(PKTCNT)) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0002 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4dThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8(); + err = TestStep4dThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4e: TH reads optional attribute(PacketRxCount) and Feature " + " ***** Test Step 10 : Step 4e: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F00(PKTCNT)) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0003 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4eThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9(); + err = TestStep4eThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4f: TH reads optional attribute(PacketRxCount) and Feature " + " ***** Test Step 11 : Step 4f: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F01(ERRCNT)) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0004 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4fThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10(); + err = TestStep4fThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4g: TH reads optional attribute(PacketRxCount) and Feature " + " ***** Test Step 12 : Step 4g: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F01(ERRCNT)) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0005 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4gThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11(); + err = TestStep4gThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4h: TH reads optional attribute(PacketRxCount) and Feature " + " ***** Test Step 13 : Step 4h: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F01(ERRCNT)) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0006 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4hThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12(); + err = TestStep4hThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList\n"); + chipTool, " ***** Test Step 14 : Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0007 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4iThReadsOptionalAttributeCarrierDetectInAttributeList_13(); + err = TestStep4iThReadsOptionalAttributeCarrierDetectInAttributeList_14(); break; - case 14: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList\n"); + chipTool, " ***** Test Step 15 : Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList\n"); if (ShouldSkip("DGETH.S.A0008 && DGETH.S.Afffb")) { NextTest(); return; } - err = TestStep4jThReadsOptionalAttributeTimeSinceResetInAttributeList_14(); + err = TestStep4jThReadsOptionalAttributeTimeSinceResetInAttributeList_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 4k: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 16 : Step 4k: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -45861,11 +46720,11 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4kThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + err = TestStep4kThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 17 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -45874,27 +46733,27 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6a: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_17(); + err = TestStep6aThReadsAcceptedCommandListFromDut_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6b: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01")) { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListFromDut_18(); + err = TestStep6bThReadsAcceptedCommandListFromDut_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 20 : Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -45904,11 +46763,11 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 21 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -45917,7 +46776,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21(); break; } @@ -45993,6 +46852,9 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -46006,7 +46868,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -46143,7 +47005,34 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributePHYRateInAttributeList_6() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributePHYRateInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46166,7 +47055,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributeFullDuplexInAttributeList_7() + CHIP_ERROR TestStep4cThReadsOptionalAttributeFullDuplexInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46189,7 +47078,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_8() + CHIP_ERROR TestStep4dThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46214,7 +47103,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_9() + CHIP_ERROR TestStep4eThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF00PKTCNTInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46239,7 +47128,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_10() + CHIP_ERROR TestStep4fThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46264,7 +47153,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_11() + CHIP_ERROR TestStep4gThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46289,7 +47178,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_12() + CHIP_ERROR TestStep4hThReadsOptionalAttributePacketRxCountAndFeatureDependentDGETHSF01ERRCNTInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46314,7 +47203,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iThReadsOptionalAttributeCarrierDetectInAttributeList_13() + CHIP_ERROR TestStep4iThReadsOptionalAttributeCarrierDetectInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46337,7 +47226,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jThReadsOptionalAttributeTimeSinceResetInAttributeList_14() + CHIP_ERROR TestStep4jThReadsOptionalAttributeTimeSinceResetInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46361,7 +47250,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4kThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() + TestStep4kThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -46372,7 +47261,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -46382,7 +47271,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_17() + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46405,7 +47294,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_18() + CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46432,7 +47321,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -46443,7 +47332,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -47883,23 +48772,31 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("FLW.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLW.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("FLW.S.A0003 && FLW.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLW.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4(); + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("FLW.S.A0003 && FLW.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 6 : Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -47909,11 +48806,11 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 7 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -47922,11 +48819,11 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -47936,11 +48833,11 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -47949,7 +48846,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); break; } @@ -47989,6 +48886,9 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -48002,7 +48902,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -48094,7 +48994,35 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -48116,7 +49044,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48127,7 +49055,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48138,7 +49066,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48149,7 +49077,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48455,15 +49383,23 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("FLABEL.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -48473,11 +49409,11 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -48486,11 +49422,11 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -48499,11 +49435,11 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -48512,7 +49448,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; } @@ -48549,6 +49485,9 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -48562,7 +49501,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -48652,8 +49591,34 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48664,7 +49629,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48675,7 +49640,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48686,7 +49651,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -48811,60 +49776,72 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_9(); break; case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3aReadTheGlobalAttributeAttributeList_10(); + break; + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList\n"); + chipTool, " ***** Test Step 11 : Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F00")) { NextTest(); return; } - err = TestStep3bReadTheFeatureDependentFansf00SpdAttributeInAttributeList_10(); + err = TestStep3bReadTheFeatureDependentFansf00SpdAttributeInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList\n"); + chipTool, " ***** Test Step 12 : Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F02")) { NextTest(); return; } - err = TestStep3cReadTheFeatureDependentFansf02rckAttributeInAttributeList_11(); + err = TestStep3cReadTheFeatureDependentFansf02rckAttributeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList\n"); + chipTool, " ***** Test Step 13 : Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F03")) { NextTest(); return; } - err = TestStep3dReadTheFeatureDependentFansf03wndAttributeInAttributeList_12(); + err = TestStep3dReadTheFeatureDependentFansf03wndAttributeInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList\n"); + chipTool, " ***** Test Step 14 : Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F05")) { NextTest(); return; } - err = TestStep3eReadTheFeatureDependentFansf05dirAttributeInAttributeList_13(); + err = TestStep3eReadTheFeatureDependentFansf05dirAttributeInAttributeList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4: Read the global attribute: AcceptedCommandList\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip(" !FAN.S.C00.Rsp ")) { NextTest(); return; } - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_14(); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_15(); break; - case 15: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 5: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 16 : Step 5: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("FAN.S.C00.Rsp")) { NextTest(); return; } - err = TestStep5ReadTheOptionalCommandResetConditionInAcceptedCommandList_15(); + err = TestStep5ReadTheOptionalCommandResetConditionInAcceptedCommandList_16(); break; } @@ -48925,6 +49902,9 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -48938,7 +49918,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -49131,7 +50111,36 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheFeatureDependentFansf00SpdAttributeInAttributeList_10() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheFeatureDependentFansf00SpdAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49154,7 +50163,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheFeatureDependentFansf02rckAttributeInAttributeList_11() + CHIP_ERROR TestStep3cReadTheFeatureDependentFansf02rckAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49176,7 +50185,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheFeatureDependentFansf03wndAttributeInAttributeList_12() + CHIP_ERROR TestStep3dReadTheFeatureDependentFansf03wndAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49198,7 +50207,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eReadTheFeatureDependentFansf05dirAttributeInAttributeList_13() + CHIP_ERROR TestStep3eReadTheFeatureDependentFansf05dirAttributeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49219,7 +50228,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_14() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49243,7 +50252,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheOptionalCommandResetConditionInAcceptedCommandList_15() + CHIP_ERROR TestStep5ReadTheOptionalCommandResetConditionInAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51145,19 +52154,35 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_5(); - break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_7(); break; } @@ -51191,6 +52216,9 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -51204,7 +52232,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -51304,7 +52332,39 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51329,7 +52389,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51742,67 +52802,75 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("DGGEN.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: Read optional attribute(UpTime) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadOptionalAttributeUpTimeInAttributeList_4(); + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read optional attribute(UpTime) in AttributeList\n"); + if (ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4bReadOptionalAttributeUpTimeInAttributeList_5(); + break; + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList\n"); + chipTool, " ***** Test Step 6 : Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList\n"); if (ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestStep4cReadOptionalAttributeTotalOperationalHoursInAttributeList_5(); + err = TestStep4cReadOptionalAttributeTotalOperationalHoursInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4d: Read optional attribute(BootReason) in AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4d: Read optional attribute(BootReason) in AttributeList\n"); if (ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestStep4dReadOptionalAttributeBootReasonInAttributeList_6(); + err = TestStep4dReadOptionalAttributeBootReasonInAttributeList_7(); break; - case 7: + case 8: ChipLogProgress( - chipTool, " ***** Test Step 7 : Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList\n"); + chipTool, " ***** Test Step 8 : Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList\n"); if (ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestStep4eReadOptionalAttributeActiveHardwareFaultsInAttributeList_7(); + err = TestStep4eReadOptionalAttributeActiveHardwareFaultsInAttributeList_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList\n"); + chipTool, " ***** Test Step 9 : Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList\n"); if (ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestStep4fReadOptionalAttributeActiveRadioFaultsInAttributeList_8(); + err = TestStep4fReadOptionalAttributeActiveRadioFaultsInAttributeList_9(); break; - case 9: + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList\n"); + chipTool, " ***** Test Step 10 : Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList\n"); if (ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb")) { NextTest(); return; } - err = TestStep4gReadOptionalAttributeActiveNetworkFaultsInAttributeList_9(); + err = TestStep4gReadOptionalAttributeActiveNetworkFaultsInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 11 : Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -51812,43 +52880,43 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: Read the global attribute: EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5a: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5b: Read optional event(HardwareFaultChange) in EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E00")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5b: Read optional event(HardwareFaultChange) in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E00")) { NextTest(); return; } NextTest(); return; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5c: Read optional event(RadioFaultChange) in EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E01")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5c: Read optional event(RadioFaultChange) in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E01")) { NextTest(); return; } NextTest(); return; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5d: Read optional event(NetworkFaultChange) in EventList\n"); - if (ShouldSkip("DGGEN.S.Afffa && DGGEN.S.E02")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5d: Read optional event(NetworkFaultChange) in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E02")) { NextTest(); return; } NextTest(); return; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 5e: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 16 : Step 5e: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -51857,19 +52925,19 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5eThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + err = TestStep5eThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6a: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("DGGEN.S.Afff9")) { NextTest(); return; } - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_16(); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 18 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -51879,11 +52947,11 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 19 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -51892,7 +52960,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); break; } @@ -51962,6 +53030,9 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -51975,7 +53046,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -52073,7 +53144,37 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadOptionalAttributeUpTimeInAttributeList_4() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadOptionalAttributeUpTimeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52096,7 +53197,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadOptionalAttributeTotalOperationalHoursInAttributeList_5() + CHIP_ERROR TestStep4cReadOptionalAttributeTotalOperationalHoursInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52119,7 +53220,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadOptionalAttributeBootReasonInAttributeList_6() + CHIP_ERROR TestStep4dReadOptionalAttributeBootReasonInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52142,7 +53243,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadOptionalAttributeActiveHardwareFaultsInAttributeList_7() + CHIP_ERROR TestStep4eReadOptionalAttributeActiveHardwareFaultsInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52165,7 +53266,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadOptionalAttributeActiveRadioFaultsInAttributeList_8() + CHIP_ERROR TestStep4fReadOptionalAttributeActiveRadioFaultsInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52188,7 +53289,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadOptionalAttributeActiveNetworkFaultsInAttributeList_9() + CHIP_ERROR TestStep4gReadOptionalAttributeActiveNetworkFaultsInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52212,7 +53313,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() + TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -52223,7 +53324,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5eThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() + TestStep5eThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -52233,7 +53334,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_16() + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -52257,7 +53358,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() + TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -52268,7 +53369,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -52834,66 +53935,82 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_5(); + break; + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); + chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); if (ShouldSkip("ICDM.S.A0003")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_5(); + err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); if (ShouldSkip("ICDM.S.A0004")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_6(); + err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); + " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); if (ShouldSkip("ICDM.S.A0005")) { NextTest(); return; } - err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_7(); + err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: EventList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_9(); - break; case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); + break; + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); + chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); if (ShouldSkip("ICDM.S.C03.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_10(); + err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip(" !ICDM.S.F00 ")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_11(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("ICDM.S.F00")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -52945,6 +54062,9 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -52958,7 +54078,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -53074,7 +54194,35 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_5() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53095,7 +54243,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_6() + CHIP_ERROR TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53116,7 +54264,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_7() + CHIP_ERROR TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53137,7 +54285,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_9() + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53159,7 +54307,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_10() + CHIP_ERROR TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53180,7 +54328,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_11() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53204,7 +54352,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53563,34 +54711,46 @@ class Test_TC_I_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 6: Read the optional command(TriggerEffect) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 6 : Step 6: Read the optional command(TriggerEffect) in AcceptedCommandList\n"); if (ShouldSkip("I.S.C40.Rsp")) { NextTest(); return; } - err = TestStep6ReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestStep6ReadTheOptionalCommandTriggerEffectInAcceptedCommandList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: Read EventList attribute from the DUT. For this cluster the list is usually empty " + " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT. For this cluster the list is usually empty " "but it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); + err = TestStep7ReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); break; } @@ -53627,6 +54787,9 @@ class Test_TC_I_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -53640,7 +54803,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -53731,7 +54894,34 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53752,7 +54942,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheOptionalCommandTriggerEffectInAcceptedCommandList_5() + CHIP_ERROR TestStep6ReadTheOptionalCommandTriggerEffectInAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53773,7 +54963,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53798,7 +54988,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() + TestStep7ReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -55065,42 +56255,54 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("ILL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4(); + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("ILL.S.A0003")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5(); + break; + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 4c: Read the optional attribute(LightSensorType) in AttributeList\n"); + chipTool, " ***** Test Step 6 : Step 4c: Read the optional attribute(LightSensorType) in AttributeList\n"); if (ShouldSkip("ILL.S.A0004")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeLightSensorTypeInAttributeList_5(); + err = TestStep4cReadTheOptionalAttributeLightSensorTypeInAttributeList_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but " + " ***** Test Step 7 : Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but " "it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_7(); + err = TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_9(); break; } @@ -55140,6 +56342,9 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -55153,7 +56358,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -55251,7 +56456,37 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55274,7 +56509,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeLightSensorTypeInAttributeList_5() + CHIP_ERROR TestStep4cReadTheOptionalAttributeLightSensorTypeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55298,7 +56533,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() + TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -55308,7 +56543,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55334,7 +56569,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56029,99 +57264,115 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3aReadTheGlobalAttributeAttributeList_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in " + " ***** Test Step 8 : Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in " "AttributeList\n"); if (ShouldSkip("LVL.S.F01")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7(); + err = TestStep3bReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " + " ***** Test Step 9 : Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " "AttributeList\n"); if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestStep3cReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8(); + err = TestStep3cReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3d: Read the optional attribute(MinLevel) in AttributeList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3d: Read the optional attribute(MinLevel) in AttributeList\n"); if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestStep3dReadTheOptionalAttributeMinLevelInAttributeList_9(); + err = TestStep3dReadTheOptionalAttributeMinLevelInAttributeList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3e: Read the optional attribute(MaxLevel) in AttributeList\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 3e: Read the optional attribute(MaxLevel) in AttributeList\n"); if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestStep3eReadTheOptionalAttributeMaxLevelInAttributeList_10(); + err = TestStep3eReadTheOptionalAttributeMaxLevelInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); + chipTool, " ***** Test Step 12 : Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestStep3fReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11(); + err = TestStep3fReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList\n"); + chipTool, " ***** Test Step 13 : Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList\n"); if (ShouldSkip("LVL.S.A0012")) { NextTest(); return; } - err = TestStep3gReadTheOptionalAttributeOnTransitionTimeInAttributeList_12(); + err = TestStep3gReadTheOptionalAttributeOnTransitionTimeInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList\n"); + chipTool, " ***** Test Step 14 : Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList\n"); if (ShouldSkip("LVL.S.A0013")) { NextTest(); return; } - err = TestStep3hReadTheOptionalAttributeOffTransitionTimeInAttributeList_13(); + err = TestStep3hReadTheOptionalAttributeOffTransitionTimeInAttributeList_14(); break; - case 14: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList\n"); + chipTool, " ***** Test Step 15 : Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList\n"); if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestStep3iReadTheOptionalAttributeDefaultMoveRateInAttributeList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4aReadTheGlobalAttributeAcceptedCommandList_15(); + err = TestStep3iReadTheOptionalAttributeDefaultMoveRateInAttributeList_15(); break; case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4aReadTheGlobalAttributeAcceptedCommandList_16(); + break; + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList\n"); + " ***** Test Step 17 : Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList\n"); if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the global attribute: GeneratedCommandList\n"); - err = TestStep4bReadTheGlobalAttributeGeneratedCommandList_17(); + err = TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 4b: Read the global attribute: GeneratedCommandList\n"); + err = TestStep4bReadTheGlobalAttributeGeneratedCommandList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -56192,6 +57443,9 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -56205,7 +57459,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -56354,7 +57608,35 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_7() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56376,7 +57658,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_8() + CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56401,7 +57683,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheOptionalAttributeMinLevelInAttributeList_9() + CHIP_ERROR TestStep3dReadTheOptionalAttributeMinLevelInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56422,7 +57704,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eReadTheOptionalAttributeMaxLevelInAttributeList_10() + CHIP_ERROR TestStep3eReadTheOptionalAttributeMaxLevelInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56443,7 +57725,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_11() + CHIP_ERROR TestStep3fReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56464,7 +57746,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gReadTheOptionalAttributeOnTransitionTimeInAttributeList_12() + CHIP_ERROR TestStep3gReadTheOptionalAttributeOnTransitionTimeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56485,7 +57767,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hReadTheOptionalAttributeOffTransitionTimeInAttributeList_13() + CHIP_ERROR TestStep3hReadTheOptionalAttributeOffTransitionTimeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56506,7 +57788,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iReadTheOptionalAttributeDefaultMoveRateInAttributeList_14() + CHIP_ERROR TestStep3iReadTheOptionalAttributeDefaultMoveRateInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56527,7 +57809,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAcceptedCommandList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56555,7 +57837,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_16() + CHIP_ERROR TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56576,7 +57858,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheGlobalAttributeGeneratedCommandList_17() + CHIP_ERROR TestStep4bReadTheGlobalAttributeGeneratedCommandList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -62767,19 +64049,35 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6ThReadsAcceptedCommandListFromDut_5(); - break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_7(); break; } @@ -62813,6 +64111,9 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -62826,7 +64127,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -62923,7 +64224,36 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_5() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -62949,7 +64279,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_6() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63045,44 +64375,52 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_5(); + break; + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList\n"); + chipTool, " ***** Test Step 6 : Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList\n"); if (ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00")) { NextTest(); return; } - err = TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5(); + err = TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffa")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList from DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("LUNIT.S.Afff9")) { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListFromDut_7(); + err = TestStep6ThReadsAcceptedCommandListFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); if (ShouldSkip("LUNIT.S.Afff8")) { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListFromDut_8(); + err = TestStep7ThReadsGeneratedCommandListFromDut_9(); break; } @@ -63122,6 +64460,9 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -63135,7 +64476,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -63243,7 +64584,32 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_5() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63264,7 +64630,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63288,7 +64654,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63724,53 +65090,61 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); + " ***** Test Step 5 : Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4(); + err = TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT\n"); + " ***** Test Step 6 : Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT\n"); if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5(); + err = TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffa")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList from DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("LTIME.S.Afff9")) { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListFromDut_7(); + err = TestStep6ThReadsAcceptedCommandListFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); if (ShouldSkip("LTIME.S.Afff8")) { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListFromDut_8(); + err = TestStep7ThReadsGeneratedCommandListFromDut_9(); break; } @@ -63810,6 +65184,9 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -63823,7 +65200,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -63917,7 +65294,35 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_4() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63940,7 +65345,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_5() + CHIP_ERROR TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63963,7 +65368,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -63989,7 +65394,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64068,18 +65473,34 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -64114,6 +65535,9 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -64127,7 +65551,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -64220,7 +65644,36 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64245,7 +65698,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64353,18 +65806,34 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3aReadTheGlobalAttributeAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -64408,6 +65877,9 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -64421,7 +65893,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -64567,7 +66039,32 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64588,7 +66085,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64674,34 +66171,50 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3b: Read the optional attribute(CatalogList) in AttributeList\n"); - if (ShouldSkip("APPLAUNCHER.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeCatalogListInAttributeList_5(); + err = TestStep3aReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3c: Read the optional attribute(CurrentApp) in AttributeList\n"); - if (ShouldSkip("APPLAUNCHER.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3b: Read the optional attribute(CatalogList) in AttributeList\n"); + if (ShouldSkip("APPLAUNCHER.S.A0000")) { NextTest(); return; } - err = TestStep3cReadTheOptionalAttributeCurrentAppInAttributeList_6(); + err = TestStep3bReadTheOptionalAttributeCatalogListInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3c: Read the optional attribute(CurrentApp) in AttributeList\n"); + if (ShouldSkip("APPLAUNCHER.S.A0001")) { + NextTest(); + return; + } + err = TestStep3cReadTheOptionalAttributeCurrentAppInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -64745,6 +66258,9 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -64758,7 +66274,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -64879,7 +66395,34 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeCatalogListInAttributeList_5() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeCatalogListInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64902,7 +66445,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentAppInAttributeList_6() + CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentAppInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64925,7 +66468,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -64950,7 +66493,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65039,34 +66582,50 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3b: Read the optional attribute(InputList) in AttributeList\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeInputListInAttributeList_5(); + err = TestStep3aReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3c: Read the optional attribute(CurrentInput) in AttributeList\n"); - if (ShouldSkip("MEDIAINPUT.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3b: Read the optional attribute(InputList) in AttributeList\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestStep3cReadTheOptionalAttributeCurrentInputInAttributeList_6(); + err = TestStep3bReadTheOptionalAttributeInputListInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3c: Read the optional attribute(CurrentInput) in AttributeList\n"); + if (ShouldSkip("MEDIAINPUT.S.A0001")) { + NextTest(); + return; + } + err = TestStep3cReadTheOptionalAttributeCurrentInputInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -65110,6 +66669,9 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -65123,7 +66685,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -65231,7 +66793,32 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeInputListInAttributeList_5() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeInputListInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65252,7 +66839,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentInputInAttributeList_6() + CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentInputInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65273,7 +66860,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65297,7 +66884,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65374,26 +66961,42 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Read the optional attribute(MACAddress) in AttributeList\n"); - if (ShouldSkip("WAKEONLAN.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeMACAddressInAttributeList_4(); + err = TestStep3aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3b: Read the optional attribute(MACAddress) in AttributeList\n"); + if (ShouldSkip("WAKEONLAN.S.A0000")) { + NextTest(); + return; + } + err = TestStep3bReadTheOptionalAttributeMACAddressInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -65431,6 +67034,9 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -65444,7 +67050,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -65533,7 +67139,32 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeMACAddressInAttributeList_4() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeMACAddressInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65554,7 +67185,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65578,7 +67209,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65677,77 +67308,93 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3b: Read the optional attribute(ChannelList): AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeChannelListAttributeList_6(); + err = TestStep3aReadTheGlobalAttributeAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3c: Reading optional attribute(Lineup) in AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3b: Read the optional attribute(ChannelList): AttributeList\n"); + if (ShouldSkip("CHANNEL.S.A0000")) { NextTest(); return; } - err = TestStep3cReadingOptionalAttributeLineupInAttributeList_7(); + err = TestStep3bReadTheOptionalAttributeChannelListAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3d: Read the optional attribute(CurrentChannel): AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3c: Reading optional attribute(Lineup) in AttributeList\n"); + if (ShouldSkip("CHANNEL.S.A0001")) { NextTest(); return; } - err = TestStep3dReadTheOptionalAttributeCurrentChannelAttributeList_8(); + err = TestStep3cReadingOptionalAttributeLineupInAttributeList_8(); break; case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3d: Read the optional attribute(CurrentChannel): AttributeList\n"); + if (ShouldSkip("CHANNEL.S.A0002")) { + NextTest(); + return; + } + err = TestStep3dReadTheOptionalAttributeCurrentChannelAttributeList_9(); + break; + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4a: Read the optional command(ChangeChannel) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 10 : Step 4a: Read the optional command(ChangeChannel) in AcceptedCommandList\n"); if (ShouldSkip("CHANNEL.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4aReadTheOptionalCommandChangeChannelInAcceptedCommandList_9(); + err = TestStep4aReadTheOptionalCommandChangeChannelInAcceptedCommandList_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4b: Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); + " ***** Test Step 11 : Step 4b: Read the optional command(ChangeChannelByNumber) in AcceptedCommandList\n"); if (ShouldSkip("CHANNEL.S.C02.Rsp")) { NextTest(); return; } - err = TestStep4bReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10(); + err = TestStep4bReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 4c: Read the optional command(SkipChannel) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 12 : Step 4c: Read the optional command(SkipChannel) in AcceptedCommandList\n"); if (ShouldSkip("CHANNEL.S.C03.Rsp")) { NextTest(); return; } - err = TestStep4cReadTheOptionalCommandSkipChannelInAcceptedCommandList_11(); + err = TestStep4cReadTheOptionalCommandSkipChannelInAcceptedCommandList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5a: Read the global attribute: GeneratedCommandList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )")) { NextTest(); return; } - err = TestStep5aReadTheGlobalAttributeGeneratedCommandList_12(); + err = TestStep5aReadTheGlobalAttributeGeneratedCommandList_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5b: Read the global attribute: GeneratedCommandList\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5b: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("CHANNEL.S.F00 || CHANNEL.S.F01")) { NextTest(); return; } - err = TestStep5bReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestStep5bReadTheGlobalAttributeGeneratedCommandList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6: Read the global attribute: EventList\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -65806,6 +67453,9 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -65819,7 +67469,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -65946,7 +67596,32 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeChannelListAttributeList_6() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeChannelListAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65967,7 +67642,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadingOptionalAttributeLineupInAttributeList_7() + CHIP_ERROR TestStep3cReadingOptionalAttributeLineupInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -65988,7 +67663,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheOptionalAttributeCurrentChannelAttributeList_8() + CHIP_ERROR TestStep3dReadTheOptionalAttributeCurrentChannelAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66009,7 +67684,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheOptionalCommandChangeChannelInAcceptedCommandList_9() + CHIP_ERROR TestStep4aReadTheOptionalCommandChangeChannelInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66030,7 +67705,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_10() + CHIP_ERROR TestStep4bReadTheOptionalCommandChangeChannelByNumberInAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66051,7 +67726,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalCommandSkipChannelInAcceptedCommandList_11() + CHIP_ERROR TestStep4cReadTheOptionalCommandSkipChannelInAcceptedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66072,7 +67747,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR TestStep5aReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66096,7 +67771,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep5bReadTheGlobalAttributeGeneratedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66192,139 +67867,155 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3b: Read the optional attribute(StartTime) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeStartTimeInAttributeList_6(); + err = TestStep3aReadTheGlobalAttributeAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3c: Read the optional attribute(Duration) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3b: Read the optional attribute(StartTime) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0001")) { NextTest(); return; } - err = TestStep3cReadTheOptionalAttributeDurationInAttributeList_7(); + err = TestStep3bReadTheOptionalAttributeStartTimeInAttributeList_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3d: Read the optional attribute(SampledPosition) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3c: Read the optional attribute(Duration) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0002")) { NextTest(); return; } - err = TestStep3dReadTheOptionalAttributeSampledPositionInAttributeList_8(); + err = TestStep3cReadTheOptionalAttributeDurationInAttributeList_8(); break; case 9: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 3e: Read the optional attribute(PlaybackSpeed) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + chipTool, " ***** Test Step 9 : Step 3d: Read the optional attribute(SampledPosition) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { NextTest(); return; } - err = TestStep3eReadTheOptionalAttributePlaybackSpeedInAttributeList_9(); + err = TestStep3dReadTheOptionalAttributeSampledPositionInAttributeList_9(); break; case 10: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3f: Read the optional attribute(SeekRangeEnd) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0005")) { + chipTool, " ***** Test Step 10 : Step 3e: Read the optional attribute(PlaybackSpeed) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { NextTest(); return; } - err = TestStep3fReadTheOptionalAttributeSeekRangeEndInAttributeList_10(); + err = TestStep3eReadTheOptionalAttributePlaybackSpeedInAttributeList_10(); break; case 11: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 3g: Read the optional attribute(SeekRangeStart) in AttributeList\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0006")) { + chipTool, " ***** Test Step 11 : Step 3f: Read the optional attribute(SeekRangeEnd) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0005")) { NextTest(); return; } - err = TestStep3gReadTheOptionalAttributeSeekRangeStartInAttributeList_11(); + err = TestStep3fReadTheOptionalAttributeSeekRangeEndInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4aReadTheGlobalAttributeAcceptedCommandList_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : Step 3g: Read the optional attribute(SeekRangeStart) in AttributeList\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.A0006")) { + NextTest(); + return; + } + err = TestStep3gReadTheOptionalAttributeSeekRangeStartInAttributeList_12(); break; case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4aReadTheGlobalAttributeAcceptedCommandList_13(); + break; + case 14: ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 4b: Read the optional command(StartOver) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 4b: Read the optional command(StartOver) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } - err = TestStep4bReadTheOptionalCommandStartOverInAcceptedCommandList_13(); + err = TestStep4bReadTheOptionalCommandStartOverInAcceptedCommandList_14(); break; - case 14: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 4c: Read the optional command(Previous) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 15 : Step 4c: Read the optional command(Previous) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } - err = TestStep4cReadTheOptionalCommandPreviousInAcceptedCommandList_14(); + err = TestStep4cReadTheOptionalCommandPreviousInAcceptedCommandList_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4d: Read the optional command(Next) in AcceptedCommandList\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4d: Read the optional command(Next) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } - err = TestStep4dReadTheOptionalCommandNextInAcceptedCommandList_15(); + err = TestStep4dReadTheOptionalCommandNextInAcceptedCommandList_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4e: Read the optional command(Rewind) in AcceptedCommandList\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4e: Read the optional command(Rewind) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } - err = TestStep4eReadTheOptionalCommandRewindInAcceptedCommandList_16(); + err = TestStep4eReadTheOptionalCommandRewindInAcceptedCommandList_17(); break; - case 17: + case 18: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 4f: Read the optional command(FastForward) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 18 : Step 4f: Read the optional command(FastForward) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } - err = TestStep4fReadTheOptionalCommandFastForwardInAcceptedCommandList_17(); + err = TestStep4fReadTheOptionalCommandFastForwardInAcceptedCommandList_18(); break; - case 18: + case 19: ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 4g: Read the optional command(SkipForward) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 19 : Step 4g: Read the optional command(SkipForward) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } - err = TestStep4gReadTheOptionalCommandSkipForwardInAcceptedCommandList_18(); + err = TestStep4gReadTheOptionalCommandSkipForwardInAcceptedCommandList_19(); break; - case 19: + case 20: ChipLogProgress( - chipTool, " ***** Test Step 19 : Step 4h: Read the optional command(SkipBackward) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 20 : Step 4h: Read the optional command(SkipBackward) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } - err = TestStep4hReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19(); + err = TestStep4hReadTheOptionalCommandSkipBackwardInAcceptedCommandList_20(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 4i: Read the optional command(Seek) in AcceptedCommandList\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4i: Read the optional command(Seek) in AcceptedCommandList\n"); if (ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp")) { NextTest(); return; } - err = TestStep4iReadTheOptionalCommandSeekInAcceptedCommandList_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_21(); + err = TestStep4iReadTheOptionalCommandSeekInAcceptedCommandList_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -66407,6 +68098,9 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -66420,7 +68114,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -66548,7 +68242,33 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeStartTimeInAttributeList_6() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeStartTimeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66569,7 +68289,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeDurationInAttributeList_7() + CHIP_ERROR TestStep3cReadTheOptionalAttributeDurationInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66590,7 +68310,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheOptionalAttributeSampledPositionInAttributeList_8() + CHIP_ERROR TestStep3dReadTheOptionalAttributeSampledPositionInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66611,7 +68331,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eReadTheOptionalAttributePlaybackSpeedInAttributeList_9() + CHIP_ERROR TestStep3eReadTheOptionalAttributePlaybackSpeedInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66632,7 +68352,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fReadTheOptionalAttributeSeekRangeEndInAttributeList_10() + CHIP_ERROR TestStep3fReadTheOptionalAttributeSeekRangeEndInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66653,7 +68373,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gReadTheOptionalAttributeSeekRangeStartInAttributeList_11() + CHIP_ERROR TestStep3gReadTheOptionalAttributeSeekRangeStartInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66674,7 +68394,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66697,7 +68417,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalCommandStartOverInAcceptedCommandList_13() + CHIP_ERROR TestStep4bReadTheOptionalCommandStartOverInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66718,7 +68438,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalCommandPreviousInAcceptedCommandList_14() + CHIP_ERROR TestStep4cReadTheOptionalCommandPreviousInAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66739,7 +68459,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheOptionalCommandNextInAcceptedCommandList_15() + CHIP_ERROR TestStep4dReadTheOptionalCommandNextInAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66760,7 +68480,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheOptionalCommandRewindInAcceptedCommandList_16() + CHIP_ERROR TestStep4eReadTheOptionalCommandRewindInAcceptedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66781,7 +68501,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalCommandFastForwardInAcceptedCommandList_17() + CHIP_ERROR TestStep4fReadTheOptionalCommandFastForwardInAcceptedCommandList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66802,7 +68522,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheOptionalCommandSkipForwardInAcceptedCommandList_18() + CHIP_ERROR TestStep4gReadTheOptionalCommandSkipForwardInAcceptedCommandList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66823,7 +68543,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalCommandSkipBackwardInAcceptedCommandList_19() + CHIP_ERROR TestStep4hReadTheOptionalCommandSkipBackwardInAcceptedCommandList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66844,7 +68564,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iReadTheOptionalCommandSeekInAcceptedCommandList_20() + CHIP_ERROR TestStep4iReadTheOptionalCommandSeekInAcceptedCommandList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66865,7 +68585,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_21() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66951,18 +68671,34 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3ReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -67000,6 +68736,9 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -67013,7 +68752,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -67118,7 +68857,34 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67139,7 +68905,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67216,27 +68982,43 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3b: Read the optional attribute(CurrentTarget) in AttributeList\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeCurrentTargetInAttributeList_4(); + err = TestStep3aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3b: Read the optional attribute(CurrentTarget) in AttributeList\n"); + if (ShouldSkip("TGTNAV.S.A0001")) { + NextTest(); + return; + } + err = TestStep3bReadTheOptionalAttributeCurrentTargetInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -67274,6 +69056,9 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -67287,7 +69072,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -67377,7 +69162,33 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeCurrentTargetInAttributeList_4() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeCurrentTargetInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67398,7 +69209,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67419,7 +69230,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67493,42 +69304,58 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Read the optional attribute(VendorName) in AttributeList\n"); - if (ShouldSkip("APBSC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeVendorNameInAttributeList_4(); + err = TestStep3aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3c: Read the optional attribute(VendorID) in AttributeList\n"); - if (ShouldSkip("APBSC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3b: Read the optional attribute(VendorName) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0000")) { NextTest(); return; } - err = TestStep3cReadTheOptionalAttributeVendorIDInAttributeList_5(); + err = TestStep3bReadTheOptionalAttributeVendorNameInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3d: Read the optional attribute(ProductID) in AttributeList\n"); - if (ShouldSkip("APBSC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3c: Read the optional attribute(VendorID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0001")) { NextTest(); return; } - err = TestStep3dReadTheOptionalAttributeProductIDInAttributeList_6(); + err = TestStep3cReadTheOptionalAttributeVendorIDInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3d: Read the optional attribute(ProductID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0003")) { + NextTest(); + return; + } + err = TestStep3dReadTheOptionalAttributeProductIDInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -67572,6 +69399,9 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -67585,7 +69415,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -67679,7 +69509,37 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeVendorNameInAttributeList_4() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeVendorNameInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67700,7 +69560,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeVendorIDInAttributeList_5() + CHIP_ERROR TestStep3cReadTheOptionalAttributeVendorIDInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67721,7 +69581,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheOptionalAttributeProductIDInAttributeList_6() + CHIP_ERROR TestStep3dReadTheOptionalAttributeProductIDInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67742,7 +69602,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67766,7 +69626,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -67865,49 +69725,65 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3aReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3b: Read the optional attribute(AcceptHeader): AttributeList\n"); - if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bReadTheOptionalAttributeAcceptHeaderAttributeList_6(); + err = TestStep3aReadTheGlobalAttributeAttributeList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3b: Read the optional attribute(AcceptHeader): AttributeList\n"); + if (ShouldSkip("CONTENTLAUNCHER.S.A0000")) { + NextTest(); + return; + } + err = TestStep3bReadTheOptionalAttributeAcceptHeaderAttributeList_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3c: Read the optional attribute(SupportedStreamingProtocols): AttributeList\n"); + " ***** Test Step 8 : Step 3c: Read the optional attribute(SupportedStreamingProtocols): AttributeList\n"); if (ShouldSkip("CONTENTLAUNCHER.S.A0001")) { NextTest(); return; } - err = TestStep3cReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7(); + err = TestStep3cReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4a: Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); + " ***** Test Step 9 : Step 4a: Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); if (ShouldSkip("CONTENTLAUNCHER.C.C00.Tx")) { NextTest(); return; } - err = TestStep4aReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8(); + err = TestStep4aReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_9(); break; - case 9: + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4b: Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); + chipTool, " ***** Test Step 10 : Step 4b: Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); if (ShouldSkip("CONTENTLAUNCHER.C.C01.Tx")) { NextTest(); return; } - err = TestStep4bReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_10(); + err = TestStep4bReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -67957,6 +69833,9 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -67970,7 +69849,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -68097,7 +69976,32 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeAcceptHeaderAttributeList_6() + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeAcceptHeaderAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -68118,7 +70022,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_7() + CHIP_ERROR TestStep3cReadTheOptionalAttributeSupportedStreamingProtocolsAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -68139,7 +70043,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_8() + CHIP_ERROR TestStep4aReadTheOptionalCommandLaunchContentInAcceptedCommandListAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -68160,7 +70064,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_9() + CHIP_ERROR TestStep4bReadTheOptionalCommandLaunchURLInAcceptedCommandListAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -68181,7 +70085,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -68255,18 +70159,34 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep3ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AcceptedCommandList\n"); - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: GeneratedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Read the global attribute: AcceptedCommandList\n"); + err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: GeneratedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; } @@ -68301,6 +70221,9 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -68314,7 +70237,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -68403,7 +70326,32 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestStep3ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -68426,7 +70374,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestStep5ReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -76215,37 +78163,53 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT\n"); + " ***** Test Step 6 : Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT\n"); if (ShouldSkip("MOD.S.A0004")) { NextTest(); return; } - err = TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5(); + err = TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4c: TH reads the optional attribute(OnMode) in AttributeList from the DUT\n"); + chipTool, " ***** Test Step 7 : Step 4c: TH reads the optional attribute(OnMode) in AttributeList from the DUT\n"); if (ShouldSkip("MOD.S.A0005")) { NextTest(); return; } - err = TestStep4cThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6(); + err = TestStep4cThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: EventList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_8(); - break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_10(); break; } @@ -76288,6 +78252,9 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -76301,7 +78268,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -76404,7 +78371,36 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_5() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -76425,7 +78421,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_6() + CHIP_ERROR TestStep4cThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -76446,7 +78442,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_8() + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -76467,7 +78463,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_9() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -76879,19 +78875,35 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_5(); - break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_7(); break; } @@ -76925,6 +78937,9 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -76938,7 +78953,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -77030,7 +79045,35 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -77054,7 +79097,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -77813,43 +79856,55 @@ class Test_TC_OO_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_6(); + break; + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4b: Read the feature dependent(OO.S.F00) attribute in AttributeList\n"); + chipTool, " ***** Test Step 7 : Step 4b: Read the feature dependent(OO.S.F00) attribute in AttributeList\n"); if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestStep4bReadTheFeatureDependentOOSF00AttributeInAttributeList_6(); + err = TestStep4bReadTheFeatureDependentOOSF00AttributeInAttributeList_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but " + " ***** Test Step 8 : Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but " "it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_8(); + err = TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); break; case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_9(); + break; + case 10: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); + chipTool, " ***** Test Step 10 : Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_9(); + err = TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_10(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_11(); break; } @@ -77895,6 +79950,9 @@ class Test_TC_OO_1_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -77908,7 +79966,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -78034,7 +80092,33 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheFeatureDependentOOSF00AttributeInAttributeList_6() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheFeatureDependentOOSF00AttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -78059,7 +80143,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() + TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -78069,7 +80153,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_8() + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -78092,7 +80176,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_9() + CHIP_ERROR TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -78115,7 +80199,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80008,70 +82092,86 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList " + " ***** Test Step 5 : Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList " "from the DUT\n"); if (ShouldSkip("OPSTATE.S.A0002")) { NextTest(); return; } - err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_4(); + err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); - if (ShouldSkip("OPSTATE.S.E01")) { + " ***** Test Step 7 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OPSTATE.S.E01")) { NextTest(); return; } NextTest(); return; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6a: Read the optional command(Start) in AcceptedCommandList\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Start) in AcceptedCommandList\n"); if (ShouldSkip("OPSTATE.S.C02")) { NextTest(); return; } - err = TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_7(); + err = TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); if (ShouldSkip("OPSTATE.S.C01")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_8(); + err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6c: Read the optional command(Pause) in AcceptedCommandList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Pause) in AcceptedCommandList\n"); if (ShouldSkip("OPSTATE.S.C00")) { NextTest(); return; } - err = TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_9(); + err = TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); if (ShouldSkip("OPSTATE.S.C03")) { NextTest(); return; } - err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_10(); + err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("(OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03)")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_11(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); break; } @@ -80120,6 +82220,9 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -80133,7 +82236,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -80227,7 +82330,37 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_4() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80250,7 +82383,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_7() + CHIP_ERROR TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80272,7 +82405,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_8() + CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80293,7 +82426,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_9() + CHIP_ERROR TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80315,7 +82448,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_10() + CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80337,7 +82470,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_11() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80451,93 +82584,105 @@ class Test_TC_PS_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8(); + err = TestStep4ReadTheGlobalAttributeAttributeList_8(); break; case 9: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4b: Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F01")) { + chipTool, " ***** Test Step 9 : Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F00")) { NextTest(); return; } - err = TestStep4bReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9(); + err = TestStep4aReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_9(); break; case 10: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 4c: Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F02")) { + chipTool, " ***** Test Step 10 : Step 4b: Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F01")) { NextTest(); return; } - err = TestStep4cReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10(); + err = TestStep4bReadTheFeatureDependentPSSF01BatAttributeInAttributeList_10(); break; case 11: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 4d: Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList\n"); - if (ShouldSkip("PS.S.F03")) { + chipTool, " ***** Test Step 11 : Step 4c: Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F02")) { NextTest(); return; } - err = TestStep4dReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11(); + err = TestStep4cReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : Step 4d: Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList\n"); + if (ShouldSkip("PS.S.F03")) { + NextTest(); + return; + } + err = TestStep4dReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7a: Read the global attribute: EventList\n"); - if (ShouldSkip(" !PS.S.E00 && !PS.S.E01 && !PS.S.E02 ")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7a: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !PS.S.E00 && !PS.S.E01 && !PS.S.E02 ")) { NextTest(); return; } NextTest(); return; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7b: Read PS.S.E00(WiredFaultChange) event in EventList\n"); - if (ShouldSkip("PS.S.E00")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7b: Read PS.S.E00(WiredFaultChange) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E00")) { NextTest(); return; } NextTest(); return; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7c: Read PS.S.E01(BatFaultChange) event in EventList\n"); - if (ShouldSkip("PS.S.E01")) { + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 7c: Read PS.S.E01(BatFaultChange) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E01")) { NextTest(); return; } NextTest(); return; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 7d: Read PS.S.E02(BatChargeFaultChange) event in EventList\n"); - if (ShouldSkip("PS.S.E02")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 7d: Read PS.S.E02(BatChargeFaultChange) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E02")) { NextTest(); return; } NextTest(); return; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 7e: Read EventList attribute from the DUT.For this cluster the list is usually empty " + " ***** Test Step 19 : Step 7e: Read EventList attribute from the DUT.For this cluster the list is usually empty " "but it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_18(); + err = TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_19(); break; } @@ -80607,6 +82752,9 @@ class Test_TC_PS_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -80620,7 +82768,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -80789,7 +82937,36 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_8() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 31UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80810,7 +82987,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheFeatureDependentPSSF01BatAttributeInAttributeList_9() + CHIP_ERROR TestStep4bReadTheFeatureDependentPSSF01BatAttributeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80833,7 +83010,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_10() + CHIP_ERROR TestStep4cReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80855,7 +83032,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_11() + CHIP_ERROR TestStep4dReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80877,7 +83054,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80901,7 +83078,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80926,7 +83103,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_18() + TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_19() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -82165,66 +84342,74 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global mandatory attribute: AttributeList\n"); - if (ShouldSkip("PRS.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PRS.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalMandatoryAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(ScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0010 && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global mandatory attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PRS.S.Afffb")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeScaledValueInAttributeList_5(); + err = TestStep4aReadTheGlobalMandatoryAttributeAttributeList_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(ScaledValue) in AttributeList\n"); + if (ShouldSkip("PRS.S.A0010 && PRS.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeScaledValueInAttributeList_6(); + break; + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4c: Read the optional attribute(MinScaledValue) in AttributeList\n"); + chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(MinScaledValue) in AttributeList\n"); if (ShouldSkip("PRS.S.A0011 && PRS.S.Afffb")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeMinScaledValueInAttributeList_6(); + err = TestStep4cReadTheOptionalAttributeMinScaledValueInAttributeList_7(); break; - case 7: + case 8: ChipLogProgress( - chipTool, " ***** Test Step 7 : Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList\n"); + chipTool, " ***** Test Step 8 : Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList\n"); if (ShouldSkip("PRS.S.A0012 && PRS.S.Afffb")) { NextTest(); return; } - err = TestStep4dReadTheOptionalAttributeMaxScaledValueInAttributeList_7(); + err = TestStep4dReadTheOptionalAttributeMaxScaledValueInAttributeList_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4e: Read the optional attribute(Scale) in AttributeList\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4e: Read the optional attribute(Scale) in AttributeList\n"); if (ShouldSkip("PRS.S.A0014 && PRS.S.Afffb")) { NextTest(); return; } - err = TestStep4eReadTheOptionalAttributeScaleInAttributeList_8(); + err = TestStep4eReadTheOptionalAttributeScaleInAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4f: Read the optional attribute(Tolerance) in AttributeList\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4f: Read the optional attribute(Tolerance) in AttributeList\n"); if (ShouldSkip("PRS.S.A0003 && PRS.S.Afffb")) { NextTest(); return; } - err = TestStep4fReadTheOptionalAttributeToleranceInAttributeList_9(); + err = TestStep4fReadTheOptionalAttributeToleranceInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList\n"); + chipTool, " ***** Test Step 11 : Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList\n"); if (ShouldSkip("PRS.S.A0013 && PRS.S.Afffb")) { NextTest(); return; } - err = TestStep4gReadTheOptionalAttributeScaledToleranceInAttributeList_10(); + err = TestStep4gReadTheOptionalAttributeScaledToleranceInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 12 : Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -82234,11 +84419,11 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); + err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 13 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -82247,11 +84432,11 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 14 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -82260,11 +84445,11 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 15 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -82273,7 +84458,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); break; } @@ -82331,6 +84516,9 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -82344,7 +84532,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -82463,7 +84651,37 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeScaledValueInAttributeList_5() + CHIP_ERROR TestStep4aReadTheGlobalMandatoryAttributeAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global mandatory attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeScaledValueInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82486,7 +84704,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeMinScaledValueInAttributeList_6() + CHIP_ERROR TestStep4cReadTheOptionalAttributeMinScaledValueInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82509,7 +84727,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheOptionalAttributeMaxScaledValueInAttributeList_7() + CHIP_ERROR TestStep4dReadTheOptionalAttributeMaxScaledValueInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82532,7 +84750,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheOptionalAttributeScaleInAttributeList_8() + CHIP_ERROR TestStep4eReadTheOptionalAttributeScaleInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82555,7 +84773,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalAttributeToleranceInAttributeList_9() + CHIP_ERROR TestStep4fReadTheOptionalAttributeToleranceInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82578,7 +84796,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheOptionalAttributeScaledToleranceInAttributeList_10() + CHIP_ERROR TestStep4gReadTheOptionalAttributeScaledToleranceInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82602,7 +84820,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() + TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -82613,7 +84831,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -82624,7 +84842,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -82635,7 +84853,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -83397,172 +85615,180 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("PCC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_10(); break; case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PCC.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_11(); + break; + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the " + " ***** Test Step 12 : Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0003 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_11(); + err = TestStep4bThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the " + " ***** Test Step 13 : Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0004 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_12(); + err = TestStep4cThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the " + " ***** Test Step 14 : Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0005 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4dThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_13(); + err = TestStep4dThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the " + " ***** Test Step 15 : Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0006 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4eThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_14(); + err = TestStep4eThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the " + " ***** Test Step 16 : Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0007 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4fThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_15(); + err = TestStep4fThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the " + " ***** Test Step 17 : Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0008 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4gThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_16(); + err = TestStep4gThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the " + " ***** Test Step 18 : Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0009 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4hThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_17(); + err = TestStep4hThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the " + " ***** Test Step 19 : Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A000a && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4iThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_18(); + err = TestStep4iThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the " + " ***** Test Step 20 : Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A000b && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4jThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_19(); + err = TestStep4jThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_20(); break; - case 20: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the " + " ***** Test Step 21 : Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A000c && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4kThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_20(); + err = TestStep4kThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); + " ***** Test Step 22 : Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); if (ShouldSkip("PCC.S.A0010 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4lThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_21(); + err = TestStep4lThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); + " ***** Test Step 23 : Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); if (ShouldSkip("PCC.S.A0014 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4mThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_22(); + err = TestStep4mThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from " + " ***** Test Step 24 : Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from " "the DUT\n"); if (ShouldSkip("PCC.S.A0015 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4nThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_23(); + err = TestStep4nThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); + " ***** Test Step 25 : Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); if (ShouldSkip("PCC.S.A0016 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4oThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_24(); + err = TestStep4oThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_25(); break; - case 25: + case 26: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList " + " ***** Test Step 26 : Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList " "from the DUT\n"); if (ShouldSkip("PCC.S.A0017 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4pThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_25(); + err = TestStep4pThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_26(); break; - case 26: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 26 : Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the " + " ***** Test Step 27 : Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the " "DUT\n"); if (ShouldSkip("PCC.S.A0021 && PCC.S.Afffb")) { NextTest(); return; } - err = TestStep4qThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_26(); + err = TestStep4qThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_27(); break; - case 27: + case 28: ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4r: TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 28 : Step 4r: TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -83571,22 +85797,13 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); + err = TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: TH reads EventList from DUT\n"); - if (ShouldSkip(" PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && " - "!PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && !PCC.S.E0c && " - "!PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 ")) { - NextTest(); - return; - } - NextTest(); - return; case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); - if (ShouldSkip("PCC.S.E00 && PCC.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && " + "!PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && " + "!PCC.S.E0b && !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 ")) { NextTest(); return; } @@ -83594,8 +85811,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 30: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E01 && PCC.S.Afffa")) { + " ***** Test Step 30 : Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E00 && PCC.S.Afffa")) { NextTest(); return; } @@ -83603,8 +85820,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 31: ChipLogProgress(chipTool, - " ***** Test Step 31 : Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); - if (ShouldSkip("PCC.S.E02 && PCC.S.Afffa")) { + " ***** Test Step 31 : Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E01 && PCC.S.Afffa")) { NextTest(); return; } @@ -83612,8 +85829,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 32: ChipLogProgress(chipTool, - " ***** Test Step 32 : Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); - if (ShouldSkip("PCC.S.E03 && PCC.S.Afffa")) { + " ***** Test Step 32 : Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E02 && PCC.S.Afffa")) { NextTest(); return; } @@ -83621,26 +85838,26 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 33: ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E04 && PCC.S.Afffa")) { + " ***** Test Step 33 : Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E03 && PCC.S.Afffa")) { NextTest(); return; } NextTest(); return; case 34: - ChipLogProgress( - chipTool, " ***** Test Step 34 : Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); - if (ShouldSkip("PCC.S.E05 && PCC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 34 : Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E04 && PCC.S.Afffa")) { NextTest(); return; } NextTest(); return; case 35: - ChipLogProgress(chipTool, - " ***** Test Step 35 : Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E06 && PCC.S.Afffa")) { + ChipLogProgress( + chipTool, " ***** Test Step 35 : Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E05 && PCC.S.Afffa")) { NextTest(); return; } @@ -83648,8 +85865,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 36: ChipLogProgress(chipTool, - " ***** Test Step 36 : Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E07 && PCC.S.Afffa")) { + " ***** Test Step 36 : Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E06 && PCC.S.Afffa")) { NextTest(); return; } @@ -83657,27 +85874,27 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 37: ChipLogProgress(chipTool, - " ***** Test Step 37 : Step 5j: TH reads from the DUT the EventList optional " - "(ElectronicTemperatureHigh)attribute.\n"); - if (ShouldSkip("PCC.S.E08 && PCC.S.Afffa")) { + " ***** Test Step 37 : Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E07 && PCC.S.Afffa")) { NextTest(); return; } NextTest(); return; case 38: - ChipLogProgress( - chipTool, " ***** Test Step 38 : Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); - if (ShouldSkip("PCC.S.E09 && PCC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 38 : Step 5j: TH reads from the DUT the EventList optional " + "(ElectronicTemperatureHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E08 && PCC.S.Afffa")) { NextTest(); return; } NextTest(); return; case 39: - ChipLogProgress(chipTool, - " ***** Test Step 39 : Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E0a && PCC.S.Afffa")) { + ChipLogProgress( + chipTool, " ***** Test Step 39 : Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E09 && PCC.S.Afffa")) { NextTest(); return; } @@ -83685,9 +85902,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 40: ChipLogProgress(chipTool, - " ***** Test Step 40 : Step 5m: TH reads from the DUT the EventList optional " - "(ElectronicNonFatalFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E0b && PCC.S.Afffa")) { + " ***** Test Step 40 : Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0a && PCC.S.Afffa")) { NextTest(); return; } @@ -83695,17 +85911,18 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 41: ChipLogProgress(chipTool, - " ***** Test Step 41 : Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); - if (ShouldSkip("PCC.S.E0c && PCC.S.Afffa")) { + " ***** Test Step 41 : Step 5m: TH reads from the DUT the EventList optional " + "(ElectronicNonFatalFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0b && PCC.S.Afffa")) { NextTest(); return; } NextTest(); return; case 42: - ChipLogProgress( - chipTool, " ***** Test Step 42 : Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); - if (ShouldSkip("PCC.S.E0d && PCC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 42 : Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0c && PCC.S.Afffa")) { NextTest(); return; } @@ -83713,8 +85930,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 43: ChipLogProgress( - chipTool, " ***** Test Step 43 : Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute.\n"); - if (ShouldSkip("PCC.S.E0e && PCC.S.Afffa")) { + chipTool, " ***** Test Step 43 : Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0d && PCC.S.Afffa")) { NextTest(); return; } @@ -83722,17 +85939,17 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 44: ChipLogProgress( - chipTool, " ***** Test Step 44 : Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); - if (ShouldSkip("PCC.S.E0f && PCC.S.Afffa")) { + chipTool, " ***** Test Step 44 : Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0e && PCC.S.Afffa")) { NextTest(); return; } NextTest(); return; case 45: - ChipLogProgress(chipTool, - " ***** Test Step 45 : Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); - if (ShouldSkip("PCC.S.E10 && PCC.S.Afffa")) { + ChipLogProgress( + chipTool, " ***** Test Step 45 : Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0f && PCC.S.Afffa")) { NextTest(); return; } @@ -83740,7 +85957,16 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 46: ChipLogProgress(chipTool, - " ***** Test Step 46 : Step 5s: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " + " ***** Test Step 46 : Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E10 && PCC.S.Afffa")) { + NextTest(); + return; + } + NextTest(); + return; + case 47: + ChipLogProgress(chipTool, + " ***** Test Step 47 : Step 5s: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 3. The list SHALL NOT contain any values in the Test Vendor or " @@ -83750,11 +85976,11 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5sThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_46(); + err = TestStep5sThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47(); break; - case 47: + case 48: ChipLogProgress(chipTool, - " ***** Test Step 47 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 48 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -83763,11 +85989,11 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47(); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48(); break; - case 48: + case 49: ChipLogProgress(chipTool, - " ***** Test Step 48 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 49 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -83776,7 +86002,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_49(); break; } @@ -83936,6 +86162,9 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -83949,7 +86178,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 49; + const uint16_t mTestCount = 50; chip::Optional mNodeId; chip::Optional mCluster; @@ -84198,7 +86427,41 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_11() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84221,7 +86484,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_12() + CHIP_ERROR TestStep4cThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84244,7 +86507,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_13() + CHIP_ERROR TestStep4dThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84267,7 +86530,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_14() + CHIP_ERROR TestStep4eThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84290,7 +86553,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_15() + CHIP_ERROR TestStep4fThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84313,7 +86576,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_16() + CHIP_ERROR TestStep4gThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84336,7 +86599,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_17() + CHIP_ERROR TestStep4hThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84359,7 +86622,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_18() + CHIP_ERROR TestStep4iThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84382,7 +86645,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_19() + CHIP_ERROR TestStep4jThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84405,7 +86668,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_20() + CHIP_ERROR TestStep4kThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84428,7 +86691,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4lThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_21() + CHIP_ERROR TestStep4lThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84451,7 +86714,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4mThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_22() + CHIP_ERROR TestStep4mThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84474,7 +86737,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4nThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_23() + CHIP_ERROR TestStep4nThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84498,7 +86761,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4oThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_24() + CHIP_ERROR TestStep4oThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84521,7 +86784,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4pThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_25() + CHIP_ERROR TestStep4pThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84545,7 +86808,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4qThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_26() + CHIP_ERROR TestStep4qThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84569,7 +86832,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() + TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -84580,7 +86843,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5sThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_46() + TestStep5sThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -84591,7 +86854,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47() + TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -84602,7 +86865,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_49() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -87106,33 +89369,45 @@ class Test_TC_RH_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("RH.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4(); + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("RH.S.A0003")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " + " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " "it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); + err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); break; } @@ -87169,6 +89444,9 @@ class Test_TC_RH_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -87182,7 +89460,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -87280,7 +89558,37 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -87303,7 +89611,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -87329,7 +89637,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -87356,7 +89664,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() + TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -87763,11 +90071,15 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads from the DUT the EventList attribute\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads from the DUT the EventList attribute(SmokeAlarm)\n"); - if (ShouldSkip("SMOKECO.S.E00")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00")) { NextTest(); return; } @@ -87775,7 +90087,7 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads from the DUT the EventList attribute(COAlarm)\n"); - if (ShouldSkip("SMOKECO.S.E01")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01")) { NextTest(); return; } @@ -87783,7 +90095,7 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads from the DUT the EventList attribute(AlarmMuted)\n"); - if (ShouldSkip("SMOKECO.S.E06")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06")) { NextTest(); return; } @@ -87791,7 +90103,7 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads from the DUT the EventList attribute(MuteEnded)\n"); - if (ShouldSkip("SMOKECO.S.E07")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07")) { NextTest(); return; } @@ -87800,7 +90112,7 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { case 20: ChipLogProgress( chipTool, " ***** Test Step 20 : TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)\n"); - if (ShouldSkip("SMOKECO.S.E08")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08")) { NextTest(); return; } @@ -87808,7 +90120,7 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads from the DUT the EventList attribute(InterconnectCOAlarm)\n"); - if (ShouldSkip("SMOKECO.S.E09")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09")) { NextTest(); return; } @@ -90564,41 +92876,40 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4b: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!SWTCH.S.F04")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04")) { NextTest(); return; } err = TestStep4bReadTheGlobalAttributeAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: Read the global attribute: EventList \n"); - if (ShouldSkip(" !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4b: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4bReadTheGlobalAttributeAttributeList_10(); + break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5b: Read EventList if SWTCH.S.F00(LS)\n"); - if (ShouldSkip("SWTCH.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: Read the global attribute: EventList \n"); + if (ShouldSkip( + "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { NextTest(); return; } NextTest(); return; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5c: Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)\n"); - if (ShouldSkip("SWTCH.S.F01 && !SWTCH.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5b: Read EventList if SWTCH.S.F00(LS)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F00")) { NextTest(); return; } NextTest(); return; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " - "!SWTCH.S.F04(MSM)\n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5c: Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && !SWTCH.S.F02")) { NextTest(); return; } @@ -90606,9 +92917,9 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return; case 14: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " + " ***** Test Step 14 : Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " "!SWTCH.S.F04(MSM)\n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { NextTest(); return; } @@ -90616,9 +92927,9 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return; case 15: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " - "SWTCH.S.F04(MSM) \n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04")) { + " ***** Test Step 15 : Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " + "!SWTCH.S.F04(MSM)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04")) { NextTest(); return; } @@ -90626,21 +92937,31 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return; case 16: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " + " ***** Test Step 16 : Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " "SWTCH.S.F04(MSM) \n"); - if (ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04")) { NextTest(); return; } NextTest(); return; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_17(); - break; + ChipLogProgress(chipTool, + " ***** Test Step 17 : Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " + "SWTCH.S.F04(MSM) \n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04")) { + NextTest(); + return; + } + NextTest(); + return; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_19(); break; } @@ -90710,6 +93031,9 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -90723,7 +93047,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -90930,7 +93254,34 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_17() + CHIP_ERROR TestStep4bReadTheGlobalAttributeAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -90949,7 +93300,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_18() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -91026,33 +93377,45 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("TMP.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4(); + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read AcceptedCommandList attribute from the DUT\n"); - err = TestStep5ReadAcceptedCommandListAttributeFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("TMP.S.A0003")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read GeneratedCommandList attribute from the DUT\n"); - err = TestStep6ReadGeneratedCommandListAttributeFromTheDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: Read AcceptedCommandList attribute from the DUT\n"); + err = TestStep5ReadAcceptedCommandListAttributeFromTheDut_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: Read GeneratedCommandList attribute from the DUT\n"); + err = TestStep6ReadGeneratedCommandListAttributeFromTheDut_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " + " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " "it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); + err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); break; } @@ -91089,6 +93452,9 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -91102,7 +93468,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -91200,7 +93566,37 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_4() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -91223,7 +93619,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadAcceptedCommandListAttributeFromTheDut_5() + CHIP_ERROR TestStep5ReadAcceptedCommandListAttributeFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -91249,7 +93645,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadGeneratedCommandListAttributeFromTheDut_6() + CHIP_ERROR TestStep6ReadGeneratedCommandListAttributeFromTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -91276,7 +93672,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() + TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -91639,140 +94035,152 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_9(); break; case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_10(); + break; + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + " ***** Test Step 11 : Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10(); + err = TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + " ***** Test Step 12 : Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11(); + err = TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + " ***** Test Step 13 : Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12(); + err = TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 14 : Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13(); + err = TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 15 : Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14(); + err = TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); + " ***** Test Step 16 : Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15(); + err = TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); + " ***** Test Step 17 : Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16(); + err = TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); + " ***** Test Step 18 : Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F04")) { NextTest(); return; } - err = TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17(); + err = TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 19 : Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5aReadTheGlobalAttributeAcceptedCommandList_19(); + err = TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_19(); break; case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5aReadTheGlobalAttributeAcceptedCommandList_20(); + break; + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); + " ***** Test Step 21 : Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20(); + err = TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_21(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Step 6a: Read the global attribute: GeneratedCommandList\n"); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6a: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp ")) { NextTest(); return; } - err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_21(); + err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); + " ***** Test Step 23 : Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_22(); + err = TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); + " ***** Test Step 24 : Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); if (ShouldSkip("TSTAT.S.C04.Rsp")) { NextTest(); return; } - err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_23(); + err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_24(); break; - case 24: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " + " ***** Test Step 25 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " "but it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_24(); + err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_25(); break; } @@ -91860,6 +94268,9 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -91873,7 +94284,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 25; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -92079,7 +94490,35 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_10() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92100,7 +94539,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_11() + CHIP_ERROR TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92121,7 +94560,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_12() + CHIP_ERROR TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92142,7 +94581,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_13() + CHIP_ERROR TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92164,7 +94603,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_14() + CHIP_ERROR TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92186,7 +94625,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_15() + CHIP_ERROR TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92209,7 +94648,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_16() + CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92232,7 +94671,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_17() + CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92255,7 +94694,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_18() + CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92279,7 +94718,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aReadTheGlobalAttributeAcceptedCommandList_19() + CHIP_ERROR TestStep5aReadTheGlobalAttributeAcceptedCommandList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92300,7 +94739,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_20() + CHIP_ERROR TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92324,7 +94763,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeGeneratedCommandList_21() + CHIP_ERROR TestStep6aReadTheGlobalAttributeGeneratedCommandList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92348,7 +94787,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_22() + CHIP_ERROR TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92369,7 +94808,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_23() + CHIP_ERROR TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92391,7 +94830,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_24() + TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_25() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -92454,25 +94893,37 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " + " ***** Test Step 7 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " "it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); + err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); break; } @@ -92506,6 +94957,9 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -92519,7 +94973,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -92617,7 +95071,37 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92643,7 +95127,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -92670,7 +95154,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() + TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -94213,106 +96697,118 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4a: TH reads mandatory attributes in AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aThReadsMandatoryAttributesInAttributeListFromDut_7(); break; case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4a: TH reads mandatory attributes in AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsMandatoryAttributesInAttributeListFromDut_8(); + break; + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4b: TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList\n"); + " ***** Test Step 9 : Step 4b: TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList\n"); if (ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01")) { NextTest(); return; } - err = TestStep4bThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8(); + err = TestStep4bThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4c: TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList\n"); + " ***** Test Step 10 : Step 4c: TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList\n"); if (ShouldSkip("DGTHREAD.S.F02")) { NextTest(); return; } - err = TestStep4cThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_9(); + err = TestStep4cThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4d: TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList\n"); + " ***** Test Step 11 : Step 4d: TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList\n"); if (ShouldSkip("DGTHREAD.S.F03")) { NextTest(); return; } - err = TestStep4dThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_10(); + err = TestStep4dThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 4e: Read the optional attribute (ActiveTimestamp) in AttributeList\n"); + chipTool, " ***** Test Step 12 : Step 4e: Read the optional attribute (ActiveTimestamp) in AttributeList\n"); if (ShouldSkip("DGTHREAD.S.A0038")) { NextTest(); return; } - err = TestStep4eReadTheOptionalAttributeActiveTimestampInAttributeList_11(); + err = TestStep4eReadTheOptionalAttributeActiveTimestampInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 4f: Read the optional attribute (PendingTimestamp) in AttributeList\n"); + chipTool, " ***** Test Step 13 : Step 4f: Read the optional attribute (PendingTimestamp) in AttributeList\n"); if (ShouldSkip("DGTHREAD.S.A0039")) { NextTest(); return; } - err = TestStep4fReadTheOptionalAttributePendingTimestampInAttributeList_12(); + err = TestStep4fReadTheOptionalAttributePendingTimestampInAttributeList_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4g: Read the optional attribute (Delay) in AttributeList\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4g: Read the optional attribute (Delay) in AttributeList\n"); if (ShouldSkip("DGTHREAD.S.A003a")) { NextTest(); return; } - err = TestStep4gReadTheOptionalAttributeDelayInAttributeList_13(); + err = TestStep4gReadTheOptionalAttributeDelayInAttributeList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5a: TH reads EventList from DUT\n"); - if (ShouldSkip(" !DGTHREAD.S.E00 && !DGTHREAD.S.E01 ")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGTHREAD.S.E00 && !DGTHREAD.S.E01 ")) { NextTest(); return; } NextTest(); return; - case 15: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList\n"); - if (ShouldSkip("DGTHREAD.S.E00")) { + chipTool, " ***** Test Step 16 : Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E00")) { NextTest(); return; } NextTest(); return; - case 16: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList\n"); - if (ShouldSkip("DGTHREAD.S.E01")) { + chipTool, " ***** Test Step 17 : Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E01")) { NextTest(); return; } NextTest(); return; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6a: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !DGTHREAD.S.F01 ")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_17(); + err = TestStep6aThReadsAcceptedCommandListFromDut_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6b: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DGTHREAD.S.F01")) { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListFromDut_18(); + err = TestStep6bThReadsAcceptedCommandListFromDut_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_19(); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_20(); break; } @@ -94385,6 +96881,9 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -94398,7 +96897,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -94594,7 +97093,51 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8() + CHIP_ERROR TestStep4aThReadsMandatoryAttributesInAttributeListFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads mandatory attributes in AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 59UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 60UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 61UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 62UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94617,7 +97160,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_9() + CHIP_ERROR TestStep4cThReadsFeatureDependentAttributeDgthreadsf02mlecntInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94647,7 +97190,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_10() + CHIP_ERROR TestStep4dThReadsFeatureDependentAttributeDgthreadsf03maccntInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94703,7 +97246,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheOptionalAttributeActiveTimestampInAttributeList_11() + CHIP_ERROR TestStep4eReadTheOptionalAttributeActiveTimestampInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94726,7 +97269,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalAttributePendingTimestampInAttributeList_12() + CHIP_ERROR TestStep4fReadTheOptionalAttributePendingTimestampInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94749,7 +97292,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheOptionalAttributeDelayInAttributeList_13() + CHIP_ERROR TestStep4gReadTheOptionalAttributeDelayInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94772,7 +97315,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_17() + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94798,7 +97341,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_18() + CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94821,7 +97364,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_19() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94968,195 +97511,211 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : TS4: Check for mandatory attributes in AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestTs4CheckForMandatoryAttributesInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TS4: Check for optional attribute TimeSource in AttributeList\n"); - if (ShouldSkip("TIMESYNC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TS4: Check for mandatory attributes in AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestTs4CheckForOptionalAttributeTimeSourceInAttributeList_11(); + err = TestTs4CheckForMandatoryAttributesInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TS4: Check for optional attribute TimeSource not in AttributeList\n"); - if (ShouldSkip("!TIMESYNC.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TS4: Check for optional attribute TimeSource in AttributeList\n"); + if (ShouldSkip("TIMESYNC.S.A0002")) { NextTest(); return; } - err = TestTs4CheckForOptionalAttributeTimeSourceNotInAttributeList_12(); + err = TestTs4CheckForOptionalAttributeTimeSourceInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TS4: Check for TZ feature-based attributes in AttributeList\n"); - if (ShouldSkip("TIMESYNC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TS4: Check for optional attribute TimeSource not in AttributeList\n"); + if (ShouldSkip("!TIMESYNC.S.A0002")) { NextTest(); return; } - err = TestTs4CheckForTzFeatureBasedAttributesInAttributeList_13(); + err = TestTs4CheckForOptionalAttributeTimeSourceNotInAttributeList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TS4: Check for TZ feature-based attributes not in AttributeList\n"); - if (ShouldSkip("!TIMESYNC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TS4: Check for TZ feature-based attributes in AttributeList\n"); + if (ShouldSkip("TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs4CheckForTzFeatureBasedAttributesNotInAttributeList_14(); + err = TestTs4CheckForTzFeatureBasedAttributesInAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TS4: Check for NTPC feature-based attributes in AttributeList\n"); - if (ShouldSkip("TIMESYNC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TS4: Check for TZ feature-based attributes not in AttributeList\n"); + if (ShouldSkip("!TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs4CheckForNtpcFeatureBasedAttributesInAttributeList_15(); + err = TestTs4CheckForTzFeatureBasedAttributesNotInAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TS4: Check for NTPC feature-based attributes not in AttributeList\n"); - if (ShouldSkip("!TIMESYNC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TS4: Check for NTPC feature-based attributes in AttributeList\n"); + if (ShouldSkip("TIMESYNC.S.F01")) { NextTest(); return; } - err = TestTs4CheckForNtpcFeatureBasedAttributesNotInAttributeList_16(); + err = TestTs4CheckForNtpcFeatureBasedAttributesInAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TS4: Check for NTPS feature-based attributes in AttributeList\n"); - if (ShouldSkip("TIMESYNC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TS4: Check for NTPC feature-based attributes not in AttributeList\n"); + if (ShouldSkip("!TIMESYNC.S.F01")) { NextTest(); return; } - err = TestTs4CheckForNtpsFeatureBasedAttributesInAttributeList_17(); + err = TestTs4CheckForNtpcFeatureBasedAttributesNotInAttributeList_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TS4: Check for NTPS feature-based attributes not in AttributeList\n"); - if (ShouldSkip("!TIMESYNC.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TS4: Check for NTPS feature-based attributes in AttributeList\n"); + if (ShouldSkip("TIMESYNC.S.F02")) { NextTest(); return; } - err = TestTs4CheckForNtpsFeatureBasedAttributesNotInAttributeList_18(); + err = TestTs4CheckForNtpsFeatureBasedAttributesInAttributeList_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TS4: Check for TSC feature-based attributes in AttributeList\n"); - if (ShouldSkip("TIMESYNC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TS4: Check for NTPS feature-based attributes not in AttributeList\n"); + if (ShouldSkip("!TIMESYNC.S.F02")) { NextTest(); return; } - err = TestTs4CheckForTscFeatureBasedAttributesInAttributeList_19(); + err = TestTs4CheckForNtpsFeatureBasedAttributesNotInAttributeList_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TS4: Check for TSC feature-based attributes not in AttributeList\n"); - if (ShouldSkip("!TIMESYNC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TS4: Check for TSC feature-based attributes in AttributeList\n"); + if (ShouldSkip("TIMESYNC.S.F03")) { NextTest(); return; } - err = TestTs4CheckForTscFeatureBasedAttributesNotInAttributeList_20(); + err = TestTs4CheckForTscFeatureBasedAttributesInAttributeList_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TS5: Check for mandatory events in EventList\n"); - NextTest(); - return; + ChipLogProgress(chipTool, " ***** Test Step 21 : TS4: Check for TSC feature-based attributes not in AttributeList\n"); + if (ShouldSkip("!TIMESYNC.S.F03")) { + NextTest(); + return; + } + err = TestTs4CheckForTscFeatureBasedAttributesNotInAttributeList_21(); + break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TS5: Check for TZ feature-based events in EventList\n"); - if (ShouldSkip("TIMESYNC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 22 : TS5: Check for mandatory events in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TS5: Check for TZ feature-based events not in EventList\n"); - if (ShouldSkip("!TIMESYNC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 23 : TS5: Check for TZ feature-based events in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00")) { NextTest(); return; } NextTest(); return; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TS5: Check for TSC feature-based events in EventList\n"); - if (ShouldSkip("TIMESYNC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TS5: Check for TZ feature-based events not in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F00")) { NextTest(); return; } NextTest(); return; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TS5: Check for TSC feature-based events not in EventList\n"); - if (ShouldSkip("!TIMESYNC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : TS5: Check for TSC feature-based events in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03")) { NextTest(); return; } NextTest(); return; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TS6: Check for mandatory commands in AcceptedCommandList\n"); - err = TestTs6CheckForMandatoryCommandsInAcceptedCommandList_26(); - break; + ChipLogProgress(chipTool, " ***** Test Step 26 : TS5: Check for TSC feature-based events not in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03")) { + NextTest(); + return; + } + NextTest(); + return; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 27 : TS6: Check for mandatory commands in AcceptedCommandList\n"); + err = TestTs6CheckForMandatoryCommandsInAcceptedCommandList_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_27(); + err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_28(); break; - case 28: + case 29: ChipLogProgress( - chipTool, " ***** Test Step 28 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 29 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_28(); + err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_29(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TS6: Check for NTPC feature-based commands in AcceptedCommandList\n"); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TS6: Check for NTPC feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F01")) { NextTest(); return; } - err = TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_29(); + err = TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_30(); break; - case 30: + case 31: ChipLogProgress( - chipTool, " ***** Test Step 30 : TS6: Check for NTPC feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 31 : TS6: Check for NTPC feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F01")) { NextTest(); return; } - err = TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_30(); + err = TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_31(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TS6: Check for TSC feature-based commands in AcceptedCommandList\n"); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : TS6: Check for TSC feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F03")) { NextTest(); return; } - err = TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_31(); + err = TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_32(); break; - case 32: + case 33: ChipLogProgress( - chipTool, " ***** Test Step 32 : TS6: Check for TSC feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 33 : TS6: Check for TSC feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F03")) { NextTest(); return; } - err = TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_32(); + err = TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_33(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_33(); + err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_34(); break; - case 34: + case 35: ChipLogProgress( - chipTool, " ***** Test Step 34 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 35 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_34(); + err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_35(); break; } @@ -95274,6 +97833,9 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -95287,7 +97849,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 35; + const uint16_t mTestCount = 36; chip::Optional mNodeId; chip::Optional mCluster; @@ -95524,7 +98086,35 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForOptionalAttributeTimeSourceInAttributeList_11() + CHIP_ERROR TestTs4CheckForMandatoryAttributesInAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TS4: Check for mandatory attributes in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTs4CheckForOptionalAttributeTimeSourceInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95546,7 +98136,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForOptionalAttributeTimeSourceNotInAttributeList_12() + CHIP_ERROR TestTs4CheckForOptionalAttributeTimeSourceNotInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95568,7 +98158,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForTzFeatureBasedAttributesInAttributeList_13() + CHIP_ERROR TestTs4CheckForTzFeatureBasedAttributesInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95595,7 +98185,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForTzFeatureBasedAttributesNotInAttributeList_14() + CHIP_ERROR TestTs4CheckForTzFeatureBasedAttributesNotInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95622,7 +98212,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForNtpcFeatureBasedAttributesInAttributeList_15() + CHIP_ERROR TestTs4CheckForNtpcFeatureBasedAttributesInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95645,7 +98235,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForNtpcFeatureBasedAttributesNotInAttributeList_16() + CHIP_ERROR TestTs4CheckForNtpcFeatureBasedAttributesNotInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95668,7 +98258,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForNtpsFeatureBasedAttributesInAttributeList_17() + CHIP_ERROR TestTs4CheckForNtpsFeatureBasedAttributesInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95690,7 +98280,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForNtpsFeatureBasedAttributesNotInAttributeList_18() + CHIP_ERROR TestTs4CheckForNtpsFeatureBasedAttributesNotInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95712,7 +98302,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForTscFeatureBasedAttributesInAttributeList_19() + CHIP_ERROR TestTs4CheckForTscFeatureBasedAttributesInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95734,7 +98324,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs4CheckForTscFeatureBasedAttributesNotInAttributeList_20() + CHIP_ERROR TestTs4CheckForTscFeatureBasedAttributesNotInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95756,7 +98346,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForMandatoryCommandsInAcceptedCommandList_26() + CHIP_ERROR TestTs6CheckForMandatoryCommandsInAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95778,7 +98368,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_27() + CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95801,7 +98391,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_28() + CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95824,7 +98414,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_29() + CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95846,7 +98436,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_30() + CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95868,7 +98458,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_31() + CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95890,7 +98480,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_32() + CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95912,7 +98502,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_33() + CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -95934,7 +98524,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_34() + CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -96305,15 +98895,23 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("ULABEL.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 4b: Read the global attribute: AttributeList. 1.The list SHALL NOT contain any " + " ***** Test Step 5 : Step 4b: Read the global attribute: AttributeList. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -96323,11 +98921,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4(); + err = TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 5: Read the global attribute: EventList. 1.The list MAY contain values in the " + " ***** Test Step 6 : Step 5: Read the global attribute: EventList. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -96336,11 +98934,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5ReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep5ReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 6: Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the " + " ***** Test Step 7 : Step 6: Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -96349,11 +98947,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in " + " ***** Test Step 8 : Step 7: Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -96362,7 +98960,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; } @@ -96399,6 +98997,9 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -96412,7 +99013,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -96502,8 +99103,34 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_4() + TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -96514,7 +99141,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5ReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + TestStep5ReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -96525,7 +99152,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6ReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + TestStep6ReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -96536,7 +99163,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -97332,87 +99959,99 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aThReadsAttributeListFromDut_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_6(); + break; + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4b: TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); + " ***** Test Step 7 : Step 4b: TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); if (ShouldSkip("DGWIFI.S.F00")) { NextTest(); return; } - err = TestStep4bThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6(); + err = TestStep4bThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 4c: TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); + " ***** Test Step 8 : Step 4c: TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); if (ShouldSkip("DGWIFI.S.F01")) { NextTest(); return; } - err = TestStep4cThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7(); + err = TestStep4cThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 4d: TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); + chipTool, " ***** Test Step 9 : Step 4d: TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); if (ShouldSkip("DGWIFI.S.A000b")) { NextTest(); return; } - err = TestStep4dThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8(); + err = TestStep4dThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5a: TH reads AcceptedCommandList from DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !DGWIFI.S.F01 ")) { NextTest(); return; } - err = TestStep5aThReadsAcceptedCommandListFromDut_9(); + err = TestStep5aThReadsAcceptedCommandListFromDut_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 5b: TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from " + " ***** Test Step 11 : Step 5b: TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from " "DUT\n"); if (ShouldSkip("DGWIFI.S.F01")) { NextTest(); return; } - err = TestStep5bThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6: TH reads GeneratedCommandList from DUT\n"); - err = TestStep6ThReadsGeneratedCommandListFromDut_11(); + err = TestStep5bThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7a: TH reads EventList from DUT\n"); - if (ShouldSkip(" !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 ")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6: TH reads GeneratedCommandList from DUT\n"); + err = TestStep6ThReadsGeneratedCommandListFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7a: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 ")) { NextTest(); return; } NextTest(); return; - case 13: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT\n"); - if (ShouldSkip("DGWIFI.S.E00")) { + chipTool, " ***** Test Step 14 : Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E00")) { NextTest(); return; } NextTest(); return; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT\n"); - if (ShouldSkip("DGWIFI.S.E01")) { + " ***** Test Step 15 : Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E01")) { NextTest(); return; } NextTest(); return; - case 15: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT\n"); - if (ShouldSkip("DGWIFI.S.E02")) { + chipTool, " ***** Test Step 16 : Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E02")) { NextTest(); return; } @@ -97477,6 +100116,9 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -97490,7 +100132,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -97632,7 +100274,39 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_6() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -97659,7 +100333,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_7() + CHIP_ERROR TestStep4cThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -97683,7 +100357,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_8() + CHIP_ERROR TestStep4dThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -97706,7 +100380,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThReadsAcceptedCommandListFromDut_9() + CHIP_ERROR TestStep5aThReadsAcceptedCommandListFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -97732,7 +100406,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_10() + CHIP_ERROR TestStep5bThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -97755,7 +100429,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsGeneratedCommandListFromDut_11() + CHIP_ERROR TestStep6ThReadsGeneratedCommandListFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -98803,109 +101477,122 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute\n"); - if (ShouldSkip("WNCV.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsFromTheDutThe0xFFFBAttributeListAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList\n"); - if (ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeSafetyStatusInAttributeList_9(); + err = TestStep4aThReadsFromTheDutThe0xFFFBAttributeListAttribute_9(); break; case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList\n"); + if (ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a")) { + NextTest(); + return; + } + err = TestStep4bThReadsOptionalAttributeSafetyStatusInAttributeList_10(); + break; + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in " + " ***** Test Step 11 : Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in " "AttributeList\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestStep4cReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10(); + err = TestStep4cReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); + " ***** Test Step 12 : Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestStep4dReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11(); + err = TestStep4dReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " + " ***** Test Step 13 : Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " "AttributeList\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestStep4eReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12(); + err = TestStep4eReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); + " ***** Test Step 14 : Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestStep4fReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13(); + err = TestStep4fReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5: Read the global attribute: EventList\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 15: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); + chipTool, " ***** Test Step 16 : Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); if (ShouldSkip("WNCV.S.Afff9")) { NextTest(); return; } - err = TestStep6aThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_15(); + err = TestStep6aThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in " + " ***** Test Step 17 : Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in " "AcceptedCommandList\n"); if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02")) { NextTest(); return; } - err = TestStep6bThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_16(); + err = TestStep6bThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in " + " ***** Test Step 18 : Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in " "AcceptedCommandList\n"); if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03")) { NextTest(); return; } - err = TestStep6cThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_17(); + err = TestStep6cThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in " + " ***** Test Step 19 : Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in " "AcceptedCommandList\n"); if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04")) { NextTest(); return; } - err = TestStep6dThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_18(); + err = TestStep6dThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_19(); break; - case 19: + case 20: ChipLogProgress( - chipTool, " ***** Test Step 19 : Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute\n"); + chipTool, " ***** Test Step 20 : Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute\n"); if (ShouldSkip("WNCV.S.Afff8")) { NextTest(); return; } - err = TestStep7ThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_19(); + err = TestStep7ThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_20(); break; } @@ -98978,6 +101665,9 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -98991,7 +101681,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -99183,7 +101873,37 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeSafetyStatusInAttributeList_9() + CHIP_ERROR TestStep4aThReadsFromTheDutThe0xFFFBAttributeListAttribute_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributeSafetyStatusInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99204,7 +101924,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_10() + CHIP_ERROR TestStep4cReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99227,7 +101947,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_11() + CHIP_ERROR TestStep4dReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99249,7 +101969,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_12() + CHIP_ERROR TestStep4eReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99272,7 +101992,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_13() + CHIP_ERROR TestStep4fReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99294,7 +102014,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_15() + CHIP_ERROR TestStep6aThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99317,7 +102037,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_16() + CHIP_ERROR TestStep6bThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99338,7 +102058,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_17() + CHIP_ERROR TestStep6cThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99359,7 +102079,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_18() + CHIP_ERROR TestStep6dThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99380,7 +102100,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_19() + CHIP_ERROR TestStep7ThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -133986,59 +136706,71 @@ class TestBasicInformation : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read AttributeList value\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestReadAttributeListValue_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read NodeLabel\n"); - err = TestReadNodeLabel_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read AttributeList value\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestReadAttributeListValue_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Write NodeLabel\n"); - err = TestWriteNodeLabel_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read NodeLabel\n"); + err = TestReadNodeLabel_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read back NodeLabel\n"); - err = TestReadBackNodeLabel_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Write NodeLabel\n"); + err = TestWriteNodeLabel_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read LocalConfigDisabled\n"); - err = TestReadLocalConfigDisabled_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Read back NodeLabel\n"); + err = TestReadBackNodeLabel_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write LocalConfigDisabled\n"); - err = TestWriteLocalConfigDisabled_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read LocalConfigDisabled\n"); + err = TestReadLocalConfigDisabled_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read back LocalConfigDisabled\n"); - err = TestReadBackLocalConfigDisabled_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Write LocalConfigDisabled\n"); + err = TestWriteLocalConfigDisabled_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reboot the device\n"); - err = TestRebootTheDevice_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Read back LocalConfigDisabled\n"); + err = TestReadBackLocalConfigDisabled_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Connect to the device again\n"); - err = TestConnectToTheDeviceAgain_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reboot the device\n"); + err = TestRebootTheDevice_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read back NodeLabel after reboot\n"); - err = TestReadBackNodeLabelAfterReboot_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Connect to the device again\n"); + err = TestConnectToTheDeviceAgain_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Restore initial NodeLabel value\n"); - err = TestRestoreInitialNodeLabelValue_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Read back NodeLabel after reboot\n"); + err = TestReadBackNodeLabelAfterReboot_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read back LocalConfigDisabled after reboot\n"); - err = TestReadBackLocalConfigDisabledAfterReboot_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Restore initial NodeLabel value\n"); + err = TestRestoreInitialNodeLabelValue_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Restore initial LocalConfigDisabled value\n"); - err = TestRestoreInitialLocalConfigDisabledValue_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read back LocalConfigDisabled after reboot\n"); + err = TestReadBackLocalConfigDisabledAfterReboot_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read the ProductApppearance value\n"); - err = TestReadTheProductApppearanceValue_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Restore initial LocalConfigDisabled value\n"); + err = TestRestoreInitialLocalConfigDisabledValue_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the ProductApppearance value\n"); + err = TestReadTheProductApppearanceValue_19(); break; } @@ -134108,6 +136840,9 @@ class TestBasicInformation : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -134121,7 +136856,7 @@ class TestBasicInformation : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -134273,7 +137008,55 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadNodeLabel_6() + CHIP_ERROR TestReadAttributeListValue_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AttributeList value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(25))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 5UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 6UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 7UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 8UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 9UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 10UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 11UL)); + VerifyOrReturn(CheckValue("", actualValue[12], 12UL)); + VerifyOrReturn(CheckValue("", actualValue[13], 13UL)); + VerifyOrReturn(CheckValue("", actualValue[14], 14UL)); + VerifyOrReturn(CheckValue("", actualValue[15], 15UL)); + VerifyOrReturn(CheckValue("", actualValue[16], 16UL)); + VerifyOrReturn(CheckValue("", actualValue[17], 18UL)); + VerifyOrReturn(CheckValue("", actualValue[18], 19UL)); + VerifyOrReturn(CheckValue("", actualValue[19], 20UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65533UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadNodeLabel_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134296,7 +137079,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteNodeLabel_7() + CHIP_ERROR TestWriteNodeLabel_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134317,7 +137100,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackNodeLabel_8() + CHIP_ERROR TestReadBackNodeLabel_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134340,7 +137123,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadLocalConfigDisabled_9() + CHIP_ERROR TestReadLocalConfigDisabled_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134363,7 +137146,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteLocalConfigDisabled_10() + CHIP_ERROR TestWriteLocalConfigDisabled_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134384,7 +137167,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackLocalConfigDisabled_11() + CHIP_ERROR TestReadBackLocalConfigDisabled_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134407,14 +137190,14 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootTheDevice_12() + CHIP_ERROR TestRebootTheDevice_13() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestConnectToTheDeviceAgain_13() + CHIP_ERROR TestConnectToTheDeviceAgain_14() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -134422,7 +137205,7 @@ class TestBasicInformation : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadBackNodeLabelAfterReboot_14() + CHIP_ERROR TestReadBackNodeLabelAfterReboot_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134445,7 +137228,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRestoreInitialNodeLabelValue_15() + CHIP_ERROR TestRestoreInitialNodeLabelValue_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134466,7 +137249,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackLocalConfigDisabledAfterReboot_16() + CHIP_ERROR TestReadBackLocalConfigDisabledAfterReboot_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134489,7 +137272,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRestoreInitialLocalConfigDisabledValue_17() + CHIP_ERROR TestRestoreInitialLocalConfigDisabledValue_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134510,7 +137293,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheProductApppearanceValue_18() + CHIP_ERROR TestReadTheProductApppearanceValue_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147147,51 +149930,59 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("DGSW.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb")) { NextTest(); return; } err = TestStep4aThReadsAttributeListFromDut_4(); break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_5(); + break; + case 6: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList\n"); + chipTool, " ***** Test Step 6 : Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList\n"); if (ShouldSkip("DGSW.S.A0000 && DGSW.S.Afffb")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeThreadMetricsInAttributeList_5(); + err = TestStep4bThReadsOptionalAttributeThreadMetricsInAttributeList_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList\n"); + chipTool, " ***** Test Step 7 : Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList\n"); if (ShouldSkip("DGSW.S.A0001 && DGSW.S.Afffb")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributeCurrentHeapFreeInAttributeList_6(); + err = TestStep4cThReadsOptionalAttributeCurrentHeapFreeInAttributeList_7(); break; - case 7: + case 8: ChipLogProgress( - chipTool, " ***** Test Step 7 : Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList\n"); + chipTool, " ***** Test Step 8 : Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList\n"); if (ShouldSkip("DGSW.S.A0002 && DGSW.S.Afffb")) { NextTest(); return; } - err = TestStep4dThReadsOptionalAttributeCurrentHeapUsedInAttributeList_7(); + err = TestStep4dThReadsOptionalAttributeCurrentHeapUsedInAttributeList_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList\n"); + " ***** Test Step 9 : Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList\n"); if (ShouldSkip("( DGSW.S.F00 || DGSW.S.A0003 ) && DGSW.S.Afffb")) { NextTest(); return; } - err = TestStep4eThReadsFeatureDependentAttributeCurrentHeapHighWatermarkInAttributeList_8(); + err = TestStep4eThReadsFeatureDependentAttributeCurrentHeapHighWatermarkInAttributeList_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4f: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 10 : Step 4f: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " @@ -147201,27 +149992,27 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: TH reads EventList from DUT\n"); - if (ShouldSkip("DGSW.S.E00 && DGSW.S.Afffa")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.E00 && DGSW.S.Afffa")) { NextTest(); return; } NextTest(); return; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5b: TH reads EventList from DUT\n"); - if (ShouldSkip(" !DGSW.S.E00 && DGSW.S.Afffa ")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5b: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGSW.S.E00 && DGSW.S.Afffa ")) { NextTest(); return; } NextTest(); return; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 5c: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " + " ***** Test Step 13 : Step 5c: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " @@ -147230,27 +150021,27 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep5cThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + err = TestStep5cThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6a: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DGSW.S.F00 && DGSW.S.Afff9")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_13(); + err = TestStep6aThReadsAcceptedCommandListFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6b: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !DGSW.S.F00 && DGSW.S.Afff9")) { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListFromDut_14(); + err = TestStep6bThReadsAcceptedCommandListFromDut_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " + " ***** Test Step 16 : Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " @@ -147260,11 +150051,11 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + " ***** Test Step 17 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " @@ -147273,7 +150064,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); break; } @@ -147337,6 +150128,9 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -147350,7 +150144,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -147466,7 +150260,34 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeThreadMetricsInAttributeList_5() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsOptionalAttributeThreadMetricsInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147489,7 +150310,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributeCurrentHeapFreeInAttributeList_6() + CHIP_ERROR TestStep4cThReadsOptionalAttributeCurrentHeapFreeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147512,7 +150333,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsOptionalAttributeCurrentHeapUsedInAttributeList_7() + CHIP_ERROR TestStep4dThReadsOptionalAttributeCurrentHeapUsedInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147535,7 +150356,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eThReadsFeatureDependentAttributeCurrentHeapHighWatermarkInAttributeList_8() + CHIP_ERROR TestStep4eThReadsFeatureDependentAttributeCurrentHeapHighWatermarkInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147559,7 +150380,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -147570,7 +150391,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep5cThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + TestStep5cThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -147580,7 +150401,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_13() + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147603,7 +150424,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_14() + CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -147630,7 +150451,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() + TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -147641,7 +150462,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() + TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -161472,185 +164293,192 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aThReadsAttributeListFromDut_14(); break; case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_15(); + break; + case 16: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 4b: TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList\n"); + chipTool, " ***** Test Step 16 : Step 4b: TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F05")) { NextTest(); return; } - err = TestStep4bThReadsFeatureDependentDRLKSF05AttributesInAttributeList_15(); + err = TestStep4bThReadsFeatureDependentDRLKSF05AttributesInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 4c: TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList\n"); + chipTool, " ***** Test Step 17 : Step 4c: TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestStep4cThReadsFeatureDependentDRLKSF08AttributesInAttributeList_16(); + err = TestStep4cThReadsFeatureDependentDRLKSF08AttributesInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 4d: TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList\n"); + chipTool, " ***** Test Step 18 : Step 4d: TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F00")) { NextTest(); return; } - err = TestStep4dThReadsFeatureDependentDRLKSF00AttributesInAttributeList_17(); + err = TestStep4dThReadsFeatureDependentDRLKSF00AttributesInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 4e: TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList\n"); + chipTool, " ***** Test Step 19 : Step 4e: TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F01")) { NextTest(); return; } - err = TestStep4eThReadsFeatureDependentDRLKSF01AttributesInAttributeList_18(); + err = TestStep4eThReadsFeatureDependentDRLKSF01AttributesInAttributeList_19(); break; - case 19: + case 20: ChipLogProgress( - chipTool, " ***** Test Step 19 : Step 4f: TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList\n"); + chipTool, " ***** Test Step 20 : Step 4f: TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestStep4fThReadsFeatureDependentDRLKSF04AttributeInAttributeList_19(); + err = TestStep4fThReadsFeatureDependentDRLKSF04AttributeInAttributeList_20(); break; - case 20: + case 21: ChipLogProgress( - chipTool, " ***** Test Step 20 : Step 4g: TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList\n"); + chipTool, " ***** Test Step 21 : Step 4g: TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F0a")) { NextTest(); return; } - err = TestStep4gThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_20(); + err = TestStep4gThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_21(); break; - case 21: + case 22: ChipLogProgress( - chipTool, " ***** Test Step 21 : Step 4h: TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList\n"); + chipTool, " ***** Test Step 22 : Step 4h: TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F0b")) { NextTest(); return; } - err = TestStep4hThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_21(); + err = TestStep4hThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_22(); break; - case 22: + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4i: TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in " + " ***** Test Step 23 : Step 4i: TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in " "AttributeList\n"); if (ShouldSkip("DRLK.S.F00 || DRLK.S.F01")) { NextTest(); return; } - err = TestStep4iThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_22(); + err = TestStep4iThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_23(); break; - case 23: + case 24: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4j: TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList\n"); + " ***** Test Step 24 : Step 4j: TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F07 || DRLK.S.F00")) { NextTest(); return; } - err = TestStep4jThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_23(); + err = TestStep4jThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_24(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Step 4k: TH reads optional attribute(Language) in AttributeList\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4k: TH reads optional attribute(Language) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0021")) { NextTest(); return; } - err = TestStep4kThReadsOptionalAttributeLanguageInAttributeList_24(); + err = TestStep4kThReadsOptionalAttributeLanguageInAttributeList_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4l: TH reads optional attribute(LEDSettings) in AttributeList\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 4l: TH reads optional attribute(LEDSettings) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0022")) { NextTest(); return; } - err = TestStep4lThReadsOptionalAttributeLEDSettingsInAttributeList_25(); + err = TestStep4lThReadsOptionalAttributeLEDSettingsInAttributeList_26(); break; - case 26: + case 27: ChipLogProgress( - chipTool, " ***** Test Step 26 : Step 4m: TH reads optional attribute(AutoRelockTime) in AttributeList\n"); + chipTool, " ***** Test Step 27 : Step 4m: TH reads optional attribute(AutoRelockTime) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0023")) { NextTest(); return; } - err = TestStep4mThReadsOptionalAttributeAutoRelockTimeInAttributeList_26(); + err = TestStep4mThReadsOptionalAttributeAutoRelockTimeInAttributeList_27(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 4n: TH reads optional attribute(SoundVolume) in AttributeList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4n: TH reads optional attribute(SoundVolume) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0024")) { NextTest(); return; } - err = TestStep4nThReadsOptionalAttributeSoundVolumeInAttributeList_27(); + err = TestStep4nThReadsOptionalAttributeSoundVolumeInAttributeList_28(); break; - case 28: + case 29: ChipLogProgress(chipTool, - " ***** Test Step 28 : Step 4o: TH reads optional attribute(DefaultConfigurationRegister) in AttributeList\n"); + " ***** Test Step 29 : Step 4o: TH reads optional attribute(DefaultConfigurationRegister) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0027")) { NextTest(); return; } - err = TestStep4oThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_28(); + err = TestStep4oThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_29(); break; - case 29: + case 30: ChipLogProgress( - chipTool, " ***** Test Step 29 : Step 4p: TH reads optional attribute(EnableLocalProgramming) in AttributeList\n"); + chipTool, " ***** Test Step 30 : Step 4p: TH reads optional attribute(EnableLocalProgramming) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0028")) { NextTest(); return; } - err = TestStep4pThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_29(); + err = TestStep4pThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_30(); break; - case 30: + case 31: ChipLogProgress( - chipTool, " ***** Test Step 30 : Step 4q: TH reads optional attribute(EnableOneTouchLocking) in AttributeList\n"); + chipTool, " ***** Test Step 31 : Step 4q: TH reads optional attribute(EnableOneTouchLocking) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0029")) { NextTest(); return; } - err = TestStep4qThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_30(); + err = TestStep4qThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_31(); break; - case 31: + case 32: ChipLogProgress( - chipTool, " ***** Test Step 31 : Step 4r: TH reads optional attribute(EnableInsideStatusLED) in AttributeList\n"); + chipTool, " ***** Test Step 32 : Step 4r: TH reads optional attribute(EnableInsideStatusLED) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002a")) { NextTest(); return; } - err = TestStep4rThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_31(); + err = TestStep4rThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_32(); break; - case 32: + case 33: ChipLogProgress( - chipTool, " ***** Test Step 32 : Step 4s: TH reads optional attribute(EnablePrivacyModeButton) in AttributeList\n"); + chipTool, " ***** Test Step 33 : Step 4s: TH reads optional attribute(EnablePrivacyModeButton) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002b")) { NextTest(); return; } - err = TestStep4sThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_32(); + err = TestStep4sThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_33(); break; - case 33: + case 34: ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 4t: TH reads optional attribute(LocalProgrammingFeatures) in AttributeList\n"); + " ***** Test Step 34 : Step 4t: TH reads optional attribute(LocalProgrammingFeatures) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002c")) { NextTest(); return; } - err = TestStep4tThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_33(); + err = TestStep4tThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_34(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Step 5a: TH reads EventList from DUT\n"); - NextTest(); - return; case 35: - ChipLogProgress( - chipTool, " ***** Test Step 35 : Step 5b: TH reads optional event(Door position sensor) in EventList\n"); - if (ShouldSkip("DRLK.S.F05")) { + ChipLogProgress(chipTool, " ***** Test Step 35 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -161658,106 +164486,115 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return; case 36: ChipLogProgress( - chipTool, " ***** Test Step 36 : Step 5c: TH reads optional event(User commands and database) in EventList\n"); - if (ShouldSkip("DRLK.S.F08")) { + chipTool, " ***** Test Step 36 : Step 5b: TH reads optional event(Door position sensor) in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F05")) { NextTest(); return; } NextTest(); return; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Step 6a: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6aThReadsAcceptedCommandListFromDut_37(); - break; + ChipLogProgress( + chipTool, " ***** Test Step 37 : Step 5c: TH reads optional event(User commands and database) in EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F08")) { + NextTest(); + return; + } + NextTest(); + return; case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6aThReadsAcceptedCommandListFromDut_38(); + break; + case 39: ChipLogProgress(chipTool, - " ***** Test Step 38 : Step 6b: TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList\n"); + " ***** Test Step 39 : Step 6b: TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestStep6bThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_38(); + err = TestStep6bThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_39(); break; - case 39: + case 40: ChipLogProgress(chipTool, - " ***** Test Step 39 : Step 6c: TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList\n"); + " ***** Test Step 40 : Step 6c: TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F0a")) { NextTest(); return; } - err = TestStep6cThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_39(); + err = TestStep6cThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_40(); break; - case 40: + case 41: ChipLogProgress(chipTool, - " ***** Test Step 40 : Step 6d: TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList\n"); + " ***** Test Step 41 : Step 6d: TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F0b")) { NextTest(); return; } - err = TestStep6dThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_40(); + err = TestStep6dThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_41(); break; - case 41: + case 42: ChipLogProgress(chipTool, - " ***** Test Step 41 : Step 6e: TH reads Feature dependent commands(DRLK.S.F0c) in AcceptedCommandList\n"); + " ***** Test Step 42 : Step 6e: TH reads Feature dependent commands(DRLK.S.F0c) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F0c")) { NextTest(); return; } - err = TestStep6eThReadsFeatureDependentCommandsDRLKSF0cInAcceptedCommandList_41(); + err = TestStep6eThReadsFeatureDependentCommandsDRLKSF0cInAcceptedCommandList_42(); break; - case 42: + case 43: ChipLogProgress(chipTool, - " ***** Test Step 42 : Step 6f: TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList\n"); + " ***** Test Step 43 : Step 6f: TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestStep6fThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_42(); + err = TestStep6fThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_43(); break; - case 43: + case 44: ChipLogProgress( - chipTool, " ***** Test Step 43 : Step 6g: TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 44 : Step 6g: TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.C03.Rsp")) { NextTest(); return; } - err = TestStep6gThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_43(); + err = TestStep6gThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_44(); break; - case 44: + case 45: ChipLogProgress(chipTool, - " ***** Test Step 44 : Step 7a: TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList\n"); + " ***** Test Step 45 : Step 7a: TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestStep7aThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_44(); + err = TestStep7aThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_45(); break; - case 45: + case 46: ChipLogProgress(chipTool, - " ***** Test Step 45 : Step 7b: TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList\n"); + " ***** Test Step 46 : Step 7b: TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F0a")) { NextTest(); return; } - err = TestStep7bThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_45(); + err = TestStep7bThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_46(); break; - case 46: + case 47: ChipLogProgress(chipTool, - " ***** Test Step 46 : Step 7c: TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList\n"); + " ***** Test Step 47 : Step 7c: TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F0b")) { NextTest(); return; } - err = TestStep7cThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_46(); + err = TestStep7cThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_47(); break; - case 47: + case 48: ChipLogProgress(chipTool, - " ***** Test Step 47 : Step 7d: TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList\n"); + " ***** Test Step 48 : Step 7d: TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestStep7dThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_47(); + err = TestStep7dThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_48(); break; } @@ -161914,6 +164751,9 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -161927,7 +164767,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 48; + const uint16_t mTestCount = 49; chip::Optional mNodeId; chip::Optional mCluster; @@ -162230,7 +165070,37 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFeatureDependentDRLKSF05AttributesInAttributeList_15() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 37UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 38UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFeatureDependentDRLKSF05AttributesInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162251,7 +165121,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsFeatureDependentDRLKSF08AttributesInAttributeList_16() + CHIP_ERROR TestStep4cThReadsFeatureDependentDRLKSF08AttributesInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162274,7 +165144,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsFeatureDependentDRLKSF00AttributesInAttributeList_17() + CHIP_ERROR TestStep4dThReadsFeatureDependentDRLKSF00AttributesInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162297,7 +165167,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eThReadsFeatureDependentDRLKSF01AttributesInAttributeList_18() + CHIP_ERROR TestStep4eThReadsFeatureDependentDRLKSF01AttributesInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162320,7 +165190,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsFeatureDependentDRLKSF04AttributeInAttributeList_19() + CHIP_ERROR TestStep4fThReadsFeatureDependentDRLKSF04AttributeInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162341,7 +165211,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_20() + CHIP_ERROR TestStep4gThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162362,7 +165232,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_21() + CHIP_ERROR TestStep4hThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162383,7 +165253,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_22() + CHIP_ERROR TestStep4iThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162405,7 +165275,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_23() + CHIP_ERROR TestStep4jThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162426,7 +165296,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kThReadsOptionalAttributeLanguageInAttributeList_24() + CHIP_ERROR TestStep4kThReadsOptionalAttributeLanguageInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162447,7 +165317,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4lThReadsOptionalAttributeLEDSettingsInAttributeList_25() + CHIP_ERROR TestStep4lThReadsOptionalAttributeLEDSettingsInAttributeList_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162468,7 +165338,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4mThReadsOptionalAttributeAutoRelockTimeInAttributeList_26() + CHIP_ERROR TestStep4mThReadsOptionalAttributeAutoRelockTimeInAttributeList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162489,7 +165359,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4nThReadsOptionalAttributeSoundVolumeInAttributeList_27() + CHIP_ERROR TestStep4nThReadsOptionalAttributeSoundVolumeInAttributeList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162510,7 +165380,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4oThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_28() + CHIP_ERROR TestStep4oThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162531,7 +165401,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4pThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_29() + CHIP_ERROR TestStep4pThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162552,7 +165422,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4qThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_30() + CHIP_ERROR TestStep4qThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162573,7 +165443,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4rThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_31() + CHIP_ERROR TestStep4rThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162594,7 +165464,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4sThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_32() + CHIP_ERROR TestStep4sThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162615,7 +165485,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4tThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_33() + CHIP_ERROR TestStep4tThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162636,7 +165506,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_37() + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162658,7 +165528,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_38() + CHIP_ERROR TestStep6bThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162681,7 +165551,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_39() + CHIP_ERROR TestStep6cThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162704,7 +165574,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_40() + CHIP_ERROR TestStep6dThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_41() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162727,7 +165597,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6eThReadsFeatureDependentCommandsDRLKSF0cInAcceptedCommandList_41() + CHIP_ERROR TestStep6eThReadsFeatureDependentCommandsDRLKSF0cInAcceptedCommandList_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162748,7 +165618,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6fThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_42() + CHIP_ERROR TestStep6fThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162774,7 +165644,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6gThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_43() + CHIP_ERROR TestStep6gThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_44() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162795,7 +165665,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7aThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_44() + CHIP_ERROR TestStep7aThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_45() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162816,7 +165686,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7bThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_45() + CHIP_ERROR TestStep7bThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162837,7 +165707,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7cThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_46() + CHIP_ERROR TestStep7cThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -162858,7 +165728,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7dThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_47() + CHIP_ERROR TestStep7dThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175323,19 +178193,35 @@ class Test_TC_G_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ThReadsAttributeListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6ThReadsAcceptedCommandListFromDut_6(); - break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_8(); break; } @@ -175372,6 +178258,9 @@ class Test_TC_G_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -175385,7 +178274,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -175494,7 +178383,33 @@ class Test_TC_G_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175520,7 +178435,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175918,46 +178833,62 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aReadTheGlobalAttributeAttributeList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_7(); + break; + case 8: ChipLogProgress( - chipTool, " ***** Test Step 7 : Step 4b: Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList\n"); + chipTool, " ***** Test Step 8 : Step 4b: Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList\n"); if (ShouldSkip("ACFREMON.S.F00")) { NextTest(); return; } - err = TestStep4bReadTheFeatureDependentACFREMONSF00AttributeInAttributeList_7(); + err = TestStep4bReadTheFeatureDependentACFREMONSF00AttributeInAttributeList_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList\n"); + " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList\n"); if (ShouldSkip("ACFREMON.S.A0002")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_8(); + err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: TH reads EventList attribute from DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); - break; case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_11(); + break; + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 12 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("ACFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_11(); + err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -176009,6 +178940,9 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176022,7 +178956,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -176182,7 +179116,35 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheFeatureDependentACFREMONSF00AttributeInAttributeList_7() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheFeatureDependentACFREMONSF00AttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176207,7 +179169,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_8() + CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176230,7 +179192,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176251,7 +179213,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_11() + CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176274,7 +179236,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176675,47 +179637,63 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4ReadTheGlobalAttributeAttributeList_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ReadTheGlobalAttributeAttributeList_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); + " ***** Test Step 8 : Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); if (ShouldSkip("HEPAFREMON.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_7(); + err = TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8(); break; - case 8: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in " + " ***** Test Step 9 : Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in " "AttributeList\n"); if (ShouldSkip("HEPAFREMON.S.A0002")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_8(); + err = TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: TH reads EventList attribute from DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); return; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); - break; case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_11(); + break; + case 12: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 12 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("HEPAFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_11(); + err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -176767,6 +179745,9 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176780,7 +179761,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -176940,7 +179921,35 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_7() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176965,7 +179974,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_8() + CHIP_ERROR TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176988,7 +179997,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177009,7 +180018,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_11() + CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177032,7 +180041,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); From c1d26c0a864979712dbc68b74423db10451a2ea9 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Fri, 28 Jul 2023 10:56:56 -0400 Subject: [PATCH 072/159] [Silabs] Example cleanup (#28160) * Move linker scripts to common place * Move Board_config * Move FreeRTOS Config * Move FreeRTOS config * Move Matter_config * Move MatterConfig * Move PW and uart header to common * Move Temperature Sensor * Delete init_efrplatform and init_ccpplatform * Move Base Application * Add missing lib * fix wifi --- config/efr32/lib/pw_rpc/BUILD.gn | 2 +- config/efr32/lib/pw_rpc/pw_rpc.gni | 2 +- examples/chef/silabs/BUILD.gn | 6 +- examples/light-switch-app/silabs/BUILD.gn | 8 +- examples/lighting-app/silabs/BUILD.gn | 8 +- examples/lock-app/silabs/BUILD.gn | 8 +- .../silabs/{efr32 => }/BaseApplication.cpp | 5 + .../silabs/{efr32 => }/BaseApplication.h | 5 +- .../silabs/{efr32 => }/FreeRTOSConfig.h | 0 .../matter_config.cpp => MatterConfig.cpp} | 29 +- .../{matter_config.h => MatterConfig.h} | 0 examples/platform/silabs/SiWx917/BUILD.gn | 5 +- .../silabs/SiWx917/BaseApplication.cpp | 637 ------------------ .../platform/silabs/SiWx917/BaseApplication.h | 205 ------ .../platform/silabs/SiWx917/FreeRTOSConfig.h | 256 ------- .../silabs/SiWx917/init_ccpPlatform.cpp | 53 -- .../silabs/SiWx917/init_ccpPlatform.h | 28 - .../platform/silabs/SiWx917/matter_config.cpp | 201 ------ .../silabs/SiWx917/pw_sys_io/BUILD.gn | 39 -- examples/platform/silabs/SiWx917/uart.h | 33 - .../silabs/{efr32 => }/TemperatureSensor.cpp | 0 .../silabs/{efr32 => }/TemperatureSensor.h | 0 .../silabs/{SiWx917 => }/board_config.h | 2 +- examples/platform/silabs/efr32/BUILD.gn | 5 +- examples/platform/silabs/efr32/board_config.h | 54 -- .../silabs/efr32/init_efrPlatform.cpp | 96 --- .../platform/silabs/efr32/init_efrPlatform.h | 29 - .../pw_sys_io/public/pw_sys_io_efr32/init.h | 27 - .../silabs/efr32/pw_sys_io/sys_io_efr32.cc | 81 --- .../silabs/{SiWx917 => }/ldscripts/SiWx917.ld | 0 .../silabs/{efr32 => }/ldscripts/efr32mg12.ld | 0 .../silabs/{efr32 => }/ldscripts/efr32mg21.ld | 0 .../silabs/{efr32 => }/ldscripts/efr32mg24.ld | 0 .../silabs/{efr32 => }/ldscripts/mgm24.ld | 0 examples/platform/silabs/main.cpp | 2 +- .../silabs/{efr32 => }/pw_sys_io/BUILD.gn | 6 +- .../pw_sys_io/public/pw_sys_io_efr32/init.h | 0 .../sys_io_silabs.cc} | 0 examples/platform/silabs/silabs_utils.cpp | 2 +- examples/platform/silabs/{efr32 => }/uart.h | 0 examples/pump-app/silabs/BUILD.gn | 8 +- examples/smoke-co-alarm-app/silabs/BUILD.gn | 8 +- examples/thermostat/silabs/BUILD.gn | 10 +- examples/window-app/silabs/BUILD.gn | 6 +- .../silabs/platformAbstraction/GsdkSpam.cpp | 49 +- .../platformAbstraction/WiseMcuSpam.cpp | 10 +- src/test_driver/efr32/BUILD.gn | 7 +- src/test_driver/efr32/src/main.cpp | 4 +- third_party/silabs/efr32_sdk.gni | 5 + third_party/silabs/matter_support | 2 +- 50 files changed, 130 insertions(+), 1813 deletions(-) rename examples/platform/silabs/{efr32 => }/BaseApplication.cpp (99%) rename examples/platform/silabs/{efr32 => }/BaseApplication.h (99%) rename examples/platform/silabs/{efr32 => }/FreeRTOSConfig.h (100%) rename examples/platform/silabs/{efr32/matter_config.cpp => MatterConfig.cpp} (96%) rename examples/platform/silabs/{matter_config.h => MatterConfig.h} (100%) delete mode 100644 examples/platform/silabs/SiWx917/BaseApplication.cpp delete mode 100644 examples/platform/silabs/SiWx917/BaseApplication.h delete mode 100644 examples/platform/silabs/SiWx917/FreeRTOSConfig.h delete mode 100644 examples/platform/silabs/SiWx917/init_ccpPlatform.cpp delete mode 100644 examples/platform/silabs/SiWx917/init_ccpPlatform.h delete mode 100644 examples/platform/silabs/SiWx917/matter_config.cpp delete mode 100644 examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn delete mode 100644 examples/platform/silabs/SiWx917/uart.h rename examples/platform/silabs/{efr32 => }/TemperatureSensor.cpp (100%) rename examples/platform/silabs/{efr32 => }/TemperatureSensor.h (100%) rename examples/platform/silabs/{SiWx917 => }/board_config.h (98%) delete mode 100644 examples/platform/silabs/efr32/board_config.h delete mode 100644 examples/platform/silabs/efr32/init_efrPlatform.cpp delete mode 100644 examples/platform/silabs/efr32/init_efrPlatform.h delete mode 100644 examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h delete mode 100644 examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc rename examples/platform/silabs/{SiWx917 => }/ldscripts/SiWx917.ld (100%) rename examples/platform/silabs/{efr32 => }/ldscripts/efr32mg12.ld (100%) rename examples/platform/silabs/{efr32 => }/ldscripts/efr32mg21.ld (100%) rename examples/platform/silabs/{efr32 => }/ldscripts/efr32mg24.ld (100%) rename examples/platform/silabs/{efr32 => }/ldscripts/mgm24.ld (100%) rename examples/platform/silabs/{efr32 => }/pw_sys_io/BUILD.gn (87%) rename examples/platform/silabs/{SiWx917 => }/pw_sys_io/public/pw_sys_io_efr32/init.h (100%) rename examples/platform/silabs/{SiWx917/pw_sys_io/sys_io_siwx917.cc => pw_sys_io/sys_io_silabs.cc} (100%) rename examples/platform/silabs/{efr32 => }/uart.h (100%) diff --git a/config/efr32/lib/pw_rpc/BUILD.gn b/config/efr32/lib/pw_rpc/BUILD.gn index 32a95488dbdf30..ed2e3a47bc1305 100644 --- a/config/efr32/lib/pw_rpc/BUILD.gn +++ b/config/efr32/lib/pw_rpc/BUILD.gn @@ -24,7 +24,7 @@ static_library("pw_rpc") { public_deps = [ "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", - "${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32", + "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs", "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_checksum, diff --git a/config/efr32/lib/pw_rpc/pw_rpc.gni b/config/efr32/lib/pw_rpc/pw_rpc.gni index a72cb4d90f6dd1..101112c12dadc9 100644 --- a/config/efr32/lib/pw_rpc/pw_rpc.gni +++ b/config/efr32/lib/pw_rpc/pw_rpc.gni @@ -19,7 +19,7 @@ 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/silabs/efr32/pw_sys_io:pw_sys_io_efr32" + "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs" pw_build_LINK_DEPS = [ "$dir_pw_assert:impl", diff --git a/examples/chef/silabs/BUILD.gn b/examples/chef/silabs/BUILD.gn index a7a30e2c6396f8..cecef1c71bc050 100644 --- a/examples/chef/silabs/BUILD.gn +++ b/examples/chef/silabs/BUILD.gn @@ -56,7 +56,7 @@ chip_data_model("chef-common") { efr32_sdk("sdk") { sources = [ "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ @@ -133,7 +133,7 @@ silabs_executable("chef_app") { "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs", ] deps += pw_build_LINK_DEPS @@ -144,7 +144,7 @@ silabs_executable("chef_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/light-switch-app/silabs/BUILD.gn b/examples/light-switch-app/silabs/BUILD.gn index 0707f6dbf52622..fc52c0b96b03b7 100644 --- a/examples/light-switch-app/silabs/BUILD.gn +++ b/examples/light-switch-app/silabs/BUILD.gn @@ -52,7 +52,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -75,7 +75,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -170,7 +170,7 @@ silabs_executable("light_switch_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -181,7 +181,7 @@ silabs_executable("light_switch_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/lighting-app/silabs/BUILD.gn b/examples/lighting-app/silabs/BUILD.gn index 63a206ee8ffaab..9c314b025f63fd 100644 --- a/examples/lighting-app/silabs/BUILD.gn +++ b/examples/lighting-app/silabs/BUILD.gn @@ -68,7 +68,7 @@ if (slc_generate) { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -91,7 +91,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -191,7 +191,7 @@ silabs_executable("lighting_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -202,7 +202,7 @@ silabs_executable("lighting_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/lock-app/silabs/BUILD.gn b/examples/lock-app/silabs/BUILD.gn index f4bf7db01c2612..f5d00f7d48ab63 100644 --- a/examples/lock-app/silabs/BUILD.gn +++ b/examples/lock-app/silabs/BUILD.gn @@ -52,7 +52,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -75,7 +75,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -172,7 +172,7 @@ silabs_executable("lock_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -183,7 +183,7 @@ silabs_executable("lock_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp similarity index 99% rename from examples/platform/silabs/efr32/BaseApplication.cpp rename to examples/platform/silabs/BaseApplication.cpp index 77a91236554ae5..b0d1dd0ea8a414 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -242,7 +242,12 @@ CHIP_ERROR BaseApplication::Init() } PlatformMgr().AddEventHandler(OnPlatformEvent, 0); +#ifdef SL_WIFI + sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); +#endif /* SL_WIFI */ +#if CHIP_ENABLE_OPENTHREAD sIsProvisioned = ConnectivityMgr().IsThreadProvisioned(); +#endif return err; } diff --git a/examples/platform/silabs/efr32/BaseApplication.h b/examples/platform/silabs/BaseApplication.h similarity index 99% rename from examples/platform/silabs/efr32/BaseApplication.h rename to examples/platform/silabs/BaseApplication.h index f2bc073c4ee9b2..9e99580811293c 100644 --- a/examples/platform/silabs/efr32/BaseApplication.h +++ b/examples/platform/silabs/BaseApplication.h @@ -29,6 +29,7 @@ #include "AppEvent.h" #include "FreeRTOS.h" #include "timers.h" // provides FreeRTOS timer support +#include #include #include #include @@ -47,10 +48,6 @@ #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED -#ifndef SL_STATUS_LED -#define SL_STATUS_LED 1 -#endif - /********************************************************** * Defines *********************************************************/ diff --git a/examples/platform/silabs/efr32/FreeRTOSConfig.h b/examples/platform/silabs/FreeRTOSConfig.h similarity index 100% rename from examples/platform/silabs/efr32/FreeRTOSConfig.h rename to examples/platform/silabs/FreeRTOSConfig.h diff --git a/examples/platform/silabs/efr32/matter_config.cpp b/examples/platform/silabs/MatterConfig.cpp similarity index 96% rename from examples/platform/silabs/efr32/matter_config.cpp rename to examples/platform/silabs/MatterConfig.cpp index c876abd6eaea1b..9c2253233f79e7 100644 --- a/examples/platform/silabs/efr32/matter_config.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -19,7 +19,7 @@ #include "AppConfig.h" #include "OTAConfig.h" -#include +#include #include @@ -165,6 +165,12 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) SILABS_LOG("Init CHIP Stack"); // Init Chip memory management before the stack ReturnErrorOnFailure(chip::Platform::MemoryInit()); + +// WiFi needs to be initialized after Memory Init for some reason +#ifdef SL_WIFI + InitWiFi(); +#endif + ReturnErrorOnFailure(PlatformMgr().InitChipStack()); SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); @@ -231,10 +237,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) SILABS_LOG("Starting Platform Manager Event Loop"); ReturnErrorOnFailure(PlatformMgr().StartEventLoopTask()); -#ifdef SL_WIFI - InitWiFi(); -#endif - #ifdef ENABLE_CHIP_SHELL chip::startShellTask(); #endif @@ -251,15 +253,14 @@ void SilabsMatterConfig::InitWiFi(void) #ifdef SL_WFX_USE_SECURE_LINK wfx_securelink_task_start(); // start securelink key renegotiation task #endif // SL_WFX_USE_SECURE_LINK -#endif /* WF200_WIFI */ - -#ifdef RS911X_WIFI - /* - * Start up any RSI interface stuff - * (Not required) - Note that wfx_wifi_start will deal with - * starting up a rsi task - which will initialize the SPI interface. - */ -#endif +#elif defined(SIWX_917) + SILABS_LOG("Init RSI 917 Platform"); + if (wfx_rsi_platform() != SL_STATUS_OK) + { + SILABS_LOG("RSI init failed"); + return CHIP_ERROR_INTERNAL; + } +#endif /* WF200_WIFI */ } #endif // SL_WIFI diff --git a/examples/platform/silabs/matter_config.h b/examples/platform/silabs/MatterConfig.h similarity index 100% rename from examples/platform/silabs/matter_config.h rename to examples/platform/silabs/MatterConfig.h diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 392663f7b16624..3fd6164b576ea1 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -247,7 +247,9 @@ source_set("siwx917-common") { ] sources = [ + "${silabs_common_plat_dir}/BaseApplication.cpp", "${silabs_common_plat_dir}/LEDWidget.cpp", + "${silabs_common_plat_dir}/MatterConfig.cpp", "${silabs_common_plat_dir}/SoftwareFaultReports.cpp", "${silabs_common_plat_dir}/heap_4_silabs.c", "${silabs_common_plat_dir}/silabs_utils.cpp", @@ -256,11 +258,8 @@ source_set("siwx917-common") { "${wifi_sdk_dir}/ethernetif.cpp", "${wifi_sdk_dir}/lwip_netif.cpp", "${wifi_sdk_dir}/wfx_notify.cpp", - "BaseApplication.cpp", "SiWx917/rsi_if.c", "SiWx917/wfx_rsi_host.c", - "init_ccpPlatform.cpp", - "matter_config.cpp", ] if (chip_enable_pw_rpc || chip_build_libshell) { diff --git a/examples/platform/silabs/SiWx917/BaseApplication.cpp b/examples/platform/silabs/SiWx917/BaseApplication.cpp deleted file mode 100644 index feab970b95fe5b..00000000000000 --- a/examples/platform/silabs/SiWx917/BaseApplication.cpp +++ /dev/null @@ -1,637 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -/********************************************************** - * Includes - *********************************************************/ - -#include "AppConfig.h" -#include "AppEvent.h" -#include "AppTask.h" - -#include "LEDWidget.h" - -#ifdef DISPLAY_ENABLED -#include "lcd.h" -#ifdef QR_CODE_ENABLED -#include "qrcodegen.h" -#endif // QR_CODE_ENABLED -#endif // DISPLAY_ENABLED - -#include "SilabsDeviceDataProvider.h" -#include "rsi_board.h" -#include "rsi_chip.h" -#include "silabs_utils.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef SL_WIFI -#include "wfx_host_events.h" -#include -#include -#endif // SL_WIFI - -/********************************************************** - * Defines and Constants - *********************************************************/ - -#define FACTORY_RESET_TRIGGER_TIMEOUT 7000 -#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 -#define FACTORY_RESET_LOOP_COUNT 5 -#ifndef APP_TASK_STACK_SIZE -#define APP_TASK_STACK_SIZE (4096) -#endif -#define APP_TASK_PRIORITY 2 -#define APP_EVENT_QUEUE_SIZE 10 -#define EXAMPLE_VENDOR_ID 0xcafe -#define APP_STATE_LED 0 - -using namespace chip; -using namespace chip::app; -using namespace ::chip::DeviceLayer; -using namespace ::chip::DeviceLayer::Silabs; - -namespace { - -/********************************************************** - * Variable declarations - *********************************************************/ - -TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. -TimerHandle_t sLightTimer; - -TaskHandle_t sAppTaskHandle; -QueueHandle_t sAppEventQueue; - -LEDWidget sStatusLED; - -#ifdef SL_WIFI -app::Clusters::NetworkCommissioning::Instance - sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::SlWiFiDriver::GetInstance())); -#endif /* SL_WIFI */ - -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) - -bool sIsProvisioned = false; -bool sIsEnabled = false; -bool sIsAttached = false; -bool sHaveBLEConnections = false; - -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - -uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; -StaticQueue_t sAppEventQueueStruct; - -StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; -StaticTask_t appTaskStruct; - -BaseApplication::Function_t mFunction; -bool mFunctionTimerActive; - -#ifdef DISPLAY_ENABLED -SilabsLCD slLCD; -#endif - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; - -Identify gIdentify = { - chip::EndpointId{ 1 }, - BaseApplication::OnIdentifyStart, - BaseApplication::OnIdentifyStop, - Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, - BaseApplication::OnTriggerIdentifyEffect, -}; - -#endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER -} // namespace - -/********************************************************** - * AppTask Definitions - *********************************************************/ - -CHIP_ERROR BaseApplication::StartAppTask(TaskFunction_t taskFunction) -{ - sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); - if (sAppEventQueue == NULL) - { - SILABS_LOG("Failed to allocate app event queue"); - appError(APP_ERROR_EVENT_QUEUE_FAILED); - } - - // Start App task. - sAppTaskHandle = - xTaskCreateStatic(taskFunction, APP_TASK_NAME, ArraySize(appStack), &sAppEventQueue, 1, appStack, &appTaskStruct); - if (sAppTaskHandle == nullptr) - { - SILABS_LOG("Failed to create app task"); - appError(APP_ERROR_CREATE_TASK_FAILED); - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR BaseApplication::Init() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - -#ifdef SL_WIFI - /* - * Wait for the WiFi to be initialized - */ - SILABS_LOG("APP: Wait WiFi Init"); - while (!wfx_hw_ready()) - { - vTaskDelay(10); - } - SILABS_LOG("APP: Done WiFi Init"); - /* We will init server when we get IP */ - - chip::DeviceLayer::PlatformMgr().LockChipStack(); - sWiFiNetworkCommissioningInstance.Init(); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - -#endif - - // Create FreeRTOS sw timer for Function Selection. - sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel - pdMS_TO_TICKS(1), // == default timer period - false, // no timer reload (==one-shot) - (void *) this, // init timer id = app task obj context - FunctionTimerEventHandler // timer callback handler - ); - if (sFunctionTimer == NULL) - { - SILABS_LOG("funct timer create failed"); - appError(APP_ERROR_CREATE_TIMER_FAILED); - } - - // Create FreeRTOS sw timer for LED Management. - sLightTimer = xTimerCreate("LightTmr", // Text Name - pdMS_TO_TICKS(10), // Default timer period - true, // reload timer - (void *) this, // Timer Id - LightTimerEventHandler // Timer callback handler - ); - if (sLightTimer == NULL) - { - SILABS_LOG("Light Timer create failed"); - appError(APP_ERROR_CREATE_TIMER_FAILED); - } - - SILABS_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); - SILABS_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - - sStatusLED.Init(APP_STATE_LED); - - ConfigurationMgr().LogDeviceConfig(); - - // Create buffer for QR code that can fit max size and null terminator. - char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; - chip::MutableCharSpan QRCode(qrCodeBuffer); - - if (Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) - { - // Print setup info on LCD if available -#ifdef QR_CODE_ENABLED - slLCD.SetQRCode((uint8_t *) QRCode.data(), QRCode.size()); - slLCD.ShowQRCode(true, true); -#else - PrintQrCodeURL(QRCode); -#endif // QR_CODE_ENABLED - } - else - { - SILABS_LOG("Getting QR code failed!"); - } - - return err; -} - -void BaseApplication::FunctionTimerEventHandler(TimerHandle_t xTimer) -{ - AppEvent event; - event.Type = AppEvent::kEventType_Timer; - event.TimerEvent.Context = (void *) xTimer; - event.Handler = FunctionEventHandler; - PostEvent(&event); -} - -void BaseApplication::FunctionEventHandler(AppEvent * aEvent) -{ - if (aEvent->Type != AppEvent::kEventType_Timer) - { - return; - } -} - -void BaseApplication::FunctionFactoryReset(void) -{ - SILABS_LOG("#################################################################"); - SILABS_LOG("################### Factory reset triggered #####################"); - SILABS_LOG("#################################################################"); - - // Actually trigger Factory Reset - mFunction = kFunction_NoneSelected; - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - - chip::Server::GetInstance().ScheduleFactoryReset(); -} - -bool BaseApplication::ActivateStatusLedPatterns() -{ - bool isPatternSet = false; -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER - if (gIdentify.mActive) - { - // Identify in progress - // Do a steady blink on the status led - sStatusLED.Blink(250, 250); - isPatternSet = true; - } - else if (sIdentifyEffect != Clusters::Identify::EffectIdentifierEnum::kStopEffect) - { - // Identify trigger effect received. Do some on/off patterns on the status led - if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBlink) - { - // Fast blink - sStatusLED.Blink(50, 50); - } - else if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBreathe) - { - // Slow blink - sStatusLED.Blink(1000, 1000); - } - else if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kOkay) - { - // Pulse effect - sStatusLED.Blink(300, 700); - } - else if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kChannelChange) - { - // Alternate between Short and Long pulses effect - static uint64_t mLastChangeTimeMS = 0; - static bool alternatePattern = false; - uint32_t onTimeMS = alternatePattern ? 50 : 700; - uint32_t offTimeMS = alternatePattern ? 950 : 300; - - uint64_t nowMS = chip::System::SystemClock().GetMonotonicMilliseconds64().count(); - if (nowMS >= mLastChangeTimeMS + 1000) // each pattern is done over a 1 second period - { - mLastChangeTimeMS = nowMS; - alternatePattern = !alternatePattern; - sStatusLED.Blink(onTimeMS, offTimeMS); - } - } - isPatternSet = true; - } -#endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER - -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) - // Identify Patterns have priority over Status patterns - if (!isPatternSet) - { - // Apply different status feedbacks - if (sIsProvisioned && sIsEnabled) - { - if (sIsAttached) - { - sStatusLED.Set(true); - } - else - { - sStatusLED.Blink(950, 50); - } - } - else if (sHaveBLEConnections) - { - sStatusLED.Blink(100, 100); - } - else - { - sStatusLED.Blink(50, 950); - } - isPatternSet = true; - } -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER -#endif // ENABLE_WSTK_LEDS) && SL_CATALOG_SIMPLE_LED_LED1_PRESENT - return isPatternSet; -} - -void BaseApplication::LightEventHandler() -{ - // Collect connectivity and configuration state from the CHIP stack. Because - // the CHIP event loop is being run in a separate task, the stack must be - // locked while these values are queried. However we use a non-blocking - // lock request (TryLockCHIPStack()) to avoid blocking other UI activities - // when the CHIP task is busy (e.g. with a long crypto operation). -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) - if (PlatformMgr().TryLockChipStack()) - { -#ifdef SL_WIFI - sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); - sIsEnabled = ConnectivityMgr().IsWiFiStationEnabled(); - sIsAttached = ConnectivityMgr().IsWiFiStationConnected(); -#endif /* SL_WIFI */ -#if CHIP_ENABLE_OPENTHREAD - sIsProvisioned = ConnectivityMgr().IsThreadProvisioned(); - sIsEnabled = ConnectivityMgr().IsThreadEnabled(); - sIsAttached = ConnectivityMgr().IsThreadAttached(); -#endif /* CHIP_ENABLE_OPENTHREAD */ - sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); - PlatformMgr().UnlockChipStack(); - } -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - - // Update the status LED if factory reset has not been initiated. - // - // If system has "full connectivity", keep the LED On constantly. - // - // If thread and service provisioned, but not attached to the thread network - // yet OR no connectivity to the service OR subscriptions are not fully - // established THEN blink the LED Off for a short period of time. - // - // If the system has ble connection(s) uptill the stage above, THEN blink - // the LEDs at an even rate of 100ms. - // - // Otherwise, blink the LED ON for a very short time. - if (mFunction != kFunction_FactoryReset) - { - ActivateStatusLedPatterns(); - } - sStatusLED.Animate(); -} - -void BaseApplication::ButtonHandler(AppEvent * aEvent) -{ - uint8_t count = FACTORY_RESET_LOOP_COUNT; - - // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< - // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the - // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + - // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after - // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. - // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs - // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (aEvent->ButtonEvent.Action == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - if ((!mFunctionTimerActive) && (mFunction == kFunction_NoneSelected)) - { - mFunction = kFunction_FactoryReset; - - // Wait for sometime to determine button is pressed for Factory reset - // other functionality - vTaskDelay(1000); // Delay of 1sec before we check the button status - } - } - - while (!(RSI_NPSSGPIO_GetPin(NPSS_GPIO_0))) - { - if (count == 0) - { - FunctionFactoryReset(); - break; - } - - // Turn off status LED before starting blink to make sure blink is - // co-ordinated. - sStatusLED.Set(false); - sStatusLED.Blink(500); - SILABS_LOG("Factory reset triggering in %d sec release button to cancel", count--); - - // Delay of 1sec before checking the button status again - vTaskDelay(1000); - } - - if (count > 0) - { - sStatusLED.Set(false); - SILABS_LOG("Factory Reset has been Canceled"); // button held past Timeout wait till button is released - } - - // If the button was released before factory reset got initiated, start BLE advertissement in fast mode - if (mFunction == kFunction_FactoryReset) - { - mFunction = kFunction_NoneSelected; - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif - - if (!ConnectivityMgr().IsWiFiStationProvisioned()) - { - // Enable BLE advertisements - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising); - } - else - { - SILABS_LOG("Network is already provisioned, Ble advertissement not enabled"); - } - } -} - -void BaseApplication::CancelFunctionTimer() -{ - if (xTimerStop(sFunctionTimer, pdMS_TO_TICKS(0)) == pdFAIL) - { - SILABS_LOG("app timer stop() failed"); - appError(APP_ERROR_STOP_TIMER_FAILED); - } - - mFunctionTimerActive = false; -} - -void BaseApplication::StartFunctionTimer(uint32_t aTimeoutInMs) -{ - if (xTimerIsTimerActive(sFunctionTimer)) - { - SILABS_LOG("app timer already started!"); - CancelFunctionTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ms if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sFunctionTimer, pdMS_TO_TICKS(aTimeoutInMs), pdMS_TO_TICKS(100)) != pdPASS) - { - SILABS_LOG("app timer start() failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } - - mFunctionTimerActive = true; -} - -void BaseApplication::StartStatusLEDTimer() -{ - if (pdPASS != xTimerStart(sLightTimer, pdMS_TO_TICKS(0))) - { - SILABS_LOG("Light Time start failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -void BaseApplication::StopStatusLEDTimer() -{ - sStatusLED.Set(false); - - if (xTimerStop(sLightTimer, pdMS_TO_TICKS(100)) != pdPASS) - { - SILABS_LOG("Light Time start failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -void BaseApplication::OnIdentifyStart(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStart"); - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StartStatusLEDTimer(); -#endif -} - -void BaseApplication::OnIdentifyStop(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStop"); - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif -} - -void BaseApplication::OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) -{ - ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif -} - -void BaseApplication::OnTriggerIdentifyEffect(Identify * identify) -{ - sIdentifyEffect = identify->mCurrentEffectIdentifier; - - if (identify->mEffectVariant != Clusters::Identify::EffectVariantEnum::kDefault) - { - ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); - } - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StartStatusLEDTimer(); -#endif - - switch (sIdentifyEffect) - { - case Clusters::Identify::EffectIdentifierEnum::kBlink: - case Clusters::Identify::EffectIdentifierEnum::kOkay: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, - identify); - break; - case Clusters::Identify::EffectIdentifierEnum::kBreathe: - case Clusters::Identify::EffectIdentifierEnum::kChannelChange: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(10), OnTriggerIdentifyEffectCompleted, - identify); - break; - case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, - identify); - break; - case Clusters::Identify::EffectIdentifierEnum::kStopEffect: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - break; - default: - sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; - ChipLogProgress(Zcl, "No identifier effect"); - } -} -#endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER - -void BaseApplication::LightTimerEventHandler(TimerHandle_t xTimer) -{ - LightEventHandler(); -} - -#ifdef DISPLAY_ENABLED -SilabsLCD & BaseApplication::GetLCD(void) -{ - return slLCD; -} -#endif - -void BaseApplication::PostEvent(const AppEvent * aEvent) -{ - if (sAppEventQueue != NULL) - { - BaseType_t status; - if (xPortIsInsideInterrupt()) - { - BaseType_t higherPrioTaskWoken = pdFALSE; - status = xQueueSendFromISR(sAppEventQueue, aEvent, &higherPrioTaskWoken); - -#ifdef portYIELD_FROM_ISR - portYIELD_FROM_ISR(higherPrioTaskWoken); -#elif portEND_SWITCHING_ISR // portYIELD_FROM_ISR or portEND_SWITCHING_ISR - portEND_SWITCHING_ISR(higherPrioTaskWoken); -#else // portYIELD_FROM_ISR or portEND_SWITCHING_ISR -#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" -#endif // portYIELD_FROM_ISR or portEND_SWITCHING_ISR - } - else - { - status = xQueueSend(sAppEventQueue, aEvent, 1); - } - - if (!status) - { - SILABS_LOG("Failed to post event to app task event queue"); - } - } - else - { - SILABS_LOG("Event Queue is NULL should never happen"); - } -} - -void BaseApplication::DispatchEvent(AppEvent * aEvent) -{ - if (aEvent->Handler) - { - aEvent->Handler(aEvent); - } - else - { - SILABS_LOG("Event received with no handler. Dropping event."); - } -} diff --git a/examples/platform/silabs/SiWx917/BaseApplication.h b/examples/platform/silabs/SiWx917/BaseApplication.h deleted file mode 100644 index badb42a84db54b..00000000000000 --- a/examples/platform/silabs/SiWx917/BaseApplication.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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 - -/********************************************************** - * Includes - *********************************************************/ - -#include -#include - -#include "AppEvent.h" -#include "FreeRTOS.h" -#include "timers.h" // provides FreeRTOS timer support -#include -#include -#include -#include -#include - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -#include -#endif - -#ifdef DISPLAY_ENABLED -#include "demo-ui.h" -#include "lcd.h" -#ifdef QR_CODE_ENABLED -#include "qrcodegen.h" -#endif // QR_CODE_ENABLED -#endif // DISPLAY_ENABLED - -/********************************************************** - * Defines - *********************************************************/ - -// Application-defined error codes in the CHIP_ERROR space. -#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) -#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) -#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) -#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) -#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) -#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) - -/********************************************************** - * BaseApplication Declaration - *********************************************************/ - -class BaseApplication -{ - -public: - BaseApplication() = default; - virtual ~BaseApplication(){}; - - /** - * @brief Create AppTask task and Event Queue - * If an error occurs during creation, application will hang after printing out error code - * - * @return CHIP_ERROR CHIP_NO_ERROR if no errors - */ - CHIP_ERROR StartAppTask(TaskFunction_t taskFunction); - - /** - * @brief PostEvent function that add event to AppTask queue for processing - * - * @param event AppEvent to post - */ - static void PostEvent(const AppEvent * event); - -#ifdef DISPLAY_ENABLED - /** - * @brief Return LCD object - */ - static SilabsLCD & GetLCD(void); -#endif - - /** - * @brief Function called to start the LED light timer - */ - static void StartStatusLEDTimer(void); - - /** - * @brief Function to stop LED light timer - * Turns off Status LED before stopping timer - */ - static void StopStatusLEDTimer(void); - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER - // Idenfiy server command callbacks. - static void OnIdentifyStart(Identify * identify); - static void OnIdentifyStop(Identify * identify); - static void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState); - static void OnTriggerIdentifyEffect(Identify * identify); -#endif - - enum Function_t - { - kFunction_NoneSelected = 0, - kFunction_SoftwareUpdate = 0, - kFunction_StartBleAdv = 1, - kFunction_FactoryReset = 2, - - kFunction_Invalid - } Function; - -protected: - CHIP_ERROR Init(); - - /** - * @brief Function called to start the function timer - * - * @param aTimeoutMs timer duration in ms - */ - static void StartFunctionTimer(uint32_t aTimeoutMs); - - /** - * @brief Function to stop function timer - */ - static void CancelFunctionTimer(void); - - /** - * @brief Function call event callback function for processing - * - * @param event triggered event to be processed - */ - void DispatchEvent(AppEvent * event); - - /** - * @brief Function Timer finished callback function - * Post an FunctionEventHandler event - * - * @param xTimer timer that finished - */ - static void FunctionTimerEventHandler(TimerHandle_t xTimer); - - /** - * @brief Factory reset trigger function - * Trigger factory if called - * - */ - static void FunctionFactoryReset(void); - - /** - * @brief Timer Event processing function - * Trigger factory if Press and Hold duration is respected - * - * @param aEvent post event being processed - */ - static void FunctionEventHandler(AppEvent * aEvent); - - /** - * @brief PB0 Button event processing function - * Press and hold will trigger a factory reset timer start - * Press and release will restart BLEAdvertising if not commisionned - * - * @param aEvent button event being processed - */ - static void ButtonHandler(AppEvent * aEvent); - - /** - * @brief Light Timer finished callback function - * Calls LED processing function - * - * @param xTimer timer that finished - */ - static void LightTimerEventHandler(TimerHandle_t xTimer); - - /** - * @brief Activate a set of Led patterns of the Status led - * Identify patterns and Trigger effects have priority - * If no identification patterns are in progress, we provide - * commissioning status feedback. - * - * @return True if a Led pattern was set, otherwise, returns false. - */ - static bool ActivateStatusLedPatterns(); - - /** - * @brief Updates device LEDs - */ - static void LightEventHandler(); - - /********************************************************** - * Protected Attributes declaration - *********************************************************/ - bool mSyncClusterToButtonAction; -}; diff --git a/examples/platform/silabs/SiWx917/FreeRTOSConfig.h b/examples/platform/silabs/SiWx917/FreeRTOSConfig.h deleted file mode 100644 index cfbc571454a209..00000000000000 --- a/examples/platform/silabs/SiWx917/FreeRTOSConfig.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * - * Copyright (c) 2020 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. - */ - -/*************************************************************************** - * # License - * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is Third Party Software licensed by Silicon Labs from a third party - * and is governed by the sections of the MSLA applicable to Third Party - * Software and the additional terms set forth below. - * - ******************************************************************************/ -/* - FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * - * See http://www.freertos.org/a00110.html. - *----------------------------------------------------------*/ - -extern uint32_t SystemCoreClock; - -/* Energy saving modes. */ -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#define configUSE_TICKLESS_IDLE 1 -#else -#define configUSE_TICKLESS_IDLE 0 -#endif // SL_CATALOG_POWER_MANAGER_PRESENT - -#define configTICK_RATE_HZ (1000) -/* Definition used by Keil to replace default system clock source. */ -#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 - -/* Hook function related definitions. */ -#define configUSE_TICK_HOOK (1) -#define configCHECK_FOR_STACK_OVERFLOW (2) -#define configUSE_MALLOC_FAILED_HOOK (1) -#define configUSE_IDLE_HOOK (0) - -/* Main functions*/ -/* Run time stats gathering related definitions. */ -#define configGENERATE_RUN_TIME_STATS (0) - -/* Co-routine related definitions. */ -#define configUSE_CO_ROUTINES (0) -#define configMAX_CO_ROUTINE_PRIORITIES (1) - -/* Software timer related definitions. */ -#define configUSE_TIMERS (1) -#define configTIMER_TASK_PRIORITY (40) /* Highest priority */ -#define configTIMER_QUEUE_LENGTH (10) -#define configTIMER_TASK_STACK_DEPTH (1024) - -/* Interrupt priorities used by the kernel port layer itself. These are generic -to all Cortex-M ports, and do not rely on any particular library functions. */ -#define configKERNEL_INTERRUPT_PRIORITY (255) -/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! -See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 48 -#define configENABLE_FPU 0 -#define configENABLE_MPU 0 -/* FreeRTOS Secure Side Only and TrustZone Security Extension */ -#define configRUN_FREERTOS_SECURE_ONLY 1 -#define configENABLE_TRUSTZONE 0 -/* FreeRTOS MPU specific definitions. */ -#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS (0) - -#define configCPU_CLOCK_HZ (SystemCoreClock) -#define configUSE_PREEMPTION (1) -#define configUSE_TIME_SLICING (1) -#define configUSE_PORT_OPTIMISED_TASK_SELECTION (0) -#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG (1) /* See into vPortSuppressTicksAndSleep source code for explanation */ -#define configMAX_PRIORITIES (56) -#define configMINIMAL_STACK_SIZE (320) /* Number of words to use for Idle and Timer stacks */ -#define configMAX_TASK_NAME_LEN (10) -#define configUSE_16_BIT_TICKS (0) -#define configIDLE_SHOULD_YIELD (1) -#define configUSE_MUTEXES (1) -#define configUSE_RECURSIVE_MUTEXES (1) -#define configUSE_COUNTING_SEMAPHORES (1) -#define configUSE_TASK_NOTIFICATIONS 1 -#define configUSE_TRACE_FACILITY 1 -#define configQUEUE_REGISTRY_SIZE (10) -#define configUSE_QUEUE_SETS (0) -#define configUSE_NEWLIB_REENTRANT (1) -#define configENABLE_BACKWARD_COMPATIBILITY (1) -#define configSUPPORT_STATIC_ALLOCATION (1) -#define configSUPPORT_DYNAMIC_ALLOCATION (1) - -#ifndef configTOTAL_HEAP_SIZE -#ifdef DIC_ENABLE -#define configTOTAL_HEAP_SIZE ((size_t)(50 * 1024)) -#else -#define configTOTAL_HEAP_SIZE ((size_t)(34 * 1024)) -#endif // DIC_ENABLE -#endif // configTOTAL_HEAP_SIZE - -/* Optional functions - most linkers will remove unused functions anyway. */ -#define INCLUDE_vTaskPrioritySet (1) -#define INCLUDE_uxTaskPriorityGet (1) -#define INCLUDE_vTaskDelete (1) -#define INCLUDE_vTaskSuspend (1) -#define INCLUDE_xResumeFromISR (1) -#define INCLUDE_vTaskDelayUntil (1) -#define INCLUDE_vTaskDelay (1) -#define INCLUDE_xTaskGetSchedulerState (1) -#define INCLUDE_xTaskGetCurrentTaskHandle (1) -#define INCLUDE_uxTaskGetStackHighWaterMark (1) -#define INCLUDE_xTaskGetIdleTaskHandle (1) -#define INCLUDE_xTimerGetTimerDaemonTaskHandle (1) -#define INCLUDE_pcTaskGetTaskName (1) -#define INCLUDE_eTaskGetState (1) -#define INCLUDE_xEventGroupSetBitFromISR (1) -#define INCLUDE_xEventGroupSetBitsFromISR (1) -#define INCLUDE_xSemaphoreGetMutexHolder (1) -#define INCLUDE_xTimerPendFunctionCall (1) -#define INCLUDE_xTaskGetHandle (1) - -/* Stop if an assertion fails. */ -#define configASSERT(x) \ - if ((x) == 0) \ - { \ - taskDISABLE_INTERRUPTS(); \ - printf("\nFREERTOS ASSERT ( %s )\n", #x); \ - for (;;) \ - ; \ - } -#define configASSERTNULL(x) \ - if ((x) == NULL) \ - { \ - taskDISABLE_INTERRUPTS(); \ - for (;;) \ - ; \ - } - -/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS -standard names. */ -#define vPortSVCHandler SVC_Handler -#define xPortPendSVHandler PendSV_Handler -/* Ensure Cortex-M port compatibility. */ -#define SysTick_Handler xPortSysTickHandler - -/* Thread local storage pointers used by the SDK */ -#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS -#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 0 -#endif - -#if defined(__GNUC__) -/* For the linker. */ -#define fabs __builtin_fabs -#endif - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/init_ccpPlatform.cpp b/examples/platform/silabs/SiWx917/init_ccpPlatform.cpp deleted file mode 100644 index 3723d72f090c5b..00000000000000 --- a/examples/platform/silabs/SiWx917/init_ccpPlatform.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -#include "AppConfig.h" -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#include "init_ccpPlatform.h" - -void initAntenna(void); - -/* GPIO button config */ -void RSI_Wakeupsw_config(void); -void RSI_Wakeupsw_config_gpio0(void); - -void init_ccpPlatform(void) -{ - - RSI_Wakeupsw_config(); - - RSI_Wakeupsw_config_gpio0(); -#if SILABS_LOG_ENABLED - silabsInitLog(); -#endif -} - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/init_ccpPlatform.h b/examples/platform/silabs/SiWx917/init_ccpPlatform.h deleted file mode 100644 index 986e2fecb18dd9..00000000000000 --- a/examples/platform/silabs/SiWx917/init_ccpPlatform.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2020 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 - -#ifdef __cplusplus -extern "C" { -#endif - -void init_ccpPlatform(void); -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/matter_config.cpp b/examples/platform/silabs/SiWx917/matter_config.cpp deleted file mode 100644 index e0a7dc1e570079..00000000000000 --- a/examples/platform/silabs/SiWx917/matter_config.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2022 Silabs. - * 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. - */ - -#include "AppConfig.h" -#include "OTAConfig.h" -#include - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif -#ifdef SL_WIFI -#include "wfx_host_events.h" -#endif /* SL_WIFI */ -#ifdef __cplusplus -} -#endif - -#if PW_RPC_ENABLED -#include "Rpc.h" -#endif - -#ifdef ENABLE_CHIP_SHELL -#include "matter_shell.h" -#endif - -#ifdef HEAP_MONITORING -#include "MemMonitoring.h" -#endif - -using namespace ::chip; -using namespace ::chip::Inet; -using namespace ::chip::DeviceLayer; - -#include -// If building with the SiWx917-provided crypto backend, we can use the - -#include "SilabsDeviceDataProvider.h" -#include "SilabsTestEventTriggerDelegate.h" -#include - -#if SILABS_OTA_ENABLED -void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState) -{ -#if 0 // TODO : OTA is not planned now for CCP - OTAConfig::Init(); -#endif -} -#endif - -void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg) -{ - // Initialize OTA only when Thread or WiFi connectivity is established - /*if (((event->Type == DeviceEventType::kThreadConnectivityChange) && - (event->ThreadConnectivityChange.Result == kConnectivity_Established)) || - ((event->Type == DeviceEventType::kInternetConnectivityChange) && - (event->InternetConnectivityChange.IPv6 == kConnectivity_Established))) - { - SILABS_LOG("Scheduling OTA Requestor initialization") - chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec), - InitOTARequestorHandler, nullptr); - }*/ - SILABS_LOG("Scheduling OTA Requestor initialization") -} - -#if SILABS_TEST_EVENT_TRIGGER_ENABLED -static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff }; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED - -CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) -{ - CHIP_ERROR err; - - mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); - - SILABS_LOG("=================================================="); - SILABS_LOG("%s starting", appName); - SILABS_LOG("=================================================="); - -#if PW_RPC_ENABLED - chip::rpc::Init(); -#endif - -#ifdef HEAP_MONITORING - MemMonitoring::startHeapMonitoring(); -#endif - //============================================== - // Init Matter Stack - //============================================== - SILABS_LOG("Init CHIP Stack"); - // Init Chip memory management before the stack - ReturnErrorOnFailure(chip::Platform::MemoryInit()); - - SILABS_LOG("Init RSI 911x Platform"); - int32_t deviceInit = wfx_rsi_platform(); - if (deviceInit != SL_STATUS_OK) - { - SILABS_LOG("RSI init failed"); - return CHIP_ERROR_INTERNAL; - } - ReturnErrorOnFailure(PlatformMgr().InitChipStack()); - - SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); - SetCommissionableDataProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); - -#ifdef SIWX917_USE_COMISSIONABLE_DATA - err = Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().FlashFactoryData(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("Flashing to the device failed"); - return err; - } -#endif - chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(appName); - - // Stop Matter event handling while setting up resources - chip::DeviceLayer::PlatformMgr().LockChipStack(); - - // Create initParams with SDK example defaults here - static chip::CommonCaseDeviceServerInitParams initParams; - -#if SILABS_TEST_EVENT_TRIGGER_ENABLED - if (Encoding::HexToBytes(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, strlen(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY), - sTestEventTriggerEnableKey, - TestEventTriggerDelegate::kEnableKeyLength) != TestEventTriggerDelegate::kEnableKeyLength) - { - SILABS_LOG("Failed to convert the EnableKey string to octstr type value"); - memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); - } - static SilabsTestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; - initParams.testEventTriggerDelegate = &testEventTriggerDelegate; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED - - // Initialize the remaining (not overridden) providers to the SDK example defaults - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - - // Init Matter Server and Start Event Loop - err = chip::Server::GetInstance().Init(initParams); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - ReturnErrorOnFailure(err); - - // OTA Requestor initialization will be triggered by the connectivity events - // TODO - // PlatformMgr().AddEventHandler(ConnectivityEventCallback, reinterpret_cast(nullptr)); - - SILABS_LOG("Starting Platform Manager Event Loop"); - ReturnErrorOnFailure(PlatformMgr().StartEventLoopTask()); - -#ifdef SL_WIFI - InitWiFi(); -#endif - -#ifdef ENABLE_CHIP_SHELL - chip::startShellTask(); -#endif - - return CHIP_NO_ERROR; -} - -#ifdef SL_WIFI -void SilabsMatterConfig::InitWiFi(void) -{ -#ifdef RS911X_WIFI - /* - * Start up any RSI interface stuff - * (Not required) - Note that wfx_wifi_start will deal with - * starting up a rsi task - which will initialize the SPI interface. - */ -#endif -} -#endif // SL_WIFI - -// ================================================================================ -// FreeRTOS Callbacks -// ================================================================================ -extern "C" void vApplicationIdleHook(void) -{ - // FreeRTOS Idle callback -} diff --git a/examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn b/examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn deleted file mode 100644 index 20547c3b7beabc..00000000000000 --- a/examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn +++ /dev/null @@ -1,39 +0,0 @@ -# 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") - -import("$dir_pw_build/target_types.gni") - -examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" - -config("default_config") { - include_dirs = [ "public" ] -} - -pw_source_set("pw_sys_io_efr32") { - sources = [ "sys_io_efr32.cc" ] - - deps = [ - "$dir_pw_sys_io:default_putget_bytes", - "$dir_pw_sys_io:facade", - ] - - cflags = [ "-Wconversion" ] - - public_configs = [ ":default_config" ] - - include_dirs = [ "${examples_plat_dir}" ] -} diff --git a/examples/platform/silabs/SiWx917/uart.h b/examples/platform/silabs/SiWx917/uart.h deleted file mode 100644 index 035d5b3b0ede7d..00000000000000 --- a/examples/platform/silabs/SiWx917/uart.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * Copyright (c) 2021 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 - -#ifdef __cplusplus -extern "C" { -#endif - -void uartConsoleInit(void); -int16_t uartConsoleWrite(const char * Buf, uint16_t BufLength); -int16_t uartConsoleRead(char * Buf, uint16_t NbBytesToRead); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/examples/platform/silabs/efr32/TemperatureSensor.cpp b/examples/platform/silabs/TemperatureSensor.cpp similarity index 100% rename from examples/platform/silabs/efr32/TemperatureSensor.cpp rename to examples/platform/silabs/TemperatureSensor.cpp diff --git a/examples/platform/silabs/efr32/TemperatureSensor.h b/examples/platform/silabs/TemperatureSensor.h similarity index 100% rename from examples/platform/silabs/efr32/TemperatureSensor.h rename to examples/platform/silabs/TemperatureSensor.h diff --git a/examples/platform/silabs/SiWx917/board_config.h b/examples/platform/silabs/board_config.h similarity index 98% rename from examples/platform/silabs/SiWx917/board_config.h rename to examples/platform/silabs/board_config.h index ed92fdd145a1c7..fa6779f583afd1 100644 --- a/examples/platform/silabs/SiWx917/board_config.h +++ b/examples/platform/silabs/board_config.h @@ -28,7 +28,7 @@ /** * @file - * This file includes dev board compile-time configuration constants for SiWx917. + * This file includes dev board compile-time configuration constants for Silabs board. * */ diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 38d77a45e19498..3a965cb01185b1 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -285,14 +285,13 @@ source_set("efr32-common") { include_dirs = [ "." ] sources = [ + "${silabs_common_plat_dir}/BaseApplication.cpp", "${silabs_common_plat_dir}/LEDWidget.cpp", + "${silabs_common_plat_dir}/MatterConfig.cpp", "${silabs_common_plat_dir}/SoftwareFaultReports.cpp", "${silabs_common_plat_dir}/heap_4_silabs.c", "${silabs_common_plat_dir}/silabs_utils.cpp", "${silabs_common_plat_dir}/syscalls_stubs.cpp", - "BaseApplication.cpp", - "init_efrPlatform.cpp", - "matter_config.cpp", ] if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) { diff --git a/examples/platform/silabs/efr32/board_config.h b/examples/platform/silabs/efr32/board_config.h deleted file mode 100644 index 8c495b4fa7f513..00000000000000 --- a/examples/platform/silabs/efr32/board_config.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2018, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file - * This file includes dev borad compile-time configuration constants for efr32. - * - */ - -#pragma once - -/// Dev board suppports OQPSK modulation in 2.4GHz band. -#define RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT 1 -#define RADIO_CONFIG_915MHZ_OQPSK_SUPPORT 0 - -/// The PA(s) is(are) fed from the DCDC -#if (BRD4166A) -#define RADIO_CONFIG_PA_USES_DCDC 1 -#else -#define RADIO_CONFIG_PA_USES_DCDC 0 -#endif - -#ifndef RADIO_CONFIG_DEBUG_COUNTERS_SUPPORT -#define RADIO_CONFIG_DEBUG_COUNTERS_SUPPORT 0 /// Set to 1 to enable debug counters in radio.c -#endif - -#ifndef RADIO_CONFIG_DMP_SUPPORT -#define RADIO_CONFIG_DMP_SUPPORT 0 /// Set to 1 to enable Dynamic Multi-Protocol support in radio.c -#endif diff --git a/examples/platform/silabs/efr32/init_efrPlatform.cpp b/examples/platform/silabs/efr32/init_efrPlatform.cpp deleted file mode 100644 index 5deaf666e4b12e..00000000000000 --- a/examples/platform/silabs/efr32/init_efrPlatform.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -#include "AppConfig.h" -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#if CHIP_ENABLE_OPENTHREAD -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "platform-efr32.h" -#include "sl_openthread.h" - -#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE -#include "openthread/heap.h" -#endif // OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE -#endif // CHIP_ENABLE_OPENTHREAD - -#include "init_efrPlatform.h" -#include "sl_component_catalog.h" -#include "sl_mbedtls.h" -#include "sl_system_init.h" -#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI -#include "uart.h" -#endif - -#if SL_SYSTEM_VIEW -#include "SEGGER_SYSVIEW.h" -#endif - -void initAntenna(void); - -void init_efrPlatform(void) -{ - sl_system_init(); - sl_mbedtls_init(); -#if CHIP_ENABLE_OPENTHREAD -#ifdef MGM24 - sl_openthread_init(); -#endif - efr32RadioInit(); - efr32AlarmInit(); - efr32MiscInit(); -#endif // CHIP_ENABLE_OPENTHREAD - -#if SL_SYSTEM_VIEW - SEGGER_SYSVIEW_Conf(); - SEGGER_SYSVIEW_Start(); -#endif -#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI - uartConsoleInit(); -#endif -#if SILABS_LOG_ENABLED - silabsInitLog(); -#endif -} - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/efr32/init_efrPlatform.h b/examples/platform/silabs/efr32/init_efrPlatform.h deleted file mode 100644 index aeb47b8aaed3d1..00000000000000 --- a/examples/platform/silabs/efr32/init_efrPlatform.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (c) 2020 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 - -#ifdef __cplusplus -extern "C" { -#endif - -void init_efrPlatform(void); - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h b/examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h deleted file mode 100644 index f11f5e928f3e14..00000000000000 --- a/examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * 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. - */ - -#pragma once - -#include "pw_preprocessor/util.h" - -PW_EXTERN_C_START - -// The actual implement of PreMainInit() in sys_io_BACKEND. -void pw_sys_io_Init(); - -PW_EXTERN_C_END diff --git a/examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc b/examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc deleted file mode 100644 index 4bc7d98f7477c4..00000000000000 --- a/examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * 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. - */ - -#include "pw_sys_io/sys_io.h" -#include -#include -#include -#include - -#include "uart.h" - -int16_t console_getchar(char * chr) -{ - int16_t retVal = 0; - - // Busy wait for pw_rcp reads - while (retVal == 0) - { - retVal = uartConsoleRead(chr, 1); - } - return retVal; -} - -int16_t console_putchar(const char * chr) -{ - return uartConsoleWrite(chr, 1); -} - -extern "C" void pw_sys_io_Init() -{ - uartConsoleInit(); -} - -namespace pw::sys_io { - -Status ReadByte(std::byte * dest) -{ - if (!dest) - return Status::InvalidArgument(); - - int16_t ret = console_getchar(reinterpret_cast(dest)); - return ret < 0 ? Status::FailedPrecondition() : OkStatus(); -} - -Status WriteByte(std::byte b) -{ - int16_t ret = console_putchar(reinterpret_cast(&b)); - return ret < 0 ? Status::FailedPrecondition() : OkStatus(); -} - -// Writes a string using pw::sys_io, and add newline characters at the end. -StatusWithSize WriteLine(const std::string_view & s) -{ - size_t chars_written = 0; - StatusWithSize result = WriteBytes(pw::as_bytes(pw::span(s))); - if (!result.ok()) - { - return result; - } - chars_written += result.size(); - result = WriteBytes(pw::as_bytes(pw::span("\r\n", 2))); - chars_written += result.size(); - - return StatusWithSize(result.status(), chars_written); -} - -} // namespace pw::sys_io diff --git a/examples/platform/silabs/SiWx917/ldscripts/SiWx917.ld b/examples/platform/silabs/ldscripts/SiWx917.ld similarity index 100% rename from examples/platform/silabs/SiWx917/ldscripts/SiWx917.ld rename to examples/platform/silabs/ldscripts/SiWx917.ld diff --git a/examples/platform/silabs/efr32/ldscripts/efr32mg12.ld b/examples/platform/silabs/ldscripts/efr32mg12.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/efr32mg12.ld rename to examples/platform/silabs/ldscripts/efr32mg12.ld diff --git a/examples/platform/silabs/efr32/ldscripts/efr32mg21.ld b/examples/platform/silabs/ldscripts/efr32mg21.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/efr32mg21.ld rename to examples/platform/silabs/ldscripts/efr32mg21.ld diff --git a/examples/platform/silabs/efr32/ldscripts/efr32mg24.ld b/examples/platform/silabs/ldscripts/efr32mg24.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/efr32mg24.ld rename to examples/platform/silabs/ldscripts/efr32mg24.ld diff --git a/examples/platform/silabs/efr32/ldscripts/mgm24.ld b/examples/platform/silabs/ldscripts/mgm24.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/mgm24.ld rename to examples/platform/silabs/ldscripts/mgm24.ld diff --git a/examples/platform/silabs/main.cpp b/examples/platform/silabs/main.cpp index a94696ef08374e..03fb25b549db67 100644 --- a/examples/platform/silabs/main.cpp +++ b/examples/platform/silabs/main.cpp @@ -22,9 +22,9 @@ #include "AppConfig.h" #include +#include #include #include -#include #ifdef SILABS_ATTESTATION_CREDENTIALS #include #else diff --git a/examples/platform/silabs/efr32/pw_sys_io/BUILD.gn b/examples/platform/silabs/pw_sys_io/BUILD.gn similarity index 87% rename from examples/platform/silabs/efr32/pw_sys_io/BUILD.gn rename to examples/platform/silabs/pw_sys_io/BUILD.gn index 722d2a7cad24e6..354ed573eb9935 100644 --- a/examples/platform/silabs/efr32/pw_sys_io/BUILD.gn +++ b/examples/platform/silabs/pw_sys_io/BUILD.gn @@ -17,14 +17,14 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +examples_plat_dir = "${chip_root}/examples/platform/silabs" config("default_config") { include_dirs = [ "public" ] } -pw_source_set("pw_sys_io_efr32") { - sources = [ "sys_io_efr32.cc" ] +pw_source_set("pw_sys_io_silabs") { + sources = [ "sys_io_silabs.cc" ] deps = [ "$dir_pw_sys_io:default_putget_bytes", diff --git a/examples/platform/silabs/SiWx917/pw_sys_io/public/pw_sys_io_efr32/init.h b/examples/platform/silabs/pw_sys_io/public/pw_sys_io_efr32/init.h similarity index 100% rename from examples/platform/silabs/SiWx917/pw_sys_io/public/pw_sys_io_efr32/init.h rename to examples/platform/silabs/pw_sys_io/public/pw_sys_io_efr32/init.h diff --git a/examples/platform/silabs/SiWx917/pw_sys_io/sys_io_siwx917.cc b/examples/platform/silabs/pw_sys_io/sys_io_silabs.cc similarity index 100% rename from examples/platform/silabs/SiWx917/pw_sys_io/sys_io_siwx917.cc rename to examples/platform/silabs/pw_sys_io/sys_io_silabs.cc diff --git a/examples/platform/silabs/silabs_utils.cpp b/examples/platform/silabs/silabs_utils.cpp index 0e67a9e723a764..7231836c15bf7e 100644 --- a/examples/platform/silabs/silabs_utils.cpp +++ b/examples/platform/silabs/silabs_utils.cpp @@ -19,7 +19,7 @@ #include "silabs_utils.h" #include "SoftwareFaultReports.h" -#include +#include void appError(int err) { diff --git a/examples/platform/silabs/efr32/uart.h b/examples/platform/silabs/uart.h similarity index 100% rename from examples/platform/silabs/efr32/uart.h rename to examples/platform/silabs/uart.h diff --git a/examples/pump-app/silabs/BUILD.gn b/examples/pump-app/silabs/BUILD.gn index 1dc594d535d327..f255000ea525d5 100644 --- a/examples/pump-app/silabs/BUILD.gn +++ b/examples/pump-app/silabs/BUILD.gn @@ -66,7 +66,7 @@ if (slc_generate) { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -89,7 +89,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -189,7 +189,7 @@ silabs_executable("pump_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -200,7 +200,7 @@ silabs_executable("pump_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/smoke-co-alarm-app/silabs/BUILD.gn b/examples/smoke-co-alarm-app/silabs/BUILD.gn index cafd4b6f7cc1bd..7750dc31f6324b 100644 --- a/examples/smoke-co-alarm-app/silabs/BUILD.gn +++ b/examples/smoke-co-alarm-app/silabs/BUILD.gn @@ -68,7 +68,7 @@ if (slc_generate) { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -91,7 +91,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -188,7 +188,7 @@ silabs_executable("smoke_co_alarm_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -199,7 +199,7 @@ silabs_executable("smoke_co_alarm_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/thermostat/silabs/BUILD.gn b/examples/thermostat/silabs/BUILD.gn index 684ab738804105..f82bbc40776c40 100644 --- a/examples/thermostat/silabs/BUILD.gn +++ b/examples/thermostat/silabs/BUILD.gn @@ -56,7 +56,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -79,7 +79,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -147,7 +147,7 @@ silabs_executable("thermostat_app") { "${efr32_sdk_root}/platform/common/src/sl_status.c", "${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c", "${efr32_sdk_root}/platform/emlib/src/em_i2c.c", - "${examples_plat_dir}/TemperatureSensor.cpp", + "${examples_common_plat_dir}/TemperatureSensor.cpp", "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c", ] } @@ -198,7 +198,7 @@ silabs_executable("thermostat_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -209,7 +209,7 @@ silabs_executable("thermostat_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/window-app/silabs/BUILD.gn b/examples/window-app/silabs/BUILD.gn index e5c33fdbdeab9e..cc6f916712d233 100644 --- a/examples/window-app/silabs/BUILD.gn +++ b/examples/window-app/silabs/BUILD.gn @@ -53,7 +53,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -76,7 +76,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -134,7 +134,7 @@ silabs_executable("window_app") { } else { deps += [ "${examples_plat_dir}:efr32-common" ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp index 3deb5fd2359087..98eaa6f7114724 100644 --- a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp +++ b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include "init_efrPlatform.h" #include #include "sl_system_kernel.h" @@ -30,6 +29,34 @@ extern "C" { #include "sl_simple_button_instances.h" #endif +extern "C" { +#include + +#if CHIP_ENABLE_OPENTHREAD +#include "platform-efr32.h" + +#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE +#include "openthread/heap.h" +#endif // OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE + +#endif // CHIP_ENABLE_OPENTHREAD + +#include "sl_component_catalog.h" +#include "sl_mbedtls.h" +#include "sl_system_init.h" +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI +#include "uart.h" +#endif + +#if SL_SYSTEM_VIEW +#include "SEGGER_SYSVIEW.h" +#endif +} + +#if SILABS_LOG_ENABLED +#include "silabs_utils.h" +#endif + namespace chip { namespace DeviceLayer { namespace Silabs { @@ -40,7 +67,25 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { - init_efrPlatform(); + sl_system_init(); + sl_mbedtls_init(); + +#if CHIP_ENABLE_OPENTHREAD + sl_ot_sys_init(); +#endif + +#if SL_SYSTEM_VIEW + SEGGER_SYSVIEW_Conf(); + SEGGER_SYSVIEW_Start(); +#endif + +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI + uartConsoleInit(); +#endif + +#if SILABS_LOG_ENABLED + silabsInitLog(); +#endif return CHIP_NO_ERROR; } diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index d39a1180a524ad..f226caeaaa8395 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -17,13 +17,14 @@ #include -#include "init_ccpPlatform.h" #include #include // TODO add includes ? extern "C" void RSI_Board_LED_Set(int, bool); extern "C" void RSI_Board_LED_Toggle(int); +extern "C" void RSI_Wakeupsw_config(void); +extern "C" void RSI_Wakeupsw_config_gpio0(void); namespace chip { namespace DeviceLayer { @@ -35,7 +36,12 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { mButtonCallback = nullptr; - init_ccpPlatform(); + RSI_Wakeupsw_config(); + + RSI_Wakeupsw_config_gpio0(); +#if SILABS_LOG_ENABLED + silabsInitLog(); +#endif return CHIP_NO_ERROR; } diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 9a250bb730ad22..59df8e9d54f03d 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -45,7 +45,7 @@ pw_proto_library("nl_test_service") { efr32_sdk("sdk") { sources = [ "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ @@ -73,7 +73,6 @@ silabs_executable("efr32_device_tests") { "${examples_common_plat_dir}/PigweedLogger.cpp", "${examples_common_plat_dir}/heap_4_silabs.c", "${examples_common_plat_dir}/syscalls_stubs.cpp", - "${examples_plat_dir}/init_efrPlatform.cpp", "${examples_plat_dir}/uart.cpp", "src/main.cpp", ] @@ -86,7 +85,7 @@ silabs_executable("efr32_device_tests") { "${chip_root}/src:tests", "${chip_root}/src/lib", "${chip_root}/src/lib/support:testing", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs", "${nlunit_test_root}:nlunit-test", ] @@ -108,7 +107,7 @@ silabs_executable("efr32_device_tests") { include_dirs = [ "${chip_root}/examples/common/pigweed/efr32" ] - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/src/test_driver/efr32/src/main.cpp b/src/test_driver/efr32/src/main.cpp index 03f0a626f1b9a7..533fb5f94c307e 100644 --- a/src/test_driver/efr32/src/main.cpp +++ b/src/test_driver/efr32/src/main.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include @@ -181,7 +181,7 @@ void RunRpcService(void *) int main(void) { - init_efrPlatform(); + chip::DeviceLayer::Silabs::GetPlatform().Init(); PigweedLogger::init(); mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 3267d87e9bd398..dd3e93fb0a6883 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -181,6 +181,9 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/driver/debug/inc", "${silabs_gen_folder}/config", "${silabs_gen_folder}/autogen", + + # Headers needed for Init no function will be called if OT is not used + "${sl_ot_efr32_root}", ] if (silabs_family != "mgm24") { @@ -393,6 +396,7 @@ template("efr32_sdk") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg12_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a", + "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg1x_gcc.a", ] if (!chip_enable_ble_rs911x) { @@ -435,6 +439,7 @@ template("efr32_sdk") { "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libbluetooth.a", "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", + "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a", ] defines += [ diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 433ccfc014ffe3..f76916640f577c 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 433ccfc014ffe313bf5cbc848478701778040ef2 +Subproject commit f76916640f577ce81db2ec361d560c77c2e21478 From ae1cb3216c3ce33d0fe7a1cc233920bd46d3c12a Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 28 Jul 2023 09:10:50 -0700 Subject: [PATCH 073/159] Enable missing attribute and events of Switch cluster in lightning app (#28227) * Enable missing attribute and events of Switch cluster in lightinhg app * Address review comments * Remove all *Press events --- .../lighting-app/lighting-common/lighting-app.matter | 1 + examples/lighting-app/lighting-common/lighting-app.zap | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index ea56e7d7138aa4..5899f6e6658f79 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2354,6 +2354,7 @@ endpoint 0 { } server cluster Switch { + emits event SwitchLatched; ram attribute numberOfPositions default = 2; ram attribute currentPosition; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 8ca915a66c1a70..59133c8e15269e 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4009,6 +4009,15 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "SwitchLatched", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { From 5ac89df5016da34bb5726ad0172b0b32a8769f65 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Fri, 28 Jul 2023 06:19:23 -1000 Subject: [PATCH 074/159] Implemented ExtractCDPExtensionCRLIssuerFromX509Cert() Helper Function (#28345) * Implemented ExtractCDPExtensionCRLIssuerFromX509Cert() Helper Function - Extracts the cRLIssuer Name from the CDP extension pf the X509 ASN.1 Encoded Certificate - Only a single cRLIssuer DirectoryName is supported - The result is copied into buffer in a raw ASN.1 X.509 format - The result should be directly comparable with teh result of ExtractSubjectFromX509Cert() - Added OpenSSL, mbedTLS, TinyCrypt, and other implementations - Added CRLIssuer support to the CDP extension in the chip-cert tool - Generated new test vectors * Restyled by clang-format --------- Co-authored-by: Restyled.io --- ...hip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der | Bin 596 -> 600 bytes ...hip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.pem | 18 +- ...1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.der | Bin 0 -> 667 bytes ...1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.pem | 16 + ...F1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.der | Bin 0 -> 121 bytes ...F1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.pem | 5 + ...0-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.der | Bin 0 -> 719 bytes ...0-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem | 17 + ...00-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der | Bin 0 -> 121 bytes ...00-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.pem | 5 + ...Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.der | Bin 121 -> 121 bytes ...Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem | 6 +- ...000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der | Bin 0 -> 674 bytes ...000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem | 17 + ...8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der | Bin 0 -> 121 bytes ...8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.pem | 5 + ...-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.der | Bin 0 -> 594 bytes ...-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem | 15 + ...p-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der | Bin 0 -> 121 bytes ...p-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem | 5 + ...Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der | Bin 590 -> 585 bytes ...Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.pem | 18 +- ...-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.der | Bin 121 -> 121 bytes ...-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.pem | 6 +- ...0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.der | Bin 0 -> 718 bytes ...0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.pem | 17 + ...-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.der | Bin 0 -> 121 bytes ...-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.pem | 5 + .../Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.der | Bin 551 -> 552 bytes .../Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.pem | 16 +- ...Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.der | Bin 553 -> 552 bytes ...Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem | 14 +- ...-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der | Bin 121 -> 121 bytes ...-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem | 6 +- ...FF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der | Bin 0 -> 616 bytes ...FF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.pem | 15 + ...FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.der | Bin 0 -> 121 bytes ...FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.pem | 5 + ...F1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.der | Bin 0 -> 594 bytes ...F1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem | 15 + ...FF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der | Bin 0 -> 121 bytes ...FF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem | 5 + ...000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der | Bin 0 -> 618 bytes ...000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem | 15 + ...8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der | Bin 0 -> 121 bytes ...8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.pem | 5 + ...000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.der | Bin 0 -> 656 bytes ...000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem | 16 + ...0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der | Bin 0 -> 121 bytes ...0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem | 5 + .../Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der | Bin 121 -> 121 bytes .../Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem | 6 +- ...-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der | Bin 599 -> 599 bytes ...-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.pem | 14 +- ...p-Test-DAC-FFF1-8000-0000-CDP-Long-Key.der | Bin 121 -> 121 bytes ...p-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem | 6 +- ...C-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der | Bin 521 -> 555 bytes ...C-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem | 21 +- ...AC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der | Bin 121 -> 121 bytes ...AC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem | 6 +- .../Chip-Test-DAC-FFF1-8000-000A-Key.der | Bin 121 -> 0 bytes .../test/gen-test-attestation-certs.sh | 89 +- .../tests/CHIPAttCert_test_vectors.cpp | 865 +++++++++++++++--- .../tests/CHIPAttCert_test_vectors.h | 45 + src/crypto/CHIPCryptoPAL.h | 10 + src/crypto/CHIPCryptoPALOpenSSL.cpp | 80 +- src/crypto/CHIPCryptoPALPSA.cpp | 123 ++- src/crypto/CHIPCryptoPALmbedTLS.cpp | 123 ++- src/crypto/tests/CHIPCryptoPALTest.cpp | 97 +- .../common/crypto/CHIPCryptoPALTinyCrypt.cpp | 123 ++- .../crypto/CHIPCryptoPALNXPUltrafastP256.cpp | 123 ++- .../silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp | 123 ++- .../silabs/efr32/CHIPCryptoPALPsaEfr32.cpp | 123 ++- src/tools/chip-cert/CertUtils.cpp | 14 +- src/tools/chip-cert/Cmd_GenAttCert.cpp | 183 +++- src/tools/chip-cert/chip-cert.h | 53 +- 76 files changed, 2198 insertions(+), 301 deletions(-) create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der create mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem delete mode 100644 credentials/test/attestation/Chip-Test-DAC-FFF1-8000-000A-Key.der diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der index 880b441bd42cc6ca50f5790b0ad817706dc771c6..298ff89c7b2b448c565e0082144bfee5a74bf3b0 100644 GIT binary patch delta 268 zcmV+n0rURU1lR-@FoFV9FoFU4paTK{0s;t9(5z>&4BnNI7w1N-fFYr=6LpAEu`JY= z9@-Uf-kxn!w@Vr&e4!jxmv2b0^l=rs+9Gu>W*Ecp-WUk*Dqb$7<<6}T-P=K7NN(Q% delta 245 zcmVZ53pyG4NNFP`EybdS2>TiGLqb* zfxR$+x|2i!DHKKA{58rMC~>3i7P1wKXdC0{ij0$i0Z=I{1_MZBQPPLAD|tE z8)$TNa5^t9Wq4t2aBO8RV{dIQV{&XVll}o0Ln=4`y*mIMNx-Rb7`Sl#O9@nK24M%U v?UkDE3|j#!j{+e8;fYb`j-G}h210CH+H8z0j7^Jbm>79j+}zv@(L|YeSS$>HKtY_>$k4#d z$imRX$k@aykfymU-)H2E-(a_ky5Mq-SvP~|I&I(`?jGSEpiWNMIi%Wry z2yk>%z+xSKM?@M3v$2D{#>5EqBQqmAvl9bLr}4-0*Q$5FUfFeW{tQXUXu-l2_MXb$ zrf_}uq)@#q;(k{h#OGrXV-XQp-;IZq{y(DLHg5grO!Sh$}A5f0%m+Pd7*x<C&c5pk$LNh9`@3h?qEd!|_5T4ryPwfO8_ by6ue2BJ^t!P(>#sieD)JkHs&Ff$pr8A=$4u`!3TF!S*H zCYF?>7Ab_J7MCalIC>h27znX(X|pl1Fg7i!VPfQAadUGsL=$D=VX-g(0tIniBSQl- zBMUEw9FkIOi3}iukJ{B<+5#6GoH(w4P zn7;9)#F4A|uct@`-YYPW2T3cl07Jh)WWCdNPT$v8Mc?F|H{KyAsuXV&)M3!L6Qn|( zrE#M{<2r-T1@a4I+oUr}N(zdt^z~CK5_1c3QuUJabM=#pa`XyPa~BycF)+|G)G^Qk z>H|inGIAh;0@SxGGsOxVs=ft47ARo;j{IwOWzy>uyPbzhACQJ2mZ6-Xghu6W{5a Ho?Qe0A12or literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem new file mode 100644 index 00000000000000..2fa675509e0c06 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICyzCCAnGgAwIBAgIIbAFKueTP2kwwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMG0x +PzA9BgNVBAMMNk1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFJIEZG +RjIgODAwNCBUd28gQ0RQczEUMBIGCisGAQQBgqJ8AgEMBEZGRjExFDASBgorBgEE +AYKifAICDAQ4MDAwMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoKslrxdoASyp +DelJX4WlTkznPxn5a3Aef7B/b6Jixb2uyAibJ65CCU+4b2EX/8/y2qX9pV3gEuKj +SucVzXGGK6OCAR4wggEaMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0G +A1UdDgQWBBQtclLs9MPAl7HpGMTVL+uUGVHecDAfBgNVHSMEGDAWgBSvQrcJTevV +FexuzzO4ERUiXzJSiDCBuQYDVR0fBIGxMIGuMFWgH6AdhhtodHRwczovL2V4YW1w +bGUuY29tL2NybC5wZW2iMqQwMC4xLDAqBgNVBAMMI01hdHRlciBUZXN0IFBBSSBN +dmlkOkZGRjIgTXBpZDo4MDA0MFWgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2Ny +bC5wZW2iMqQwMC4xLDAqBgNVBAMMI01hdHRlciBUZXN0IFBBSSBNdmlkOkZGRjIg +TXBpZDo4MDA0MAoGCCqGSM49BAMCA0gAMEUCIHrNu003uNEQbzYy5BaEjmTKustw +FMMxGLEhtknEGk5fAiEAkIOUuczHJpV7IQ71uxkQ/fTUlsqW0m6iHr6R7izLm3I= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der new file mode 100644 index 0000000000000000000000000000000000000000..0a87f1aac2ea43b45f309546a559a3781420a68d GIT binary patch literal 121 zcmV-<0EYiCcLD(c1RxYehn7Na69}R+XS~OUkfjVL_A(!uE^3;-qZ@0#&WfN41_&yK zNX|V20SBQ(13~}A^L}+32O9!T*tP`-w*fDur)N(5hs$^oB`hxw-o{M#06-Q boA{f%C=ak_lMPHLLiux25?48owlb335lu9W diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem index 39a7c256c79722..db0e8adfd47fac 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIJj6QtgPRpxFxnBqp0m+IYABttjI2ijEbkXYSlxoqN9+oAoGCCqGSM49 -AwEHoUQDQgAESq1e9CH6h6IJavSAXMe2yt8P99CwNTTTESeS2JwB3xO3FQHyxAVo -kpv4m7soD7Bnkw1MKEL5c1ISVzmPtjKS3A== +MHcCAQEEIDlWdRYuYEI4U1YxR0HpbMhxoA2xXiV2oVil2MILNzLioAoGCCqGSM49 +AwEHoUQDQgAErIAhobETdYhSsSzUlx7aFXDenm1Tt0saJXyhHFaXb0iw9HEVutoi +dS5mGMPw3hgI8CpeLqXlzq0Q3dtBo4HX8w== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der new file mode 100644 index 0000000000000000000000000000000000000000..4118bf261aab7795ee799d15c048ca8641492ba4 GIT binary patch literal 674 zcmXqLVwz{r#N@JonTe5!iG#;(=ZRyF`=SiE*f_M>JkHs&Ff$pr8A=$4u`!3TF!S*H zCYF?>7Ab_J7MCalIC>h27znX(X|pl1Fg7i!VPfQAadUGsL=$D=VX-g(0tIniBSQl- zBMU8@ChxrQ4na|+c%z^WgT|R474j^N6Ac>s3>v!^$S;s> zlg=n9DJZtm*H5iT%q_@C)l1IL)lV+U(JM&JU6irJ$iM(+6gr|s7Buk4(Sw|5m^~N_ zT$vPN8Vufx?t1sfqS@;a=fbyB0#oi!zo$D*Uf|l#uTMA4p24KZFeQGLRp05(Q$A(O am>Dbh*>>*jQ<%r@Z1pWlku~w(a!vrpH^8O< literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem new file mode 100644 index 00000000000000..0b0ec0b21ba4bd --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICnjCCAkSgAwIBAgIIDD65yMbjjlowCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGIx +NDAyBgNVBAMMK01hdHRlciBUZXN0IERBQyAwMDAwIENEUCAyIElzc3VlcnMgUEFB +IEZGRjExFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAw +MDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHdENpq382J8M7KbpUCO6AbDdjGD +C+j2vO+k9Vm/ZhvgsV5ZK8myxnGahJ7qFFESbyl7pi9AbwNFMsYngor+ZrWjgf0w +gfowDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFGDqR8k9 ++Qj4XKPNUyASa2H1CgW9MB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKI +MIGZBgNVHR8EgZEwgY4wgYugH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5w +ZW2iaKQyMDAxGDAWBgNVBAMMD01hdHRlciBUZXN0IFBBQTEUMBIGCisGAQQBgqJ8 +AgEMBEZGRjGkMjAwMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUExFDASBgorBgEE +AYKifAIBDARGRkYxMAoGCCqGSM49BAMCA0gAMEUCIFyAMO8Vuu78OINK4gmh7ZRR +ZN+X3i2WHxDW+fXlspuYAiEAlF+aOo7LicpMdqYDAXgPBrm9jiCeB0M69lohBWH+ +pwk= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der new file mode 100644 index 0000000000000000000000000000000000000000..4804d20a9b02c996a6e589260b0627e1642a8610 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1R!=gZY>asb2d-VThM`<F&0^L@@6U4KkH F0RRQ)v1$MS literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem new file mode 100644 index 00000000000000..5a900044e8eb34 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICTjCCAfSgAwIBAgIIHF6aHFFi4O8wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMF0x +LzAtBgNVBAMMJk1hdHRlciBUZXN0IERBQyAwMDAwIFR3byBDRFAgKFR3byBEUHMp +MRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAwWTAT +BgcqhkjOPQIBBggqhkjOPQMBBwNCAASb9ykSyJRWBjmlO0LzR0CmtUjsLsrdWAOu +uHNvMsCbNvmsFiTplPL5JEMSA2svQywlpLnTCrVJdZuJORjf2zygo4GyMIGvMAwG +A1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBSMKnIYf3kO1sth +4tJPGfpXzzCXYDAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDBPBgNV +HR8ESDBGMCGgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW0wIaAfoB2G +G2h0dHBzOi8vZXhhbXBsZS5jb20vY3JsLnBlbTAKBggqhkjOPQQDAgNIADBFAiEA +5tWf3JRbqaBa0Iu3U13jFO1alfhfqQpU7uTfa0gZns0CIDUdAZUHKdNtQG3tf/cW +VNJ5r5PNSIMDs8+OQ7FF+JXI +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der new file mode 100644 index 0000000000000000000000000000000000000000..7ec21313ce8a161104bbd795bb139391fb85b8b8 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1Ry&wt4(y5acV)a@#X^uHCB9RLpq;o$}L=NzD~$|OgEqk1_&yK zNX|V20SBQ(13~}6G&M bBtsGdYcE4AC8W923bjdfn~6CX-`hN(mew#e literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem new file mode 100644 index 00000000000000..ec6200464d4953 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIDswq010l3FqQbHx5gMHNVZ8aEM6n2rKLVxtvk7IfEw3oAoGCCqGSM49 +AwEHoUQDQgAEm/cpEsiUVgY5pTtC80dAprVI7C7K3VgDrrhzbzLAmzb5rBYk6ZTy ++SRDEgNrL0MsJaS50wq1SXWbiTkY39s8oA== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der index 3e725cc85cd818fade063a80fae48781c44d7d53..d33c10b313a0652d0d22cc791c4a623cc402274c 100644 GIT binary patch delta 257 zcmV+c0sj8Z1jz&!FoFU_FoFT=paTK{0s;tm-04mEBOk_*7wtyHmz6HFEMSWc@nchQ zow}@2gX|iPipoHYlJKHdMql8!Hpk*?z(DX=!k`p4cw683Qrm6!ebtATmso`;@wX+T zfvhlrsgp_pDHJ{!gB6@AbId3t7VU$O67h##W(Sjp0U{Sk1_M;UvSNHf*p`;PV~oN+dSGosOVVH;pheH H&lTyouitKy delta 263 zcmV+i0r>vO1kMB(FoFU~FoFT_paTK{0s;tMJQSsNnpG{47wtycMnZPVidzq#NXw=N z|Lv0Ys1p=tVfcHw0Pk!=Yv=*yr^U$WVhPI;1ZwZEjw=J1wkh=>146WnG9Ox7|IB>kWY1_&yK zNX|V20SBQ(13~}<#g~;Xvn*hX4)J4CahHP(YrsJ8 bSi+zbH+Wm$`BK|$_kGoemzP+DDDk%?e@`|g literal 121 zcmV-<0EYiCcLD(c1R%Y|%srch4HOG*9qRScx65PvarRDZsG9RMxtK$KZO5Pr1_&yK zNX|V20SBQ(13~}<+D1Zl%8FYLpGeE52mkGo_NWsSXJPnzxd88MLu=>(=BLHT>0$}X b5d>=QuZ}ANnYJnQAOk|Qj5Kj-G}h210CH+H8z0j7^Jbm>79j+}zv@(L|YeSS$>HKtY_>$k4#d z$imRX$k@aykfymU-)H2E-)6m+$5@M4PvP~|I&I(`?oLvGGJd2A)FQ~5%qrSwzWpi%;H}s86Z1<^L|00z@wGZVy{K|&+71t$+r}&_@VtW zd~p+_l0g%roBXafKs-U$dZP+$-GAV>VX!H9a g)_Zbez}M&tZ#Qx+5}y{9=buoyb*C)H%l5fkT)lY;?UN=X1PMgk!KgQEI~upz3w{=x{a=8gU5 zD>@4}FxX_yPA)Y;x zKmjilXhX;|qdA|LLKQx-tj{l%SYH}YlY;?UNk{-NMFJpYN=y?w$=Xd6cr~m1B-JeJ zqo9wX^yccqu3$kQHua;rm0C1SlY{|WNJjuLL;@fx$7)vBq`7`}ER|4*LE_a^ zRT>75$T9}lvVY~SRd!wiARxP?Nyp8dzGMsNENG+rHn6bm^UUW)u=RrIw;IX1GmK$eiWWws(1yH zK>;rmqXIMdZ$Qx+#b1D>z^N)wZ|a{hlY{|WNk{-NMFJpG?CRP)T}!u6%jfvf30V@< z$mRPV?=U1E&y|BIK+u{3Apo^kUc9FpgnoC`)zLu)yNACwosy)T>WvVf;fqKRE+5(D BR(b#c diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem index 1cc3bfe2334852..039ba4be4caec0 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem @@ -1,14 +1,14 @@ -----BEGIN CERTIFICATE----- -MIICJTCCAcugAwIBAgIINKhBW30/Kx4wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICJDCCAcugAwIBAgIIF/5ta+m+0hMwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFcx KTAnBgNVBAMMIE1hdHRlciBUZXN0IERBQyAwMDAwIENEUCAoSFRUUFMpMRQwEgYK KwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAwWTATBgcqhkjO -PQIBBggqhkjOPQMBBwNCAATZKyTeUWuOzT5oYt6H/Dv3fnARcccLWYz/XwJ/Argg -5/oHutTk2L4mHAj7MZXVqDSCOijMRwO3xRV+FJ5eqngFo4GPMIGMMAwGA1UdEwEB -/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBSjAjP4b0DRGsVfgKXAqSpQ -b+qfMTAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDAsBgNVHR8EJTAj +PQIBBggqhkjOPQMBBwNCAATquEbdfR+IT+cXiiJBp99dMfS5G8a7egh0CbmZNSrP +A67ITJJb9sIBIu7oTX6BErvOwjHjtCIanWEY3HlLbr2Ho4GPMIGMMAwGA1UdEwEB +/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBTjvqcpltz3a7mw8R0ZK7oX +6Vwy+DAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDAsBgNVHR8EJTAj MCGgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW0wCgYIKoZIzj0EAwID -SAAwRQIgU+zq2jxdS7dQy+f40QlZEtTI5fsf7zAkH8+VgylA0JoCIQC1V168pxuE -fnfV1dFBBruHvzedkqSd6o0QoOGLSBAuHw== +RwAwRAIgKsdqVtekuX52LJVQiEHi1VRVGgaPyDIG2LJ/5a5Vdl4CICC7pUnHzZ2+ +ZAvoLGij/DawsO31X3D9sXyyRYEAg9Z1 -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der index 1c41899873d8c2a1116df4bcc95e42d297aeaa22..7dfce53143d887feb3b4a7af2f620c2086ddf255 100644 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1R!@tC(=04+B*2u<&CB_X?bnE`HB4M)`14%?HbOSTeIJNV=NF11L8sqcG4#0`#=Ck5bP2hcH7d^ouEp> literal 121 zcmV-<0EYiCcLD(c1Rw;Y6$6Gj(N1ELZ$=toRo9~n3*4+~n9cZ$7H}$ZpF5xm1_&yK zNX|V20SBQ(13~}<*()U8QEQIPK4@azhx|MDesB?S#|v4E|6c-s0=OXO`Ukqya{mDQ*;f;uS7M+3LT6@C<+UaEKnvjQ;2 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem index ccd6216112c5e8..06aa1bcc785316 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIASkFQOGOdFOYpJvRhpiVdejCwvcrGqYzfiLFnAqcp87oAoGCCqGSM49 -AwEHoUQDQgAE2Ssk3lFrjs0+aGLeh/w7935wEXHHC1mM/18CfwK4IOf6B7rU5Ni+ -JhwI+zGV1ag0gjoozEcDt8UVfhSeXqp4BQ== +MHcCAQEEIHdGJ9I40do6+NTljaY1aXltvfmJ/OrWgQbi7R7KPCj3oAoGCCqGSM49 +AwEHoUQDQgAE6rhG3X0fiE/nF4oiQaffXTH0uRvGu3oIdAm5mTUqzwOuyEySW/bC +ASLu6E1+gRK7zsIx47QiGp1hGNx5S269hw== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der new file mode 100644 index 0000000000000000000000000000000000000000..86107412c50400d26fda3e2ae5c9d9452cdd2dcd GIT binary patch literal 616 zcmXqLVoEV+V&YuD%*4pV#39afM8J3Jl=B8$Y#dr`9_MUXn3)XR3?&T2*qB3En0fep z6H7``ixfgqi%S#&96b$1420OYwAmP07@HQ=FfsD5xVgC*qKPu`uvi!Xfr2=%k)eT^ zk%gg&k+F$!lmx#e5EvR61Cgnvsb!QwyrH3iKEx&sWSd+ZofW_)IJ*QWcor9z0-X@x z=%|3jGW<@6G!SNE2YZZ(5$Z!`Ms{W=1{Sl+YInDOc>HYFS!?6pp{(zBo?3k1{oFv= zzDh;C%p=Q_cNknN46v*^yU6d@zo2uyr4`%yOS^BXX)ki&e*7cOeZ}I&qXvzK40wR9 zmlbAY{LjKXp6v(qg8$=p}FOXj#+a{e+Qc_TC zrLUh_k(gVMld6}TpR1o-l%rRWn!CtkiIIT;&bV_#izR5lA;&zkCxd|-lOn^b3r)=q z>QBTc>+#-Ed&(pB^RHUNv^mDV9M1eWqV)0jcc7Bx92?@Eb*tUVO>s%w<1~L!e3UL7m5Bu9X7Z2q?U=PFfMz&dl&sh>E1&Yz$P1_&yK zNX|V20SBQ(13~}gnP&s1%%#7^JP7Ewr+Ha4GZB0(8OS?VGPWP~ zjR6nP`Le={jQ?4f3>XafKs&*E| RHx4}DOOu?-!KM)8000sTuPgun literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem new file mode 100644 index 00000000000000..03a69bccb767b6 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICTjCCAfSgAwIBAgIISpgV1Lndz3MwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGAx +MjAwBgNVBAMMKU1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFBIE5v +VklEMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAw +WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARqK+3HFrVjZH5m25o+Lc1F8L9YTYWn +0t/4/7F0tdVefxxUlL59e8TinBGAmiA3YVVuORV1Hh0gGquWfjzsvPsho4GvMIGs +MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBQgqFG1WVqL +MShpA6Y/yTYAFznAPjAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDBM +BgNVHR8ERTBDMEGgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW2iHqQc +MBoxGDAWBgNVBAMMD01hdHRlciBUZXN0IFBBQTAKBggqhkjOPQQDAgNIADBFAiEA +g9PU5fUk6hZsFEXtQgil4yb4/9238aG4z7nyOAbC5R8CIH9YZoySudmq+rGTtzCC +4jmFmZ8i2MDgDmYZnQgGIFJA +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der new file mode 100644 index 0000000000000000000000000000000000000000..e52705cea55248b1edf60d1d5c56607b4feb931a GIT binary patch literal 121 zcmV-<0EYiCcLD(c1RzG)pB;^5piOVDo9BBnY7PVt!erDU6J}u2f@V{71g{RWr`2VqVwbfpK98{FPeS5^> boDqPUAU9!EZaEco9vvVWtCoH|?7aISxui5N literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem new file mode 100644 index 00000000000000..361e6d28861455 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIEbZnx2NZaBNb6+b53sybHtOZR+F0JsAvwIDixLl9viJoAoGCCqGSM49 +AwEHoUQDQgAEaivtxxa1Y2R+ZtuaPi3NRfC/WE2Fp9Lf+P+xdLXVXn8cVJS+fXvE +4pwRgJogN2FVbjkVdR4dIBqrln487Lz7IQ== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der new file mode 100644 index 0000000000000000000000000000000000000000..5bc8d661076a02073293a0889bb769705e679d78 GIT binary patch literal 618 zcmXqLVoEb;V&YlA%*4pV#1a4X7|Wgo#fb)7Y#dr`9_MUXn3)XR3?&T2*qB3En0fep z6H7``ixfgqi%S#&96b$1420OYwAmP07@HQ=FfsD5xVgC*qKPu`uvi!Xfr2=%k)eT^ zk%gg&k+F$!lmx#e5EvR61Cgnvsb!QwilLc-3B)E{WSd+ZofW_)IJ*QWcor9z0-XS~ zT>)sBkpj?c6Eqv~yCc#-n2jCmJ0?b`H<=mPnVlF|(z<^LsOX;c>gPG!TjZ;RS#ykA1y&kx%d>prmC3wlSm8`5E!w&^z{`23yxbd(- z;{gL6pciC?85#exFc~ly@PT;zARaI<*&7UGL3}#L$~^3EIY5ENC4Hwx-7NB}92XNfcjHwaxIzd*K4 zI-{hdpx8=ZKeZw;w;(4~FF8L~Ke;GJuOKydk11+E~U<4{72P-HDeakXa ztia*uTL5H%0uwp%nLQW`T$vO&dM?lAes5sF9{2A22Aj3Z-W+%9ejYx%G<)r%dYuEd qicE?OEzfMv9M<0FTTrf@_5aO5Em@OGhaY;L+qknsRcw!m^mzcPCb!N2 literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem new file mode 100644 index 00000000000000..983259f524e460 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICZjCCAgygAwIBAgIIX/XGBLygc2EwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGQx +NjA0BgNVBAMMLU1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFJIEZG +RjIgODAwNDEUMBIGCisGAQQBgqJ8AgEMBEZGRjExFDASBgorBgEEAYKifAICDAQ4 +MDAwMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZov4ECQtzUqPDMONcUCCtZ9E +++knHOZqXRv043j2gbwZ9Kt6y4ozuE47SuBEqeNeqgRTpJapBQXxV8JSaf5Pt6OB +wzCBwDAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNVHQ4EFgQUzoDA +AjObxgDU+Urwle5k8ClCMuIwHwYDVR0jBBgwFoAUr0K3CU3r1RXsbs8zuBEVIl8y +UogwYAYDVR0fBFkwVzBVoB+gHYYbaHR0cHM6Ly9leGFtcGxlLmNvbS9jcmwucGVt +ojKkMDAuMSwwKgYDVQQDDCNNYXR0ZXIgVGVzdCBQQUkgTXZpZDpGRkYyIE1waWQ6 +ODAwNDAKBggqhkjOPQQDAgNIADBFAiAIjNObC+8wMAde7s+wPK2m7MdGi+dXm3Vr +reJ/LMA9IQIhAITmPczDK75NcHcrav/swSodNNLD4UnOsbmIJRa8NBvP +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der new file mode 100644 index 0000000000000000000000000000000000000000..a67c3deb440a4e0bc54064d11de4a51aec9f68b9 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1R(x&&?317*f@S~zakQv-rCyd$#@LAQ4|*4TIq&1q0FEP1_&yK zNX|V20SBQ(13~}JkHs&Ff$pr8A=$4u`!3TF!S*H zCYF?>7Ab_J7MCalIC>h27znX(X|pl1Fg7i!VPfQAadUGsL=$D=VX-g(0tIniBSQl- zBMUbjMs?eNFGNX=CPIBaSFjjk}AR7=;X)82Jo%fNql&W@P-&!eqc;zz5>-gLuGD zVs9{z1@ZY<#8^aRKL!(&E<`(3n>Lusr z>X&3>7V830VxBHkST{dSH@PTBHzl*Uq$o3~v?Mb>Pq!dHGp_`wq9ir17{o8n$V|=v z=`%Di)J@JvEGpIq>d`Am&0S=)#K1t$P{%+E=mcOqE2G7;f^S)7iWM+!jTC$ffGl8q znjohUW_Jby7bXQ^jnBWV7H7Qn?=9Bf&98BuclD8%E`AI)EiJ7(3##}2XHtmenQ@g- hBzBS2tNb^&Hh;M^XTM#+mf&W$J?9#wRZ5;%005C!#l`>t literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem new file mode 100644 index 00000000000000..3e232f154bdfe4 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICjDCCAjOgAwIBAgIIerMwp8ofkZUwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDsx +DTALBgNVBAMMBExvbmcxFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGC +onwCAgwEODAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH3QCDBDf/vXBwk4 +STGEtLxWRk99gQDN7zP4kpk5vryNUzaV1x9MDam/HI6Ef91wi1zTq9Yu4zWBab0y +CFo1KN2jggESMIIBDjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNV +HQ4EFgQUHfNSWZ1B4LBsEwIG/8FXpzLM96QwHwYDVR0jBBgwFoAUr0K3CU3r1RXs +bs8zuBEVIl8yUogwga0GA1UdHwSBpTCBojCBn6BpoGeGZWh0dHBzOi8vZXhhbXBs +ZS5jb20vdGhpcy1pcy1hbi1leGFtcGxlLW9mLWNybC1kaXN0cmlidXRpb24tcG9p +bnQtZXh0ZW5zaW9uLXdoaWNoLWlzLTEwMS1jaGFycy9jcmwucGVtojKkMDAuMSww +KgYDVQQDDCNNYXR0ZXIgVGVzdCBQQUkgTXZpZDpGRkYyIE1waWQ6ODAwNDAKBggq +hkjOPQQDAgNHADBEAiATKPP6OqNo60+Ncy+7DyjPDavE6UROADyEhIW5cHu9/wIg +XQyY1QEUXaI66m/s2rP00py/PnC0U4NGvM6BGyR05Dg= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der new file mode 100644 index 0000000000000000000000000000000000000000..d0d68ddb316e08aafcc19f5204c6aa262236dc60 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1R#WA8N|5!Sp->_Tp31cuuBe`|FV*O`Oa_aM}lh|&N!e71_&yK zNX|V20SBQ(13~}KfdI|#Gx(C3IljD&Q#O^?A50CY bzZ{N)f8B74T+^%8F5@+UX}vNCS~V!$OpY>G literal 0 HcmV?d00001 diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem new file mode 100644 index 00000000000000..6c4c6ed8fa1805 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIIRhGcS4/FkEWZhcGUZqsEsOm/+ykn35zm/rR4JrHc44oAoGCCqGSM49 +AwEHoUQDQgAEfdAIMEN/+9cHCThJMYS0vFZGT32BAM3vM/iSmTm+vI1TNpXXH0wN +qb8cjoR/3XCLXNOr1i7jNYFpvTIIWjUo3Q== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der index 7d63f00c9bcfa480b6624c9304cdffeee1be57f2..1a2b0e85953ccc03e4f7aa5f096e367ea1e9d080 100644 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1Ry2&z*5wXYKQJk&UM=JW7c5#0XA68FjYPwxLcySz5}2N1_&yK zNX|V20SBQ(13~}0U+1_&yK zNX|V20SBQ(13~}<;{hJtpHW(~>AI68{_;DP&2d~h>Nw7U9*F#H=d3U$Bm1WYi#`d{ b{#2V0%wG;!Y);$GK6|1kAGpw(^dX)-&PX)- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem index 48fe09ad29812d..2a870d125cd900 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIAZZ8hZ3GOkPEiO670Qo8bDOxHK1X7sH6ofXOYmc9zFqoAoGCCqGSM49 -AwEHoUQDQgAE4wEe3p9RWrPpupMl/vI7ls1xXDrqOM6BHoj8beesMCYj+6cGiz4J -0/5UmxHMXw5ZbE7bzj57oicfuNCa9CGePQ== +MHcCAQEEICX4wFLUjmqH7k3OddrzY9Zg+QE2WM0wVT4huFuiur4DoAoGCCqGSM49 +AwEHoUQDQgAEQa52t3zeq4BcRXfSV7aeqeYkTyixwXmP0D3sVNwOhKULkp7dKb4x +04ZxJe8VZp69kxHvZlx0IThoxK2crgRUyQ== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der index 1ece300335a5fe455a5ab9cc6c3805be3d67b412..66fd52a1409ef8c720a4205b02a822ffc4340147 100644 GIT binary patch delta 194 zcmV;z06qWL1lI%?FoFV8FoFU3paTK{0s;svjVwj3Xj4Uz7tTO$y)hH>Z*?R43q?1(~rNGve`aZb`@iLlJyPaL-mrVMo#qh<%FpRDm#^HC9 zB>^uKs5Hy${clG@2IYN_eoXYOKYjd9lV|~}L?Hn1Rbe{I5zBVpbi?6tu4BufFSBeO w1uGaN>Vsy+6cyS6AOR(>KXh+mk0$GF{>e!G`Zd+k=>%i(^NQB*klVKAgHDxPEdT%j delta 194 zcmV;z06qWL1lI%?FoFV8FoFU3paTK{0s;sfZf#IOh5!eV7tTOKDEqi^LX0)yB(r~> zfMf$-vdnV$@o^YaM#CWCsD-uU2?<{8g^uK_Dp;6sJ7s`5RSd;PvQ1=e90^+lV|~}L?A;$VsuqSxDe|zJy|V3MuI$3^er{s&2zxSXD1_&yK zNX|V20SBQ(13~}R2t*(QqeneSr*i)y-+5qtsZiDX6v8|1_&yK zNX|V20SBQ(13~}bx&~J8eY=<^}8HmoI8P?bIB`e1-3>-Cd diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem index d868b79ee31833..c39f44e59c369a 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEINFUmafW3jhThp3mpGxLUtE7c1kW1Kq9UCaqrR5yeWbroAoGCCqGSM49 -AwEHoUQDQgAEQyj7uHFCjDXiJLN/noBkA1+yzHL48XEYU0bDIOGohbXkCQle7IVf -fVKvl6HQb3ZxbIc2fhmIzqEZ1tf0JSvHLw== +MHcCAQEEIKEE7TjXp337hySJtfM1UeZefmg2BDNOe26ap+SLlL/3oAoGCCqGSM49 +AwEHoUQDQgAEb70xE/FOALVUGuUmOkfhaxl3dekSFKQg9Nl67Wukk1UcpcDWlfo+ +uQjxMppUu51d5ZdM+qjF8MXEMIyuGsbhdw== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der index 2ad2f7c7190a4dec4d7f1a22d134ac6d24ce157d..2315cfa58c79bfe7653be7bbba0b5096ae3fb312 100644 GIT binary patch delta 256 zcmV+b0ssDq1giuWFoFUnFoFThpaTK{0s;tc*Z&LEq?kXE7k4pSF)lDH1_M%gFfcG6Lqt#@S8{J|XCP2=WoBu3kv}bw%Nju5%o5<-JsUZo z|Hfv8{Te;m^w4zRvuabQy(}EF?fv+BaXiG1av61rxpCiLSsuvEPQG*cPv3B&2T8(& zlG#6#B>^uKSV2DI?X53Frp*Scz-*&PUgp8^lV|~0N=X1PMgk!KwJ()ZMx6mTo36SK zg{>*9iJp%X8XYZc_tXDZTm`u+0wDm`)!JT*>ox>iH4^wXJ+q*!j2#qwExSLJSjqK^ G<$!^zjcUvQ delta 219 zcmV<103`pb1c?L}FoFUFFoFTApaTK{0s;td1_-L5*R5@l7k3alF%2*a1_M;`SQ6H_#;e* z;-fqD=UH~(PHNCSg$vPSIrGnxMgcDr2QVD(i=IR#(&TQ&`a09ML>=$FlZgRXNk{-N zMFJrJ=D3I+?GC1Jg1}&YM)t~t1Tm}Nk=7SofebjI diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem index c53dbb8fbd6498..8cecc4118bc767 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem @@ -1,13 +1,14 @@ -----BEGIN CERTIFICATE----- -MIICBTCCAaugAwIBAgIIcAYIqqHXrW0wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICJzCCAcygAwIBAgIIb9f/C9WkmD8wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB -gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDsx -DTALBgNVBAMMBExvbmcxFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGC -onwCAgwEODAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPzNyCm6Yjd8xsez -bqfBr3bNFcMovEtujQd4ull/u/MK5xK2V9L58rkV+CNMh+KjO/XnWXbgTmrQPYUL -0WQ588+jgYswgYgwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O -BBYEFAcwHO+LnkQm0uRuxvo607dEHe+9MB8GA1UdIwQYMBaAFK9CtwlN69UV7G7P -M7gRFSJfMlKIMCgGA1UdHwQhMB8wHaAboBmGF3d3dy5leGFtcGxlLmNvbS9jcmwu -cGVtMAoGCCqGSM49BAMCA0gAMEUCIQDmuIge7Q6mcILAYH5G9sqEBDGr4JHWF12B -DDih5PBFdwIgOQZfvvn9pBs3r8ux9t8JDhpEO6xuZSw72sED9NOsTnY= +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFwx +LjAsBgNVBAMMJU1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBXcm9uZyBQcmVmaXgx +FDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAwMDBZMBMG +ByqGSM49AgEGCCqGSM49AwEHA0IABN7MEuDcPRs5oP/GZoX9Gj3a9NB04LNqU6i9 +LByz7f34e3E8xI5yGXWJuXHfX1keyM1OvnP6T99wogdJwoSS2T+jgYswgYgwDAYD +VR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFFhBPuTtrS9Eps0G +q8Bso0he5sHxMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKIMCgGA1Ud +HwQhMB8wHaAboBmGF3d3dy5leGFtcGxlLmNvbS9jcmwucGVtMAoGCCqGSM49BAMC +A0kAMEYCIQC1L5VTRp0BOJuuug+FrSmsiZ6PFBodLWz30/9XXAW5KwIhANfV2l6L +6zYEWzUS+DY9s6CsjB0UfC27P5VYyfWL5YCB -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der index ab268e2e51f69e06e65019182f0e583d09a0dfcf..938339c0443c9ec9b26958de64a74b3554f4e7b7 100644 GIT binary patch literal 121 zcmV-<0EYiCcLD(c1R%@HXVQDS&c1XP!{x5N5VOV-08R*n?ml2W;@r2M&dQ()1_&yK zNX|V20SBQ(13~}<-pmr<+&vpPp#R2Zh5Z^m+Vs$L;InE|sJ$#4v+e!(dvQF(j&d1w biMes#Us)c=%}%~^`cL0*q6bOBgp%1mEPgtl literal 121 zcmV-<0EYiCcLD(c1R$jy&HUL_+lM4IY=;sWki8QaQ+TJTjB)gEM53nK>)W6T1_&yK zNX|V20SBQ(13~}<{LRQIx?(qc#>ca6r@^mw%@xBayi0D42Y9+!f4lPv=MuJ8()sea b75F1ehvK6<_2*f3;7)4LJ%tO=WI6NCdHOjc diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem index f9c33a94072281..930bf855c472d0 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIKUdzfzZVduHJDVshxIakL0TGFN4p6mMcfRwRKKm2+vboAoGCCqGSM49 -AwEHoUQDQgAE/M3IKbpiN3zGx7Nup8Gvds0Vwyi8S26NB3i6WX+78wrnErZX0vny -uRX4I0yH4qM79edZduBOatA9hQvRZDnzzw== +MHcCAQEEIMvLZ9J7u86+dBfD5a6+ELPGEgBOCIXuPmA94ty3ns7KoAoGCCqGSM49 +AwEHoUQDQgAE3swS4Nw9Gzmg/8Zmhf0aPdr00HTgs2pTqL0sHLPt/fh7cTzEjnIZ +dYm5cd9fWR7IzU6+c/pP33CiB0nChJLZPw== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-000A-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-000A-Key.der deleted file mode 100644 index 287b7d0e23a2ce7848613466f5b8ad5db823dce3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 121 zcmV-<0EYiCcLD(c1Rw>*!>CQh1BWS*c31_&yK zNX|V20SBQ(13~}#c$6F-3Qb^#M7kCE|O bp!fKBG6_%SpSLJzs2(Pln>LFxwNx(certificate.size())); VerifyOrExit(x509certificate != nullptr, err = CHIP_ERROR_NO_MEMORY); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1) @@ -2052,6 +2052,79 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return err; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + int result = 1; + X509 * x509certificate = nullptr; + const unsigned char * pCertificate = certificate.data(); + const unsigned char ** ppCertificate = &pCertificate; + STACK_OF(DIST_POINT) * crldp = nullptr; + DIST_POINT * dp = nullptr; + GENERAL_NAMES * gens = nullptr; + GENERAL_NAME * gen = nullptr; + X509_NAME * dirName = nullptr; + const uint8_t * pDirName = nullptr; + size_t dirNameLen = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + x509certificate = d2i_X509(nullptr, ppCertificate, static_cast(certificate.size())); + VerifyOrExit(x509certificate != nullptr, err = CHIP_ERROR_NO_MEMORY); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1) + crldp = + reinterpret_cast(X509_get_ext_d2i(x509certificate, NID_crl_distribution_points, nullptr, nullptr)); + VerifyOrExit(crldp != nullptr, err = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(sk_DIST_POINT_num(crldp) == 1, err = CHIP_ERROR_NOT_FOUND); + + dp = sk_DIST_POINT_value(crldp, 0); + VerifyOrExit(dp != nullptr, err = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + // + // the cRLIssuer is encoded as a GeneralNames, where: + // GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName + // This implementation only supports a single GeneralName element in the cRLIssuer sequence: + gens = dp->CRLissuer; + VerifyOrExit(sk_GENERAL_NAME_num(gens) == 1, err = CHIP_ERROR_NOT_FOUND); + + // In this implementation the cRLIssuer is expected to be encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + gen = sk_GENERAL_NAME_value(gens, 0); + VerifyOrExit(gen->type == GEN_DIRNAME, err = CHIP_ERROR_NOT_FOUND); + + dirName = reinterpret_cast(GENERAL_NAME_get0_value(gen, nullptr)); + VerifyOrExit(dirName != nullptr, err = CHIP_ERROR_NOT_FOUND); + + // Extract directoryName as a raw DER Encoded data + result = X509_NAME_get0_der(dirName, &pDirName, &dirNameLen); + VerifyOrExit(result == 1, err = CHIP_ERROR_INTERNAL); + err = CopySpanToMutableSpan(ByteSpan(pDirName, dirNameLen), crlIssuer); + +exit: + sk_DIST_POINT_pop_free(crldp, DIST_POINT_free); + X509_free(x509certificate); + + return err; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -2112,10 +2185,7 @@ CHIP_ERROR ExtractRawDNFromX509Cert(bool extractSubject, const ByteSpan & certif result = X509_NAME_get0_der(distinguishedName, &pDistinguishedName, &distinguishedNameLen); VerifyOrExit(result == 1, err = CHIP_ERROR_INTERNAL); - VerifyOrExit(distinguishedNameLen <= dn.size(), err = CHIP_ERROR_BUFFER_TOO_SMALL); - - memcpy(dn.data(), pDistinguishedName, distinguishedNameLen); - dn.reduce_size(distinguishedNameLen); + err = CopySpanToMutableSpan(ByteSpan(pDistinguishedName, distinguishedNameLen), dn); exit: X509_free(x509certificate); diff --git a/src/crypto/CHIPCryptoPALPSA.cpp b/src/crypto/CHIPCryptoPALPSA.cpp index d1afbf1dbb05e3..5f21030eb69a72 100644 --- a/src/crypto/CHIPCryptoPALPSA.cpp +++ b/src/crypto/CHIPCryptoPALPSA.cpp @@ -1734,7 +1734,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1765,6 +1765,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1780,6 +1782,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1807,6 +1812,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + logMbedTLSError(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/crypto/CHIPCryptoPALmbedTLS.cpp b/src/crypto/CHIPCryptoPALmbedTLS.cpp index 195bd56cf745a2..c903d984f57e08 100644 --- a/src/crypto/CHIPCryptoPALmbedTLS.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLS.cpp @@ -1826,7 +1826,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1857,6 +1857,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1872,6 +1874,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1899,6 +1904,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp index 9eb01b6723dabb..bcf858d8b53e10 100644 --- a/src/crypto/tests/CHIPCryptoPALTest.cpp +++ b/src/crypto/tests/CHIPCryptoPALTest.cpp @@ -2122,21 +2122,32 @@ static void TestCDPExtension_x509Extraction(nlTestSuite * inSuite, void * inCont constexpr const char * exampleHttpURI = "http://example.com/crl.pem"; constexpr const char * exampleHttpsURI = "https://example.com/crl.pem"; + CharSpan httpSpan = CharSpan::fromCharString(exampleHttpURI); + CharSpan httpsSpan = CharSpan::fromCharString(exampleHttpsURI); // clang-format off static CDPTestCase sCDPTestCases[] = { - // Cert Expected Error Expected Output - // =============================================================================================== - { ByteSpan(), CHIP_ERROR_INVALID_ARGUMENT, CharSpan() }, - { sTestCert_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_PAI_FFF2_8001_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF2_8003_0019_FB_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_Cert, CHIP_NO_ERROR, CharSpan::fromCharString(exampleHttpURI) }, - { sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert, CHIP_NO_ERROR, CharSpan::fromCharString(exampleHttpsURI) }, - { sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert, CHIP_ERROR_BUFFER_TOO_SMALL, CharSpan() }, + // Cert Expected Error Expected Output + // ============================================================================================================== + { ByteSpan(), CHIP_ERROR_INVALID_ARGUMENT, CharSpan() }, + { sTestCert_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_PAI_FFF2_8001_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF2_8003_0019_FB_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Cert, CHIP_NO_ERROR, httpSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert, CHIP_ERROR_BUFFER_TOO_SMALL, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert, CHIP_ERROR_BUFFER_TOO_SMALL, CharSpan() }, }; // clang-format on @@ -2146,7 +2157,7 @@ static void TestCDPExtension_x509Extraction(nlTestSuite * inSuite, void * inCont MutableCharSpan cdp(cdpBuf); err = ExtractCRLDistributionPointURIFromX509Cert(testCase.Cert, cdp); NL_TEST_ASSERT(inSuite, err == testCase.mExpectedError); - if (err == CHIP_NO_ERROR) + if (testCase.mExpectedError == CHIP_NO_ERROR) { NL_TEST_ASSERT(inSuite, cdp.size() == testCase.mExpectedResult.size()); NL_TEST_ASSERT(inSuite, cdp.data_equal(testCase.mExpectedResult)); @@ -2154,6 +2165,65 @@ static void TestCDPExtension_x509Extraction(nlTestSuite * inSuite, void * inCont } } +static void TestCDPCRLIssuerExtension_x509Extraction(nlTestSuite * inSuite, void * inContext) +{ + using namespace TestCerts; + + HeapChecker heapChecker(inSuite); + CHIP_ERROR err = CHIP_NO_ERROR; + + struct CDPTestCase + { + ByteSpan Cert; + CHIP_ERROR mExpectedError; + ByteSpan mCRLIssuerCert; + }; + + // clang-format off + static CDPTestCase sCDPTestCases[] = { + // Cert Expected Error Expected CRL Issuer Cert + // ======================================================================================================================= + { ByteSpan(), CHIP_ERROR_INVALID_ARGUMENT, ByteSpan() }, + { sTestCert_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_PAI_FFF2_8001_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF2_8003_0019_FB_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert, CHIP_NO_ERROR, sTestCert_PAA_FFF1_Cert }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert, CHIP_NO_ERROR, sTestCert_PAA_NoVID_Cert }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert, CHIP_NO_ERROR, sTestCert_PAI_FFF2_8004_FB_Cert }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert, CHIP_NO_ERROR, sTestCert_PAI_FFF2_8004_FB_Cert }, + }; + // clang-format on + + for (auto & testCase : sCDPTestCases) + { + uint8_t crlIssuerBuf[kMaxCertificateDistinguishedNameLength] = { 0 }; + MutableByteSpan crlIssuer(crlIssuerBuf); + err = ExtractCDPExtensionCRLIssuerFromX509Cert(testCase.Cert, crlIssuer); + NL_TEST_ASSERT(inSuite, err == testCase.mExpectedError); + if (testCase.mExpectedError == CHIP_NO_ERROR) + { + uint8_t crlIssuerSubjectBuf[kMaxCertificateDistinguishedNameLength] = { 0 }; + MutableByteSpan crlIssuerSubject(crlIssuerSubjectBuf); + + err = ExtractSubjectFromX509Cert(testCase.mCRLIssuerCert, crlIssuerSubject); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, crlIssuer.data_equal(crlIssuerSubject)); + } + } +} + static void TestSerialNumber_x509Extraction(nlTestSuite * inSuite, void * inContext) { using namespace TestCerts; @@ -2752,6 +2822,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test Subject Key Id Extraction from x509 Certificate", TestSKID_x509Extraction), NL_TEST_DEF("Test Authority Key Id Extraction from x509 Certificate", TestAKID_x509Extraction), NL_TEST_DEF("Test CRL Distribution Point Extension Extraction from x509 Certificate", TestCDPExtension_x509Extraction), + NL_TEST_DEF("Test CDP Extension CRL Issuer Extraction from x509 Certificate", TestCDPCRLIssuerExtension_x509Extraction), NL_TEST_DEF("Test Serial Number Extraction from x509 Certificate", TestSerialNumber_x509Extraction), NL_TEST_DEF("Test Subject Extraction from x509 Certificate", TestSubject_x509Extraction), NL_TEST_DEF("Test Issuer Extraction from x509 Certificate", TestIssuer_x509Extraction), diff --git a/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp b/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp index 96973dcf12046d..e53d793f2ee770 100644 --- a/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp +++ b/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp @@ -1662,7 +1662,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1693,6 +1693,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1708,6 +1710,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1735,6 +1740,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp b/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp index b7d49c4fdb2e66..378cbb7e408914 100644 --- a/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp +++ b/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp @@ -1631,7 +1631,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1662,6 +1662,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1677,6 +1679,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1704,6 +1709,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp index 1bcfbdc59edaa5..15e8abf27ea76d 100644 --- a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp +++ b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp @@ -1662,7 +1662,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1693,6 +1693,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1708,6 +1710,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1735,6 +1740,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp index e0b5906c1a816b..9948017c4d3f94 100644 --- a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp +++ b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp @@ -2023,7 +2023,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -2054,6 +2054,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -2069,6 +2071,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -2096,6 +2101,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/tools/chip-cert/CertUtils.cpp b/src/tools/chip-cert/CertUtils.cpp index 3fcf474e9abba8..db880f75f3c5dc 100644 --- a/src/tools/chip-cert/CertUtils.cpp +++ b/src/tools/chip-cert/CertUtils.cpp @@ -1284,8 +1284,7 @@ bool ResignCert(X509 * cert, X509 * caCert, EVP_PKEY * caKey) bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subjectVID, uint16_t subjectPID, bool encodeVIDandPIDasCN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, uint32_t validDays, - X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, const FutureExtensionWithNID * exts, - uint8_t extsCount) + X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, X509_EXTENSION * cdpExt) { bool res = true; uint16_t vid = certConfig.IsSubjectVIDMismatch() ? static_cast(subjectVID + 1) : subjectVID; @@ -1469,9 +1468,16 @@ bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subje VerifyTrueOrExit(res); } - for (uint8_t i = 0; i < extsCount; i++) + if (cdpExt != nullptr) { - res = AddExtension(newCert, exts[i].nid, exts[i].info); + int result = X509_add_ext(newCert, cdpExt, -1); + VerifyTrueOrExit(result == 1); + } + + if (certConfig.IsExtensionCDPPresent()) + { + // Add second CDP extension. + res = AddExtension(newCert, NID_crl_distribution_points, "URI:http://example.com/test_crl.pem"); VerifyTrueOrExit(res); } diff --git a/src/tools/chip-cert/Cmd_GenAttCert.cpp b/src/tools/chip-cert/Cmd_GenAttCert.cpp index 7f57e1df20542d..3c30991dc9e8dc 100644 --- a/src/tools/chip-cert/Cmd_GenAttCert.cpp +++ b/src/tools/chip-cert/Cmd_GenAttCert.cpp @@ -31,6 +31,8 @@ #include +#include + namespace { using namespace chip; @@ -45,22 +47,23 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char // clang-format off OptionDef gCmdOptionDefs[] = { - { "type", kArgumentRequired, 't' }, - { "subject-cn", kArgumentRequired, 'c' }, - { "subject-vid", kArgumentRequired, 'V' }, - { "subject-pid", kArgumentRequired, 'P' }, - { "vid-pid-as-cn", kNoArgument, 'a' }, - { "key", kArgumentRequired, 'k' }, - { "ca-cert", kArgumentRequired, 'C' }, - { "ca-key", kArgumentRequired, 'K' }, - { "out", kArgumentRequired, 'o' }, - { "out-key", kArgumentRequired, 'O' }, - { "valid-from", kArgumentRequired, 'f' }, - { "lifetime", kArgumentRequired, 'l' }, - { "cpd-ext", kArgumentRequired, 'x' }, -#if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES - { "ignore-error", kNoArgument, 'I' }, - { "error-type", kArgumentRequired, 'E' }, + { "type", kArgumentRequired, 't' }, + { "subject-cn", kArgumentRequired, 'c' }, + { "subject-vid", kArgumentRequired, 'V' }, + { "subject-pid", kArgumentRequired, 'P' }, + { "vid-pid-as-cn", kNoArgument, 'a' }, + { "key", kArgumentRequired, 'k' }, + { "ca-cert", kArgumentRequired, 'C' }, + { "ca-key", kArgumentRequired, 'K' }, + { "out", kArgumentRequired, 'o' }, + { "out-key", kArgumentRequired, 'O' }, + { "valid-from", kArgumentRequired, 'f' }, + { "lifetime", kArgumentRequired, 'l' }, + { "cdp-uri", kArgumentRequired, 'x' }, + { "crl-issuer-cert", kArgumentRequired, 'L' }, + #if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES + { "ignore-error", kNoArgument, 'I' }, + { "error-type", kArgumentRequired, 'E' }, #endif { } }; @@ -126,11 +129,17 @@ const char * const gCmdOptionHelp = " 4294967295 to indicate that certificate doesn't have well defined\n" " expiration date\n" "\n" - " -x, --cpd-ext \n" + " -x, --cdp-uri \n" "\n" " CRL Distribution Points (CDP) extension (NID_crl_distribution_points) extension to be added to the list\n" " of certificate extensions.\n" "\n" + " -L, --crl-issuer-cert \n" + "\n" + " File or string containing the CRL Issuer certificate (in an X.509 PEM format).\n" + " The Subject name will be extracted from this certificate to be included in the\n" + " cRLIssuer field of the CRL Distribution Point (CDP) extension.\n" + "\n" #if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES " -I, --ignore-error\n" "\n" @@ -180,6 +189,10 @@ const char * const gCmdOptionHelp = " ext-extended-key-usage - Certificate will include optional Extended Key Usage extension.\n" " ext-authority-info-access - Certificate will include optional Authority Information Access extension.\n" " ext-subject-alt-name - Certificate will include optional Subject Alternative Name extension.\n" + " ext-cdp-uri-duplicate - Certificate will include additional URI Field in the CDP extension.\n" + " ext-cdp-crl-issuer-duplicate - Certificate will include additional CRL Issuer Field in the CDP extension.\n" + " ext-cdp-dist-point-duplicate - Certificate will include additional CRL Distribution Point Field in the CDP extension.\n" + " ext-cdp-add - Certificate will include additional CDP extension.\n" "\n" #endif // CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES ; @@ -207,19 +220,19 @@ OptionSet *gCmdOptionSets[] = }; // clang-format on -AttCertType gAttCertType = kAttCertType_NotSpecified; -const char * gSubjectCN = nullptr; -uint16_t gSubjectVID = VendorId::NotSpecified; -uint16_t gSubjectPID = 0; -bool gEncodeVIDandPIDasCN = false; -const char * gCACertFileNameOrStr = nullptr; -const char * gCAKeyFileNameOrStr = nullptr; -const char * gInKeyFileNameOrStr = nullptr; -const char * gOutCertFileName = nullptr; -const char * gOutKeyFileName = nullptr; -uint32_t gValidDays = kCertValidDays_Undefined; -FutureExtensionWithNID gCPDExtensions[3] = { { 0, nullptr } }; -uint8_t gCPDExtensionsCount = 0; +AttCertType gAttCertType = kAttCertType_NotSpecified; +const char * gSubjectCN = nullptr; +uint16_t gSubjectVID = VendorId::NotSpecified; +uint16_t gSubjectPID = 0; +bool gEncodeVIDandPIDasCN = false; +const char * gCACertFileNameOrStr = nullptr; +const char * gCAKeyFileNameOrStr = nullptr; +const char * gInKeyFileNameOrStr = nullptr; +const char * gOutCertFileName = nullptr; +const char * gOutKeyFileName = nullptr; +uint32_t gValidDays = kCertValidDays_Undefined; +const char * gCDPURI = nullptr; +const char * gCRLIssuerCertFileName = nullptr; struct tm gValidFrom; CertStructConfig gCertConfig; @@ -300,9 +313,10 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char } break; case 'x': - gCPDExtensions[gCPDExtensionsCount].nid = NID_crl_distribution_points; - gCPDExtensions[gCPDExtensionsCount].info = arg; - gCPDExtensionsCount++; + gCDPURI = arg; + break; + case 'L': + gCRLIssuerCertFileName = arg; break; #if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES case 'I': @@ -409,6 +423,22 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char { gCertConfig.SetExtensionSubjectAltNamePresent(); } + else if (strcmp(arg, "ext-cdp-uri-duplicate") == 0) + { + gCertConfig.SetExtensionCDPURIDuplicate(); + } + else if (strcmp(arg, "ext-cdp-crl-issuer-duplicate") == 0) + { + gCertConfig.SetExtensionCDPCRLIssuerDuplicate(); + } + else if (strcmp(arg, "ext-cdp-dist-point-duplicate") == 0) + { + gCertConfig.SetExtensionCDPDistPointDuplicate(); + } + else if (strcmp(arg, "ext-cdp-add") == 0) + { + gCertConfig.SetExtensionCDPPresent(); + } else if (strcmp(arg, "no-error") != 0) { PrintArgError("%s: Invalid value specified for the error type: %s\n", progName, arg); @@ -432,6 +462,17 @@ bool Cmd_GenAttCert(int argc, char * argv[]) std::unique_ptr newCert(X509_new(), &X509_free); std::unique_ptr newKey(EVP_PKEY_new(), &EVP_PKEY_free); + // Declarations related to the CRL Distribution Points (CDP) Extention + std::unique_ptr cRLIssuerCert(nullptr, &X509_free); + std::unique_ptr cdpExtension(nullptr, &X509_EXTENSION_free); + STACK_OF(DIST_POINT) * distPoints = nullptr; + DIST_POINT * distPoint = nullptr; + ASN1_IA5STRING * uri = nullptr; + GENERAL_NAME * distPointName = nullptr; + GENERAL_NAME * crlIssuerName = nullptr; + + std::unique_ptr cdpExtension2(nullptr, &X509_EXTENSION_free); + { time_t now = time(nullptr); gValidFrom = *gmtime(&now); @@ -565,10 +606,82 @@ bool Cmd_GenAttCert(int argc, char * argv[]) } } + if (gCRLIssuerCertFileName != nullptr || gCDPURI != nullptr) + { + int result; + + // Create a DIST_POINT object + distPoint = DIST_POINT_new(); + VerifyOrReturnError(distPoint != nullptr, false); + + if (gCDPURI != nullptr) + { + // Set the distribution point name + distPoint->distpoint = DIST_POINT_NAME_new(); + VerifyOrReturnError(distPoint->distpoint != nullptr, false); + + distPoint->distpoint->type = 0; // fullName + distPoint->distpoint->name.fullname = GENERAL_NAMES_new(); + VerifyOrReturnError(distPoint->distpoint->name.fullname != nullptr, false); + + // Create and set URI string + uri = ASN1_IA5STRING_new(); + VerifyOrReturnError(uri != nullptr, false); + result = ASN1_STRING_set(uri, gCDPURI, -1); + VerifyOrReturnError(result != 0, false); + + // Set fullName as a URI + distPointName = GENERAL_NAME_new(); + VerifyOrReturnError(distPointName != nullptr, false); + distPointName->type = GEN_URI; + distPointName->d.uniformResourceIdentifier = uri; + sk_GENERAL_NAME_push(distPoint->distpoint->name.fullname, distPointName); + + if (gCertConfig.IsExtensionCDPURIDuplicate()) + { + // Add second instance of CDP URI - invalid configuration + sk_GENERAL_NAME_push(distPoint->distpoint->name.fullname, distPointName); + } + } + + if (gCRLIssuerCertFileName != nullptr) + { + // Extract Subject from the CRL Issuer Certificate + res = ReadCert(gCRLIssuerCertFileName, cRLIssuerCert); + VerifyTrueOrExit(res); + + crlIssuerName = GENERAL_NAME_new(); + VerifyOrReturnError(crlIssuerName != nullptr, false); + crlIssuerName->type = GEN_DIRNAME; + crlIssuerName->d.directoryName = X509_get_subject_name(cRLIssuerCert.get()); + distPoint->CRLissuer = GENERAL_NAMES_new(); + sk_GENERAL_NAME_push(distPoint->CRLissuer, crlIssuerName); + + if (gCertConfig.IsExtensionCDPCRLIssuerDuplicate()) + { + // Add second instance of CDP CRL Issuer - invalid configuration + sk_GENERAL_NAME_push(distPoint->CRLissuer, crlIssuerName); + } + } + + // Push single DIST_POINT into array of CRL Distribution Points + distPoints = sk_DIST_POINT_new_null(); + sk_DIST_POINT_push(distPoints, distPoint); + + if (gCertConfig.IsExtensionCDPDistPointDuplicate()) + { + // Add second instance of CDP URI - invalid configuration + sk_DIST_POINT_push(distPoints, distPoint); + } + + cdpExtension.reset(X509V3_EXT_i2d(NID_crl_distribution_points, 0, distPoints)); + VerifyOrReturnError(cdpExtension.get() != nullptr, false); + } + if (gAttCertType == kAttCertType_PAA) { res = MakeAttCert(gAttCertType, gSubjectCN, gSubjectVID, gSubjectPID, gEncodeVIDandPIDasCN, newCert.get(), newKey.get(), - gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, gCPDExtensions, gCPDExtensionsCount); + gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, cdpExtension.get()); VerifyTrueOrExit(res); } else @@ -583,7 +696,7 @@ bool Cmd_GenAttCert(int argc, char * argv[]) VerifyTrueOrExit(res); res = MakeAttCert(gAttCertType, gSubjectCN, gSubjectVID, gSubjectPID, gEncodeVIDandPIDasCN, caCert.get(), caKey.get(), - gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, gCPDExtensions, gCPDExtensionsCount); + gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, cdpExtension.get()); VerifyTrueOrExit(res); } diff --git a/src/tools/chip-cert/chip-cert.h b/src/tools/chip-cert/chip-cert.h index 2f203193e38e44..82d4d8e4c8190b 100644 --- a/src/tools/chip-cert/chip-cert.h +++ b/src/tools/chip-cert/chip-cert.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021-2022 Project CHIP Authors + * Copyright (c) 2021-2023 Project CHIP Authors * Copyright (c) 2013-2017 Nest Labs, Inc. * All rights reserved. * @@ -185,6 +185,10 @@ class CertStructConfig void SetExtensionExtendedKeyUsagePresent() { mFlags.Set(CertErrorFlags::kExtExtendedKeyUsage); } void SetExtensionAuthorityInfoAccessPresent() { mFlags.Set(CertErrorFlags::kExtAuthorityInfoAccess); } void SetExtensionSubjectAltNamePresent() { mFlags.Set(CertErrorFlags::kExtSubjectAltName); } + void SetExtensionCDPPresent() { mFlags.Set(CertErrorFlags::kExtCRLDistributionPoints); } + void SetExtensionCDPURIDuplicate() { mFlags.Set(CertErrorFlags::kExtCDPURIDuplicate); } + void SetExtensionCDPCRLIssuerDuplicate() { mFlags.Set(CertErrorFlags::kExtCDPCRLIssuerDuplicate); } + void SetExtensionCDPDistPointDuplicate() { mFlags.Set(CertErrorFlags::kExtCDPDistPointDuplicate); } void SetSignatureError() { mFlags.Set(CertErrorFlags::kSignature); } void SetCertOversized() { mFlags.Set(CertErrorFlags::kCertOversized); } @@ -314,6 +318,10 @@ class CertStructConfig bool IsExtensionExtendedKeyUsagePresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtExtendedKeyUsage)); } bool IsExtensionAuthorityInfoAccessPresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtAuthorityInfoAccess)); } bool IsExtensionSubjectAltNamePresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtSubjectAltName)); } + bool IsExtensionCDPPresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCRLDistributionPoints)); } + bool IsExtensionCDPURIDuplicate() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCDPURIDuplicate)); } + bool IsExtensionCDPCRLIssuerDuplicate() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCDPCRLIssuerDuplicate)); } + bool IsExtensionCDPDistPointDuplicate() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCDPDistPointDuplicate)); } bool IsSignatureError() { return (mEnabled && mFlags.Has(CertErrorFlags::kSignature)); } bool IsCertOversized() { return (mEnabled && mFlags.Has(CertErrorFlags::kCertOversized)); } @@ -368,26 +376,30 @@ class CertStructConfig kExtExtendedKeyUsage = 0x0000000002000000, // DA specific kExtAuthorityInfoAccess = 0x0000000004000000, // DA specific kExtSubjectAltName = 0x0000000008000000, // DA specific - kSignature = 0x0000000010000000, + kExtCRLDistributionPoints = 0x0000000010000000, // DA specific + kExtCDPURIDuplicate = 0x0000000020000000, // DA specific + kExtCDPCRLIssuerDuplicate = 0x0000000040000000, // DA specific + kExtCDPDistPointDuplicate = 0x0000000080000000, // DA specific + kSignature = 0x0000000100000000, // Op Cert Specific Flags: - kCertOversized = 0x0000000100000000, - kSerialNumberMissing = 0x0000000200000000, - kIssuerMissing = 0x0000000400000000, - kValidityNotBeforeMissing = 0x0000000800000000, - kValidityNotAfterMissing = 0x0000001000000000, - kValidityWrong = 0x0000002000000000, - kSubjectMissing = 0x0000004000000000, - kSubjectMatterIdMissing = 0x0000008000000000, - kSubjectNodeIdInvalid = 0x0000010000000000, - kSubjectMatterIdTwice = 0x0000020000000000, - kSubjectFabricIdMissing = 0x0000040000000000, - kSubjectFabricIdInvalid = 0x0000080000000000, - kSubjectFabricIdTwice = 0x0000100000000000, - kSubjectFabricIdMismatch = 0x0000200000000000, - kSubjectCATInvalid = 0x0000400000000000, - kSubjectCATTwice = 0x0000800000000000, - kExtExtendedKeyUsageMissing = 0x0001000000000000, + kCertOversized = 0x0000001000000000, + kSerialNumberMissing = 0x0000002000000000, + kIssuerMissing = 0x0000004000000000, + kValidityNotBeforeMissing = 0x0000008000000000, + kValidityNotAfterMissing = 0x0000010000000000, + kValidityWrong = 0x0000020000000000, + kSubjectMissing = 0x0000040000000000, + kSubjectMatterIdMissing = 0x0000080000000000, + kSubjectNodeIdInvalid = 0x0000100000000000, + kSubjectMatterIdTwice = 0x0000200000000000, + kSubjectFabricIdMissing = 0x0000400000000000, + kSubjectFabricIdInvalid = 0x0000800000000000, + kSubjectFabricIdTwice = 0x0001000000000000, + kSubjectFabricIdMismatch = 0x0002000000000000, + kSubjectCATInvalid = 0x0004000000000000, + kSubjectCATTwice = 0x0008000000000000, + kExtExtendedKeyUsageMissing = 0x0010000000000000, }; static constexpr uint32_t kExtraBufferLengthForOvesizedCert = 300; @@ -437,8 +449,7 @@ extern bool ResignCert(X509 * cert, X509 * caCert, EVP_PKEY * caKey); extern bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subjectVID, uint16_t subjectPID, bool encodeVIDandPIDasCN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, uint32_t validDays, - X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, const FutureExtensionWithNID * exts, - uint8_t extsCount); + X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, X509_EXTENSION * cdpExt); extern bool GenerateKeyPair(EVP_PKEY * key); extern bool GenerateKeyPair_Secp256k1(EVP_PKEY * key); extern bool ReadKey(const char * fileNameOrStr, std::unique_ptr & key, From a406232999bb321ee93d91efcf9b0b60f5c97a4f Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Fri, 28 Jul 2023 18:19:58 +0200 Subject: [PATCH 075/159] [chip-tool] Add read-none/subscribe-none commands (#28327) * [chip-tool] Add read-none/subscribe-none commands * Update __init__.py --- .../commands/clusters/ModelCommand.h | 23 ++++---- .../commands/clusters/ReportCommand.h | 52 +++++++++++++++++++ .../matter_chip_tool_adapter/encoder.py | 16 ++++++ examples/chip-tool/templates/commands.zapt | 2 + scripts/tests/chiptest/__init__.py | 1 + .../suites/TestReadNoneSubscribeNone.yaml | 40 ++++++++++++++ .../interaction_model/InteractionModel.cpp | 34 ++++++++++++ .../interaction_model/InteractionModel.h | 9 ++++ .../zap-generated/cluster/Commands.h | 2 + 9 files changed, 169 insertions(+), 10 deletions(-) create mode 100644 src/app/tests/suites/TestReadNoneSubscribeNone.yaml diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index 5c612365b2ee24..0b6339ab60f5ed 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -33,21 +33,24 @@ class ModelCommand : public CHIPCommand mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this), mSupportsMultipleEndpoints(supportsMultipleEndpoints) {} - void AddArguments() + void AddArguments(bool skipEndpoints = false) { AddArgument( "destination-id", 0, UINT64_MAX, &mDestinationId, "64-bit node or group identifier.\n Group identifiers are detected by being in the 0xFFFF'FFFF'FFFF'xxxx range."); - if (mSupportsMultipleEndpoints) + if (skipEndpoints == false) { - AddArgument("endpoint-ids", 0, UINT16_MAX, &mEndPointId, - "Comma-separated list of endpoint ids (e.g. \"1\" or \"1,2,3\").\n Allowed to be 0xFFFF to indicate a " - "wildcard endpoint."); - } - else - { - AddArgument("endpoint-id-ignored-for-group-commands", 0, UINT16_MAX, &mEndPointId, - "Endpoint the command is targeted at."); + if (mSupportsMultipleEndpoints) + { + AddArgument("endpoint-ids", 0, UINT16_MAX, &mEndPointId, + "Comma-separated list of endpoint ids (e.g. \"1\" or \"1,2,3\").\n Allowed to be 0xFFFF to indicate a " + "wildcard endpoint."); + } + else + { + AddArgument("endpoint-id-ignored-for-group-commands", 0, UINT16_MAX, &mEndPointId, + "Endpoint the command is targeted at."); + } } AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } diff --git a/examples/chip-tool/commands/clusters/ReportCommand.h b/examples/chip-tool/commands/clusters/ReportCommand.h index e90fb5ddf28f14..eefd938c2d0717 100644 --- a/examples/chip-tool/commands/clusters/ReportCommand.h +++ b/examples/chip-tool/commands/clusters/ReportCommand.h @@ -415,6 +415,33 @@ class SubscribeEvent : public SubscribeCommand std::vector mEventIds; }; +class ReadNone : public ReadCommand +{ +public: + ReadNone(CredentialIssuerCommands * credsIssuerConfig) : ReadCommand("read-none", credsIssuerConfig) + { + AddArgument("fabric-filtered", 0, 1, &mFabricFiltered, + "Boolean indicating whether to do a fabric-filtered read. Defaults to true."); + AddArgument("data-versions", 0, UINT32_MAX, &mDataVersions, + "Comma-separated list of data versions for the clusters being read."); + AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); + ReadCommand::AddArguments(true /* skipEndpoints */); + } + + ~ReadNone() {} + + void OnDone(chip::app::ReadClient * aReadClient) override + { + InteractionModelReports::CleanupReadClient(aReadClient); + SetCommandExitStatus(mError); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + return ReadCommand::ReadNone(device); + } +}; + class ReadAll : public ReadCommand { public: @@ -456,6 +483,31 @@ class ReadAll : public ReadCommand std::vector mEventIds; }; +class SubscribeNone : public SubscribeCommand +{ +public: + SubscribeNone(CredentialIssuerCommands * credsIssuerConfig) : SubscribeCommand("subscribe-none", credsIssuerConfig) + { + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval, + "The requested minimum interval between reports. Sets MinIntervalFloor in the Subscribe Request."); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval, + "The requested maximum interval between reports. Sets MaxIntervalCeiling in the Subscribe Request."); + AddArgument("fabric-filtered", 0, 1, &mFabricFiltered, + "Boolean indicating whether to do a fabric-filtered read. Defaults to true."); + AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); + AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions, + "false - Terminate existing subscriptions from initiator.\n true - Leave existing subscriptions in place."); + SubscribeCommand::AddArguments(true /* skipEndpoints */); + } + + ~SubscribeNone() {} + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + return SubscribeCommand::SubscribeNone(device); + } +}; + class SubscribeAll : public SubscribeCommand { public: 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 2c02811f865845..e57bfe29b6af76 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 @@ -22,7 +22,9 @@ 'SubscribeById', 'ReadEventById', 'SubscribeEventById', + 'ReadNone', 'ReadAll', + 'SubscribeNone', 'SubscribeAll', ] @@ -79,6 +81,9 @@ 'EventId': 'event-id', }, }, + 'ReadNone': { + 'alias': 'read-none', + }, 'ReadAll': { 'alias': 'read-all', 'arguments': { @@ -87,6 +92,9 @@ 'EventId': 'event-ids', }, }, + 'SubscribeNone': { + 'alias': 'subscribe-none', + }, 'SubscribeAll': { 'alias': 'subscribe-all', 'arguments': { @@ -99,6 +107,14 @@ }, 'AnyCommands': { 'alias': 'any', + 'commands': { + 'ReadNone': { + 'has_endpoint': False, + }, + 'SubscribeNone': { + 'has_endpoint': False, + } + } }, 'CommissionerCommands': { 'alias': 'pairing', diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 60d327821b05d5..224ea8e5f8c2eb 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -132,7 +132,9 @@ void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIss make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // }; diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 2b761d95684baf..4e5390495bdac5 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -138,6 +138,7 @@ def _GetInDevelopmentTests() -> Set[str]: "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestCommandsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestEventsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) + "TestReadNoneSubscribeNone.yaml", # chip-repl does not support AnyCommands (07/27/2023) "Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855 "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters diff --git a/src/app/tests/suites/TestReadNoneSubscribeNone.yaml b/src/app/tests/suites/TestReadNoneSubscribeNone.yaml new file mode 100644 index 00000000000000..928dde69aecb8d --- /dev/null +++ b/src/app/tests/suites/TestReadNoneSubscribeNone.yaml @@ -0,0 +1,40 @@ +# 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. + +name: ReadNone/SuscribeNone Tests + +config: + nodeId: 0x12344321 + cluster: "Unit Testing" + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read Request Message with no paths." + cluster: "AnyCommands" + command: "ReadNone" + + - label: "Subscribe Request Message with no paths." + cluster: "AnyCommands" + command: "SubscribeNone" + minInterval: 1 + maxInterval: 2 + response: + error: INVALID_ACTION diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index c6c68441a127d4..a2c418435990e4 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -503,6 +503,40 @@ void InteractionModelReports::CleanupReadClient(ReadClient * aReadClient) mReadClients.end()); } +CHIP_ERROR InteractionModelReports::ReportNone(chip::DeviceProxy * device, chip::app::ReadClient::InteractionType interactionType) +{ + AttributePathParams attributePathParams[kMaxAllowedPaths]; + EventPathParams eventPathParams[kMaxAllowedPaths]; + + ReadPrepareParams params(device->GetSecureSession().Value()); + params.mpEventPathParamsList = eventPathParams; + params.mEventPathParamsListSize = 0; + params.mEventNumber = mEventNumber; + params.mpAttributePathParamsList = attributePathParams; + params.mAttributePathParamsListSize = 0; + + if (mFabricFiltered.HasValue()) + { + params.mIsFabricFiltered = mFabricFiltered.Value(); + } + + if (interactionType == ReadClient::InteractionType::Subscribe) + { + params.mMinIntervalFloorSeconds = mMinInterval; + params.mMaxIntervalCeilingSeconds = mMaxInterval; + if (mKeepSubscriptions.HasValue()) + { + params.mKeepSubscriptions = mKeepSubscriptions.Value(); + } + } + + auto client = std::make_unique(InteractionModelEngine::GetInstance(), device->GetExchangeManager(), + mBufferedReadAdapter, interactionType); + ReturnErrorOnFailure(client->SendRequest(params)); + mReadClients.push_back(std::move(client)); + return CHIP_NO_ERROR; +} + CHIP_ERROR InteractionModelReports::ReportAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds, diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index f033349fb26249..c52ff744fac791 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -90,6 +90,8 @@ class InteractionModelReports std::vector clusterIds, std::vector eventIds, chip::app::ReadClient::InteractionType interactionType); + CHIP_ERROR ReadNone(chip::DeviceProxy * device) { return ReportNone(device, chip::app::ReadClient::InteractionType::Read); } + CHIP_ERROR ReadAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds) @@ -97,6 +99,11 @@ class InteractionModelReports return ReportAll(device, endpointIds, clusterIds, attributeIds, eventIds, chip::app::ReadClient::InteractionType::Read); } + CHIP_ERROR SubscribeNone(chip::DeviceProxy * device) + { + return ReportNone(device, chip::app::ReadClient::InteractionType::Subscribe); + } + CHIP_ERROR SubscribeAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds) @@ -105,6 +112,8 @@ class InteractionModelReports chip::app::ReadClient::InteractionType::Subscribe); } + CHIP_ERROR ReportNone(chip::DeviceProxy * device, chip::app::ReadClient::InteractionType interactionType); + CHIP_ERROR ReportAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds, chip::app::ReadClient::InteractionType interactionType); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index e92d7f7c750d82..cc148609f900ff 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -19841,7 +19841,9 @@ void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIss make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // }; From 2f32d3b29c6ce27cfd49733850637fc1e481e820 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 28 Jul 2023 13:02:38 -0400 Subject: [PATCH 076/159] Fix array vs vector conversion in chef (#28369) Co-authored-by: Andrei Litvin --- examples/chef/common/chef-channel-manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/chef/common/chef-channel-manager.cpp b/examples/chef/common/chef-channel-manager.cpp index 58a07edd730958..6077fd3d20b6f0 100644 --- a/examples/chef/common/chef-channel-manager.cpp +++ b/examples/chef/common/chef-channel-manager.cpp @@ -134,9 +134,9 @@ void ChefChannelManager::HandleChangeChannel(CommandResponseHelper 1) + if (totalMatchedChannels > 1) { response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kMultipleMatches; helper.Success(response); } - else if (matchedChannels.size() == 0) + else if (totalMatchedChannels == 0) { // Error: Found no match response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kNoMatches; From 7baabb7abb343f7a8e44a73219105a84c5bf998a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 28 Jul 2023 13:47:45 -0400 Subject: [PATCH 077/159] Disable EventList attribute in yaml tests and code (#28299) * Add pics to all EventList reads * Update AttributeList validation based on event list enabled pics * Define the pics * zap regen * Restyle * Update ci-pics-values * Enable PICS event list to pass CI. Separate PR to disable the pics and fix our example apps * Mark PICS EVENT LIST attribute disabled * Mass-disable eventlist server-side attribute in zap * Zap regen: shows eventlist attribute gone at least from .matter files * Disable eventlist attribute from build config * Fix test constants ... but this does not exactly explain the content :( * Adjust comment * zap regen * Add more comments regarding chunking...this logic is odd though * Update src/app/tests/TestReadInteraction.cpp Co-authored-by: Boris Zbarsky * Update src/app/tests/TestReadInteraction.cpp Co-authored-by: Boris Zbarsky * Update src/app/tests/TestReadInteraction.cpp Co-authored-by: Boris Zbarsky * Update src/app/tests/TestReadInteraction.cpp Co-authored-by: Boris Zbarsky * Update src/app/tests/TestReadInteraction.cpp Co-authored-by: Boris Zbarsky * Restyled by whitespace --------- Co-authored-by: Andrei Litvin Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io --- .../all-clusters-app.matter | 25 --- .../all-clusters-common/all-clusters-app.zap | 54 ++--- .../all-clusters-minimal-app.matter | 1 - .../all-clusters-minimal-app.zap | 2 +- ...de_colortemperaturelight_hbUnzYVeyn.matter | 6 - ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 14 +- .../devices/rootnode_pump_a811bb33a0.matter | 16 -- .../chef/devices/rootnode_pump_a811bb33a0.zap | 34 ++-- examples/chef/devices/template.zap | 22 +- .../dishwasher-common/dishwasher-app.matter | 4 - .../dishwasher-common/dishwasher-app.zap | 18 +- .../light-switch-app.matter | 1 - .../light-switch-common/light-switch-app.zap | 2 +- .../data_model/lighting-app-thread.zap | 2 +- .../data_model/lighting-app-wifi.zap | 2 +- .../lighting-common/lighting-app.matter | 1 - .../lighting-common/lighting-app.zap | 4 +- examples/lighting-app/qpg/zap/light.matter | 23 --- examples/lighting-app/qpg/zap/light.zap | 50 ++--- .../data_model/lighting-thread-app.matter | 3 - .../silabs/data_model/lighting-thread-app.zap | 8 +- .../data_model/lighting-wifi-app.matter | 2 - .../silabs/data_model/lighting-wifi-app.zap | 6 +- examples/lock-app/qpg/zap/lock.matter | 21 -- examples/lock-app/qpg/zap/lock.zap | 44 ++-- .../placeholder/linux/apps/app1/config.matter | 7 - .../placeholder/linux/apps/app1/config.zap | 14 +- .../placeholder/linux/apps/app2/config.matter | 7 - .../placeholder/linux/apps/app2/config.zap | 14 +- .../resource-monitoring-app.matter | 6 - .../resource-monitoring-app.zap | 32 +-- .../smoke-co-alarm-app.matter | 1 - .../smoke-co-alarm-app.zap | 2 +- .../tv-casting-common/tv-casting-app.matter | 2 - .../tv-casting-common/tv-casting-app.zap | 36 ++-- src/app/BUILD.gn | 2 +- src/app/tests/TestReadInteraction.cpp | 51 ++++- .../tests/suites/certification/ci-pics-values | 2 +- .../data_model/controller-clusters.zap | 188 +++++++++--------- 39 files changed, 320 insertions(+), 409 deletions(-) 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 32c8d1fe1b3c0a..c22343aef01b93 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 @@ -6360,7 +6360,6 @@ endpoint 0 { ram attribute supportsDNSResolve default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0B; ram attribute clusterRevision default = 2; @@ -6415,7 +6414,6 @@ endpoint 0 { callback attribute clientsSupportedPerFabric default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -6596,7 +6594,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6609,7 +6606,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6622,7 +6618,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6635,7 +6630,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6646,7 +6640,6 @@ endpoint 1 { callback attribute supportedTemperatureLevels; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -6659,7 +6652,6 @@ endpoint 1 { ram attribute supported default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6672,7 +6664,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6682,7 +6673,6 @@ endpoint 1 { ram attribute airQuality default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 15; ram attribute clusterRevision default = 1; @@ -6725,7 +6715,6 @@ endpoint 1 { ram attribute supported default = 15; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -6742,7 +6731,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6759,7 +6747,6 @@ endpoint 1 { callback attribute operationalError default = 0; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; - callback attribute eventList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6774,7 +6761,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -6789,7 +6775,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -7095,7 +7080,6 @@ endpoint 1 { ram attribute levelValue default = 3; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7115,7 +7099,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7135,7 +7118,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7155,7 +7137,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7175,7 +7156,6 @@ endpoint 1 { ram attribute levelValue default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7195,7 +7175,6 @@ endpoint 1 { ram attribute levelValue default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7215,7 +7194,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7235,7 +7213,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7255,7 +7232,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7275,7 +7251,6 @@ endpoint 1 { ram attribute levelValue default = 3; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 365337854727ed..8dd918c4cfcbbd 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -5798,7 +5798,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6937,7 +6937,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13747,7 +13747,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13901,7 +13901,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14142,7 +14142,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -14374,7 +14374,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -14606,7 +14606,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14838,7 +14838,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15070,7 +15070,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -15234,7 +15234,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15909,7 +15909,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16206,7 +16206,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16494,7 +16494,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16764,7 +16764,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17018,7 +17018,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22470,7 +22470,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22794,7 +22794,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23118,7 +23118,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23442,7 +23442,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23766,7 +23766,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24090,7 +24090,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24414,7 +24414,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24738,7 +24738,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25062,7 +25062,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25386,7 +25386,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25710,7 +25710,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -33378,4 +33378,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 92932cfd83c333..5bc8ec3ab4475a 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -4311,7 +4311,6 @@ endpoint 1 { callback attribute supportedTemperatureLevels; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index a878ee8613a494..1d03d27c0e24e0 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -12739,7 +12739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index fe08e80ffffc39..01e315b2a165f5 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1688,7 +1688,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1698,7 +1697,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1712,7 +1710,6 @@ endpoint 1 { ram attribute startUpOnOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -1726,7 +1723,6 @@ endpoint 1 { ram attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -1739,7 +1735,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1778,7 +1773,6 @@ endpoint 1 { ram attribute startUpColorTemperatureMireds; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0010; ram attribute clusterRevision default = 5; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index e6acf1565b0276..5cfbf082e43abd 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -5537,7 +5537,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5785,7 +5785,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6169,7 +6169,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6447,7 +6447,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6885,7 +6885,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7097,7 +7097,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8231,7 +8231,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 81a95b1aa42e46..81c38d03d7d445 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -1021,7 +1021,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 2; @@ -1035,7 +1034,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1056,7 +1054,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -1067,7 +1064,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1077,7 +1073,6 @@ endpoint 0 { persist attribute hourFormat default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1086,7 +1081,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1100,7 +1094,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1117,7 +1110,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1129,7 +1121,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1141,7 +1132,6 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1156,7 +1146,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1169,7 +1158,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1183,7 +1171,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1193,7 +1180,6 @@ endpoint 1 { ram attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -1206,7 +1192,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -1222,7 +1207,6 @@ endpoint 1 { ram attribute operationMode default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index f83aac1598fd68..3306819f09d72d 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -972,7 +972,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1184,7 +1184,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1652,7 +1652,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 1, "bounded": 0, @@ -2084,7 +2084,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2246,7 +2246,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2376,7 +2376,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2640,7 +2640,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2976,7 +2976,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3152,7 +3152,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3438,7 +3438,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5462,7 +5462,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5790,7 +5790,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6020,7 +6020,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6358,7 +6358,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6728,7 +6728,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6940,7 +6940,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7456,7 +7456,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index e32c5499af3b2c..4112ca37d54124 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -5537,7 +5537,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -5785,7 +5785,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6169,7 +6169,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6423,7 +6423,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6861,7 +6861,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -7073,7 +7073,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -7237,7 +7237,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -8037,7 +8037,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -8363,7 +8363,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -9457,7 +9457,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -9669,7 +9669,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 6994217884c894..51446e3cdc8f96 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -1312,7 +1312,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1331,7 +1330,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1341,7 +1339,6 @@ endpoint 1 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1358,7 +1355,6 @@ endpoint 1 { callback attribute operationalError default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index a332a0fc94299a..bcf0f6675a4cad 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -3110,7 +3110,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6369,7 +6369,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7713,7 +7713,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7877,7 +7877,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8503,7 +8503,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8757,7 +8757,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8979,7 +8979,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9191,7 +9191,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9479,7 +9479,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 61eda622d41fb6..55bf0e75db0511 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2532,7 +2532,6 @@ endpoint 0 { ram attribute supportsDNSResolve default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0B; ram attribute clusterRevision default = 1; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index c93571c2996316..21e9efcf621d77 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -4958,7 +4958,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 852948f8da1431..55e2476e6c87ad 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -8343,4 +8343,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index 90bd7a21ea76f9..f5c6ce65b0d768 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -8343,4 +8343,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 5899f6e6658f79..cc83b244b78f10 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2428,7 +2428,6 @@ endpoint 1 { callback attribute remainingCapacity; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 59133c8e15269e..c3bb8210d8447e 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -5350,7 +5350,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7759,4 +7759,4 @@ "deviceIdentifier": 257 } ] -} +} \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 09c2343a8aae9c..c568ff0c5d7ee0 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1747,7 +1747,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1763,7 +1762,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1794,7 +1792,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1810,7 +1807,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1824,7 +1820,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1841,7 +1836,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1850,7 +1844,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1872,7 +1865,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1885,7 +1877,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark default = 0x0000000000000000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1954,7 +1945,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 1; @@ -1966,7 +1956,6 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1981,7 +1970,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1994,7 +1982,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2004,7 +1991,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2014,7 +2000,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2028,7 +2013,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2038,7 +2022,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2052,7 +2035,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; @@ -2071,7 +2053,6 @@ endpoint 1 { persist attribute startUpCurrentLevel default = 255; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 5; @@ -2084,7 +2065,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -2094,7 +2074,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2104,7 +2083,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2152,7 +2130,6 @@ endpoint 1 { ram attribute startUpColorTemperatureMireds; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x1F; ram attribute clusterRevision default = 5; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 1b658aeaf1cffc..856776883b1037 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -972,7 +972,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1184,7 +1184,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1652,7 +1652,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 1, "bounded": 0, @@ -2025,7 +2025,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2558,7 +2558,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2894,7 +2894,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3018,7 +3018,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3304,7 +3304,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3540,7 +3540,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4690,7 +4690,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5509,7 +5509,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5837,7 +5837,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6067,7 +6067,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6197,7 +6197,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6327,7 +6327,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6533,7 +6533,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6781,7 +6781,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7157,7 +7157,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7435,7 +7435,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7873,7 +7873,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8085,7 +8085,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8249,7 +8249,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8785,7 +8785,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8949,7 +8949,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10083,7 +10083,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 4a96f5b54e78a4..1f9f2105f81af7 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2469,7 +2469,6 @@ endpoint 0 { callback attribute clientsSupportedPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2502,7 +2501,6 @@ endpoint 1 { callback attribute remainingCapacity default = 8; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -2561,7 +2559,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index d29ae36af304de..233178fe4f6ced 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -2146,7 +2146,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5701,7 +5701,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6411,7 +6411,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7807,7 +7807,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 77979c8eee896e..1bc4ca085ac095 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2279,7 +2279,6 @@ endpoint 1 { callback attribute remainingCapacity; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; @@ -2337,7 +2336,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 82c4b264bcc764..b300942fd346eb 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -2172,7 +2172,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6133,7 +6133,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7901,7 +7901,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index c07134be9d7262..cb7ce687d9a89b 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1781,7 +1781,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1797,7 +1796,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1828,7 +1826,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1844,7 +1841,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1858,7 +1854,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1875,7 +1870,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1884,7 +1878,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1906,7 +1899,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1919,7 +1911,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark default = 0x0000000000000000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1988,7 +1979,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 1; @@ -2000,7 +1990,6 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2015,7 +2004,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2028,7 +2016,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2038,7 +2025,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2048,7 +2034,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2062,7 +2047,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2072,7 +2056,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2085,7 +2068,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -2095,7 +2077,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2105,7 +2086,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2134,7 +2114,6 @@ endpoint 1 { ram attribute requirePINforRemoteOperation default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x181; ram attribute clusterRevision default = 6; diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 3884fdd557478c..56923296c6210a 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -738,7 +738,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -932,7 +932,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1400,7 +1400,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 1, "bounded": 0, @@ -1773,7 +1773,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2495,7 +2495,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2831,7 +2831,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2955,7 +2955,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3241,7 +3241,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3477,7 +3477,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4627,7 +4627,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5364,7 +5364,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5692,7 +5692,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5922,7 +5922,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6052,7 +6052,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6182,7 +6182,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6472,7 +6472,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6704,7 +6704,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7398,7 +7398,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8112,7 +8112,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8276,7 +8276,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9180,7 +9180,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9401,4 +9401,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index d9380b5ace2a41..1b3474c8da9562 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6478,7 +6478,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7100,7 +7099,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7110,7 +7108,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7124,7 +7121,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7138,7 +7134,6 @@ endpoint 1 { ram attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 5; @@ -7161,7 +7156,6 @@ endpoint 1 { ram attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7174,7 +7168,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 6b478ee3bb461c..3ad0e22790dde0 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -338,7 +338,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10884,7 +10884,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11132,7 +11132,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11484,7 +11484,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11762,7 +11762,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12200,7 +12200,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12412,7 +12412,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index abf76c3a9de16d..0eff28c93b1e8b 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6437,7 +6437,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7076,7 +7075,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7086,7 +7084,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7100,7 +7097,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7114,7 +7110,6 @@ endpoint 1 { ram attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 5; @@ -7135,7 +7130,6 @@ endpoint 1 { ram attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7148,7 +7142,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 060de8d5a9ae17..40723d94cd9583 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -338,7 +338,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11168,7 +11168,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11416,7 +11416,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11768,7 +11768,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12046,7 +12046,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12484,7 +12484,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12696,7 +12696,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index facd6595b3943e..51dadb42c36cbe 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -1960,7 +1960,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1970,7 +1969,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1983,7 +1981,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1998,7 +1995,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2013,7 +2009,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2026,7 +2021,6 @@ endpoint 1 { ram attribute percentCurrent default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap index fc6b03ba7dcd40..6a841dec856d2a 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -5581,7 +5581,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5829,7 +5829,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6041,7 +6041,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6295,7 +6295,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6549,7 +6549,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6787,7 +6787,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7025,7 +7025,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7263,7 +7263,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7501,7 +7501,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7739,7 +7739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7977,7 +7977,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8215,7 +8215,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8453,7 +8453,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8691,7 +8691,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8929,7 +8929,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9253,7 +9253,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index fd4e3ef135a2ca..1956af2af19e1c 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1965,7 +1965,6 @@ endpoint 0 { callback attribute clientsSupportedPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 8a4bba62e7b8ab..6cc1ffff0a93fa 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -5482,7 +5482,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 2fa6d8631192ed..3c03e7fb70df31 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2236,7 +2236,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -2246,7 +2245,6 @@ endpoint 1 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index eff8d93dd239ef..1a5e07badae611 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -2453,7 +2453,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3982,7 +3982,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7793,7 +7793,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8231,7 +8231,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8559,7 +8559,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8723,7 +8723,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12953,7 +12953,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13175,7 +13175,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13375,7 +13375,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13735,7 +13735,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13949,7 +13949,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14107,7 +14107,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14275,7 +14275,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14473,7 +14473,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14671,7 +14671,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14887,7 +14887,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15163,7 +15163,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15347,7 +15347,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 83ffe632da7684..c8d20b58aff129 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -42,7 +42,7 @@ declare_args() { # By default, the resources used by each fabric is unlimited if they are allocated on heap. This flag is for checking the resource usage even when they are allocated on heap to increase code coverage in integration tests. chip_im_force_fabric_quota_check = false - enable_eventlist_attribute = true + enable_eventlist_attribute = false } buildconfig_header("app_buildconfig") { diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index f886d6ead65bd8..a818ee3d23e3a4 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -1938,15 +1938,52 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap NL_TEST_ASSERT(apSuite, delegate.mGotReport); - // We have 29 attributes in our mock attribute storage. And we subscribed twice. - // And attribute 3/2/4 is a list with 6 elements and list chunking is - // applied to it, but the way the packet boundaries fall we get two of - // its items as a single list, followed by 4 more single items for one - // of our subscriptions, and 3 as a single list followed by 3 single - // items for the other. +#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE + // Mock attribute storage in src/app/util/mock/attribute-storage.cpp + // has the following items + // - Endpoint 0xFFFE + // - cluster 0xFFF1'FC01 (2 attributes) + // - cluster 0xFFF1'FC02 (3 attributes) + // - Endpoint 0xFFFD + // - cluster 0xFFF1'FC01 (2 attributes) + // - cluster 0xFFF1'FC02 (4 attributes) + // - cluster 0xFFF1'FC03 (5 attributes) + // - Endpoint 0xFFFC + // - cluster 0xFFF1'FC01 (3 attributes) + // - cluster 0xFFF1'FC02 (6 attributes) + // - cluster 0xFFF1'FC03 (2 attributes) + // - cluster 0xFFF1'FC04 (2 attributes) + // + // For at total of 29 attributes. There are two wildcard subscription + // paths, for a total of 58 attributes. + // + // Attribute 0xFFFC::0xFFF1'FC02::0xFFF1'0004 (kMockEndpoint3::MockClusterId(2)::MockAttributeId(4)) + // is a list of 6 elements of size 256 bytes each, which cannot fit in a single + // packet, so gets list chunking applied to it. + // + // Because delegate.mNumAttributeResponse counts AttributeDataIB instances, not attributes, + // the count will depend on exactly how the list for attribute + // 0xFFFC::0xFFF1'FC02::0xFFF1'0004 is chunked. For each of the two instances of that attribute + // in the response, there will be one AttributeDataIB for the start of the list (which will include + // some number of 256-byte elements), then one AttributeDataIB for each of the remaining elements. + // + // When EventList is enabled, for the first report for the list attribute we receive two + // of its items in the initial list, then 4 additional items. For the second report we + // receive 3 items in the initial list followed by 3 additional items. // // Thus we should receive 29*2 + 4 + 3 = 65 attribute data in total. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 65); + constexpr size_t kExpectedAttributeResponse = 65; +#else + // When EventList is not enabled, the packet boundaries shift and for the first + // report for the list attribute we receive two of its items in the initial list, + // then 4 additional items. For the second report we receive 0 items in + // the initial list followed by 6 additional items. + // + // Thus we should receive 29*2 + 4 + 6 = 68 attribute data when the eventlist + // attribute is not available. + constexpr size_t kExpectedAttributeResponse = 68; +#endif + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == kExpectedAttributeResponse); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 426f1a65956d06..4267b90a2388dc 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -58,7 +58,7 @@ DGSW.C.C00.Tx=1 PICS_USER_PROMPT=0 PICS_SKIP_SAMPLE_APP=0 PICS_SDK_CI_ONLY=1 -PICS_EVENT_LIST_ENABLED=1 +PICS_EVENT_LIST_ENABLED=0 # WindowCovering aka WNCV WNCV.S=1 diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 637f8d4e6bd5d6..7975fdcdb1b180 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -160,7 +160,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -392,7 +392,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -744,7 +744,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1006,7 +1006,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1170,7 +1170,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1608,7 +1608,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1884,7 +1884,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2080,7 +2080,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2228,7 +2228,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2440,7 +2440,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2718,7 +2718,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3186,7 +3186,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3378,7 +3378,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3600,7 +3600,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3746,7 +3746,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3908,7 +3908,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4038,7 +4038,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4186,7 +4186,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4814,7 +4814,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5094,7 +5094,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5446,7 +5446,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5580,7 +5580,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5866,7 +5866,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6088,7 +6088,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7254,7 +7254,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7620,7 +7620,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7922,7 +7922,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8330,7 +8330,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8739,7 +8739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8919,7 +8919,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9125,7 +9125,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9453,7 +9453,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9701,7 +9701,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9849,7 +9849,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9979,7 +9979,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10127,7 +10127,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10407,7 +10407,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10661,7 +10661,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10893,7 +10893,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11125,7 +11125,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11337,7 +11337,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11569,7 +11569,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11801,7 +11801,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12055,7 +12055,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12235,7 +12235,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12467,7 +12467,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12631,7 +12631,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12981,7 +12981,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13187,7 +13187,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13431,7 +13431,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13719,7 +13719,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13947,7 +13947,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14159,7 +14159,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15079,7 +15079,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15621,7 +15621,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15931,7 +15931,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16447,7 +16447,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17407,7 +17407,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17697,7 +17697,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17877,7 +17877,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -18995,7 +18995,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -19367,7 +19367,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -19579,7 +19579,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -19775,7 +19775,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20051,7 +20051,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20247,7 +20247,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20443,7 +20443,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20767,7 +20767,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -21091,7 +21091,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -21415,7 +21415,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -21739,7 +21739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22063,7 +22063,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22387,7 +22387,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22711,7 +22711,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23035,7 +23035,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23359,7 +23359,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23683,7 +23683,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24007,7 +24007,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24171,7 +24171,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24387,7 +24387,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24587,7 +24587,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24947,7 +24947,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25161,7 +25161,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25319,7 +25319,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25487,7 +25487,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25695,7 +25695,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25893,7 +25893,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26109,7 +26109,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26385,7 +26385,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26569,7 +26569,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26877,7 +26877,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -27109,7 +27109,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -28765,7 +28765,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -28923,7 +28923,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, From 0be73c87a4c90fc9bdf3a08136b74d819355d71c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 28 Jul 2023 17:39:25 -0400 Subject: [PATCH 078/159] Remove unused storage member from MTROperationalCredentialsDelegate. (#28378) --- src/darwin/Framework/CHIP/MTRDeviceController.mm | 4 ++-- .../Framework/CHIP/MTROperationalCredentialsDelegate.h | 5 +---- .../Framework/CHIP/MTROperationalCredentialsDelegate.mm | 8 +++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 59a4c338fc4af6..8b34769b09ecea 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -268,8 +268,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } signingKeypair = &_signingKeypairBridge; } - errorCode = _operationalCredentialsDelegate->Init(_factory.storageDelegateBridge, signingKeypair, startupParams.ipk, - startupParams.rootCertificate, startupParams.intermediateCertificate); + errorCode = _operationalCredentialsDelegate->Init( + signingKeypair, startupParams.ipk, startupParams.rootCertificate, startupParams.intermediateCertificate); if ([self checkForStartError:errorCode logMsg:kErrorOperationalCredentialsInit]) { return; } diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h index b3dfd2419186f4..63499f024bb277 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h @@ -41,8 +41,7 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr MTROperationalCredentialsDelegate(MTRDeviceController * deviceController); ~MTROperationalCredentialsDelegate() {} - CHIP_ERROR Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, - NSData * _Nullable icaCert); + CHIP_ERROR Init(ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert); CHIP_ERROR GenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, @@ -137,8 +136,6 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr chip::Crypto::IdentityProtectionKey mIPK; - MTRPersistentStorageDelegateBridge * mStorage; - chip::NodeId mDeviceBeingPaired = chip::kUndefinedNodeId; chip::NodeId mNextRequestedNodeId = 1; diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 887fd20dba9e1f..7e5282eca51a52 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -48,15 +48,13 @@ { } -CHIP_ERROR MTROperationalCredentialsDelegate::Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, - NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert) +CHIP_ERROR MTROperationalCredentialsDelegate::Init( + ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert) { - if (storage == nil || ipk == nil || rootCert == nil) { + if (ipk == nil || rootCert == nil) { return CHIP_ERROR_INVALID_ARGUMENT; } - mStorage = storage; - mIssuerKey = nocSigner; if ([ipk length] != mIPK.Length()) { From 0d0415bc66d48f4c7730ea0f569aa5877fa55605 Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Fri, 28 Jul 2023 17:09:04 -0700 Subject: [PATCH 079/159] Add more test cases to the OTA provider test (#27874) * Add more test cases to the OTA provider test - Add a test to update and verify the default OTA provider - Add a test for BDX transfer between the provider and two OTA requestors - Add a test for incremental OTA update * Restyled by whitespace * Restyled by clang-format * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Review comments * Add check for discriminator 1113 to MTRCommissionableBrowserTests.m * Restyled by clang-format * Fix kExpectedDiscoveredDevicesCount for MTRCommissionableBrowserTests and onboarding payload for ota requestor 3 for MTROTAProviderTests * Decommission device3 after OTA tests are done * Update src/darwin/Framework/CHIPTests/MTROTAProviderTests.m Co-authored-by: Boris Zbarsky * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Addressed review comments * Apply suggestions from code review Co-authored-by: Boris Zbarsky * more review comments --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- .github/workflows/darwin.yaml | 7 +- .../CHIPTests/MTRCommissionableBrowserTests.m | 10 +- .../Framework/CHIPTests/MTROTAProviderTests.m | 575 +++++++++++++++++- 3 files changed, 563 insertions(+), 29 deletions(-) diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 1db7aa8a082846..c30cc044f35b33 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -95,10 +95,12 @@ jobs: - name: Build example OTA Provider run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false - - name: Build OTA image files with software version number 5 + - name: Build OTA image files with software version number 5 and 10 run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=5 chip_device_config_device_software_version_string='"5.0"' - cp out/debug/chip-ota-requestor-app /tmp/ota-test005-raw-image + cp out/debug/chip-ota-requestor-app /tmp/ota-raw-image-v5 + scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=10 chip_device_config_device_software_version_string='"10.0"' + cp out/debug/chip-ota-requestor-app /tmp/ota-raw-image-v10 - name: Build example OTA Requestor run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 @@ -120,6 +122,7 @@ jobs: # And a different port from the test harness too; the test harness uses port 5541. ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5542 --discriminator 1111 --KVS /tmp/chip-ota-requestor-kvs1 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image1 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-1.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-1.log >&2) & ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5543 --discriminator 1112 --KVS /tmp/chip-ota-requestor-kvs2 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image2 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-2.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-2.log >&2) & + ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5544 --discriminator 1113 --KVS /tmp/chip-ota-requestor-kvs3 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image3 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-3.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-3.log >&2) & # Disable BLE because the app does not have the permission to use # it and that may crash the CI. # diff --git a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m index b2648b2956b3ee..c984ac670a8500 100644 --- a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m @@ -29,10 +29,11 @@ static const uint16_t kTestProductId2 = 0x8001u; static const uint16_t kTestDiscriminator1 = 1111u; static const uint16_t kTestDiscriminator2 = 1112u; -static const uint16_t kTestDiscriminator3 = 3840u; -static const uint16_t kTestDiscriminator4 = 3839u; +static const uint16_t kTestDiscriminator3 = 1113u; +static const uint16_t kTestDiscriminator4 = 3840u; +static const uint16_t kTestDiscriminator5 = 3839u; static const uint16_t kDiscoverDeviceTimeoutInSeconds = 10; -static const uint16_t kExpectedDiscoveredDevicesCount = 4; +static const uint16_t kExpectedDiscoveredDevicesCount = 5; // Singleton controller we use. static MTRDeviceController * sController = nil; @@ -77,7 +78,8 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice XCTAssertEqualObjects(vendorId, @(kTestVendorId)); XCTAssertTrue([productId isEqual:@(kTestProductId1)] || [productId isEqual:@(kTestProductId2)]); XCTAssertTrue([discriminator isEqual:@(kTestDiscriminator1)] || [discriminator isEqual:@(kTestDiscriminator2)] || - [discriminator isEqual:@(kTestDiscriminator3)] || [discriminator isEqual:@(kTestDiscriminator4)]); + [discriminator isEqual:@(kTestDiscriminator3)] || [discriminator isEqual:@(kTestDiscriminator4)] || + [discriminator isEqual:@(kTestDiscriminator5)]); XCTAssertEqual(commissioningMode, YES); NSLog(@"Found Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m index 22f7ff6d5571fe..472bd22d9919c7 100644 --- a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -32,11 +32,13 @@ #define ENABLE_OTA_TESTS 1 #endif -// TODO: Disable test005_DoBDXTransferAllowUpdateRequest until PR #26040 is merged. +// TODO: Disable test005_DoBDXTransferAllowUpdateRequest, +// test006_DoBDXTransferWithTwoOTARequesters and +// test007_DoBDXTransferIncrementalOtaUpdate until PR #26040 is merged. // Currently the poll interval causes delays in the BDX transfer and // results in the test taking a long time. -#ifdef ENABLE_TEST_005 -#undef ENABLE_TEST_005 +#ifdef ENABLE_REAL_OTA_UPDATE_TESTS +#undef ENABLE_REAL_OTA_UPDATE_TESTS #endif static const uint16_t kPairingTimeoutInSeconds = 10; @@ -44,9 +46,11 @@ static const uint16_t kTimeoutWithUpdateInSeconds = 60; static const uint64_t kDeviceId1 = 0x12341234; static const uint64_t kDeviceId2 = 0x12341235; +static const uint64_t kDeviceId3 = 0x12341236; // NOTE: These onboarding payloads are for the chip-ota-requestor-app, not chip-all-clusters-app static NSString * kOnboardingPayload1 = @"MT:-24J0SO527K10648G00"; // Discriminator: 1111 static NSString * kOnboardingPayload2 = @"MT:-24J0AFN00L10648G00"; // Discriminator: 1112 +static NSString * kOnboardingPayload3 = @"MT:-24J0IRV01L10648G00"; // Discriminator: 1113 static const uint16_t kLocalPort = 5541; static const uint16_t kTestVendorId = 0xFFF1u; @@ -54,6 +58,7 @@ static MTRDevice * sConnectedDevice1; static MTRDevice * sConnectedDevice2; +static MTRDevice * sConnectedDevice3; // Singleton controller we use. static MTRDeviceController * sController = nil; @@ -63,9 +68,17 @@ static NSString * kOtaDownloadedFilePath1 = @"/tmp/chip-ota-requestor-downloaded-image1"; -static NSNumber * kUpdatedSoftwareVersion = @5; +static NSString * kOtaDownloadedFilePath2 = @"/tmp/chip-ota-requestor-downloaded-image2"; -static NSString * kUpdatedSoftwareVersionString = @"5.0"; +static NSString * kOtaDownloadedFilePath3 = @"/tmp/chip-ota-requestor-downloaded-image3"; + +static NSNumber * kUpdatedSoftwareVersion_5 = @5; + +static NSString * kUpdatedSoftwareVersionString_5 = @"5.0"; + +static NSNumber * kUpdatedSoftwareVersion_10 = @10; + +static NSString * kUpdatedSoftwareVersionString_10 = @"10.0"; @interface MTROTAProviderTestControllerDelegate : NSObject @property (nonatomic, readonly) XCTestExpectation * expectation; @@ -240,6 +253,8 @@ - (void)respondBusyWithDelay:(NSNumber *)delay completion:(QueryImageCompletion) - (void)respondAvailableWithDelay:(NSNumber *)delay uri:(NSString *)uri updateToken:(NSData *)updateToken + softwareVersion:(NSNumber *)softwareVersion + softwareVersionString:(NSString *)softwareVersionString completion:(QueryImageCompletion)completion { __auto_type * responseParams = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; @@ -248,8 +263,8 @@ - (void)respondAvailableWithDelay:(NSNumber *)delay responseParams.imageURI = uri; // TODO: Figure out whether we need better // SoftwareVersion/SoftwareVersionString/UpdateToken bits. - responseParams.softwareVersion = kUpdatedSoftwareVersion; - responseParams.softwareVersionString = kUpdatedSoftwareVersionString; + responseParams.softwareVersion = softwareVersion; + responseParams.softwareVersionString = softwareVersionString; responseParams.updateToken = updateToken; completion(responseParams, nil); } @@ -314,7 +329,10 @@ - (NSData *)generateUpdateToken @interface MTROTAProviderTransferChecker : NSObject - (instancetype)initWithRawImagePath:(NSString *)rawImagePath + otaImageDownloadFilePath:(NSString *)otaImageDownloadFilePath nodeID:(NSNumber *)nodeID + softwareVersion:(NSNumber *)softwareVersion + softwareVersionString:(NSString *)softwareVersionString applyUpdateAction:(MTROTASoftwareUpdateProviderOTAApplyUpdateAction)applyUpdateAction testcase:(XCTestCase *)testcase; @@ -329,7 +347,10 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath @implementation MTROTAProviderTransferChecker - (instancetype)initWithRawImagePath:(NSString *)rawImagePath + otaImageDownloadFilePath:(NSString *)otaImageDownloadFilePath nodeID:(NSNumber *)nodeID + softwareVersion:(NSNumber *)softwareVersion + softwareVersionString:(NSString *)softwareVersionString applyUpdateAction:(MTROTASoftwareUpdateProviderOTAApplyUpdateAction)applyUpdateAction testcase:(XCTestCase *)testcase { @@ -357,8 +378,8 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath NSTask * task = [[NSTask alloc] init]; [task setLaunchPath:imageToolPath]; [task setArguments:@[ - @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion stringValue], @"-vs", - kUpdatedSoftwareVersionString, @"-da", @"sha256", rawImagePath, imagePath + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [softwareVersion stringValue], @"-vs", softwareVersionString, @"-da", + @"sha256", rawImagePath, imagePath ]]; NSError * launchError = nil; [task launchAndReturnError:&launchError]; @@ -379,7 +400,12 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertEqual(controller, sController); sOTAProviderDelegate.queryImageHandler = nil; - [sOTAProviderDelegate respondAvailableWithDelay:@(0) uri:imagePath updateToken:updateToken completion:completion]; + [sOTAProviderDelegate respondAvailableWithDelay:@(0) + uri:imagePath + updateToken:updateToken + softwareVersion:softwareVersion + softwareVersionString:softwareVersionString + completion:completion]; [self.queryExpectation fulfill]; }; sOTAProviderDelegate.transferBeginHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSString * fileDesignator, @@ -448,9 +474,9 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertEqualObjects(nodeID, nodeID); XCTAssertEqual(controller, sController); XCTAssertEqualObjects(params.updateToken, updateToken); - XCTAssertEqualObjects(params.newVersion, kUpdatedSoftwareVersion); // TODO: Factor this out better! + XCTAssertEqualObjects(params.newVersion, softwareVersion); - XCTAssertTrue([[NSFileManager defaultManager] contentsEqualAtPath:rawImagePath andPath:kOtaDownloadedFilePath1]); + XCTAssertTrue([[NSFileManager defaultManager] contentsEqualAtPath:rawImagePath andPath:otaImageDownloadFilePath]); sOTAProviderDelegate.applyUpdateRequestHandler = nil; [sOTAProviderDelegate respondToApplyUpdateRequestWithAction:applyUpdateAction completion:completion]; @@ -463,7 +489,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertEqualObjects(nodeID, nodeID); XCTAssertEqual(controller, sController); XCTAssertEqualObjects(params.updateToken, updateToken); - XCTAssertEqualObjects(params.softwareVersion, kUpdatedSoftwareVersion); + XCTAssertEqualObjects(params.softwareVersion, softwareVersion); sOTAProviderDelegate.notifyUpdateAppliedHandler = nil; [sOTAProviderDelegate respondSuccess:completion]; @@ -585,6 +611,7 @@ - (void)initStack sConnectedDevice1 = [self commissionDeviceWithPayload:kOnboardingPayload1 nodeID:@(kDeviceId1)]; sConnectedDevice2 = [self commissionDeviceWithPayload:kOnboardingPayload2 nodeID:@(kDeviceId2)]; + sConnectedDevice3 = [self commissionDeviceWithPayload:kOnboardingPayload3 nodeID:@(kDeviceId3)]; } + (void)shutdownStack @@ -634,7 +661,7 @@ - (XCTestExpectation *)announceProviderToDevice:(MTRDevice *)device return responseExpectation; } -- (void)test001_ReceiveOTAQuery +- (void)test001_ReceiveQueryImageRequest_RespondUpdateNotAvailable { // Test that if we advertise ourselves as a provider we end up getting a // QueryImage callbacks that we can respond to. @@ -657,7 +684,7 @@ - (void)test001_ReceiveOTAQuery sOTAProviderDelegate.queryImageHandler = nil; } -- (void)test002_ReceiveTwoQueriesExplicitBusy +- (void)test002_ReceiveTwoQueryImageRequests_RespondExplicitBusy { // Test that if we advertise ourselves as a provider and respond BUSY to // QueryImage callback, then we get a second QueryImage callback later on @@ -696,7 +723,7 @@ - (void)test002_ReceiveTwoQueriesExplicitBusy [self waitForExpectations:@[ announceResponseExpectation ] timeout:kTimeoutInSeconds]; } -- (void)test003_ReceiveSecondQueryWhileHandlingBDX +- (void)test003_ReceiveQueryImageRequestWhileHandlingBDX_RespondImplicitBusy { // In this test we do the following: // @@ -726,6 +753,8 @@ - (void)test003_ReceiveSecondQueryWhileHandlingBDX [sOTAProviderDelegate respondAvailableWithDelay:@(0) uri:fakeImageURI updateToken:[sOTAProviderDelegate generateUpdateToken] + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 completion:completion]; [queryExpectation1 fulfill]; }; @@ -751,6 +780,8 @@ - (void)test003_ReceiveSecondQueryWhileHandlingBDX [sOTAProviderDelegate respondAvailableWithDelay:@(busyDelay) uri:fakeImageURI updateToken:[sOTAProviderDelegate generateUpdateToken] + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 completion:innerCompletion]; [sOTAProviderDelegate respondErrorWithCompletion:outerCompletion]; [queryExpectation2 fulfill]; @@ -809,7 +840,10 @@ - (void)test004_DoBDXTransferDenyUpdateRequest __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:rawImagePath + otaImageDownloadFilePath:kOtaDownloadedFilePath1 nodeID:@(kDeviceId1) + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionDiscontinue testcase:self]; // We do not expect the update to actually be applied here. @@ -837,10 +871,10 @@ - (void)test004_DoBDXTransferDenyUpdateRequest [self waitForExpectations:@[ checker.notifyUpdateAppliedExpectation ] timeout:kTimeoutInSeconds]; } -// TODO: Enable this test when PR #26040 is merged. Currently the poll interval causes delays in the BDX transfer and -// results in the test taking a long time. With PR #26040 we eliminate the poll interval completely and hence the test -// can run in a short time. -#ifdef ENABLE_TEST_005 +// TODO: Enable tests 005, 006 and 007 when PR #26040 is merged. Currently the poll interval causes delays in the BDX transfer +// and results in the tests taking a long time. With PR #26040 we eliminate the poll interval completely and hence the tests can run +// in a short time. +#ifdef ENABLE_REAL_OTA_UPDATE_TESTS - (void)test005_DoBDXTransferAllowUpdateRequest { // In this test we do the following: @@ -855,16 +889,476 @@ - (void)test005_DoBDXTransferAllowUpdateRequest // 8) Wait for the app to restart and wait for the NotifyUpdateApplied message to confirm the app has updated to the new version // This test expects a pre-generated raw image at otaRawImagePath. - NSString * otaRawImagePath = @"/tmp/ota-test005-raw-image"; + NSString * otaRawImagePath = @"/tmp/ota-raw-image-v5"; - // Check if the ota raw image exists at kOtaRawImagePath + // Check whether the ota raw image exists at otaRawImagePath XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath]); __auto_type * device = sConnectedDevice1; __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath + otaImageDownloadFilePath:kOtaDownloadedFilePath1 nodeID:@(kDeviceId1) + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 + applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed + testcase:self]; + + // Advertise ourselves as an OTA provider. + XCTestExpectation * announceResponseExpectation = [self announceProviderToDevice:device]; + + // Make sure we get our callbacks in order. Give it a bit more time, because + // we want to allow time for the BDX download. + [self waitForExpectations:@[ + checker.queryExpectation, checker.bdxBeginExpectation, checker.bdxQueryExpectation, checker.bdxEndExpectation + ] + timeout:(kTimeoutWithUpdateInSeconds) enforceOrder:YES]; + + // Nothing really defines the ordering of bdxEndExpectation and + // applyUpdateRequestExpectation with respect to each other. + [self waitForExpectations:@[ checker.applyUpdateRequestExpectation, checker.notifyUpdateAppliedExpectation ] + timeout:kTimeoutInSeconds + enforceOrder:YES]; + + // Nothing defines the ordering of announceResponseExpectation with respect + // to _any_ of the above expectations. + [self waitForExpectations:@[ announceResponseExpectation ] timeout:kTimeoutInSeconds]; +} + +- (void)test006_DoBDXTransferWithTwoOTARequesters +{ + // Note: This test has a dependency on test005_DoBDXTransferAllowUpdateRequest since we update device1 to version + // number 5 in the above test. We reuse device1 for this test and we need to use an OTA image with a higher version number (10) + // for device1 to update itself again. We need to fix this when we want to run tests out of order. + + // In this test, we test BDX transfers between one provider and two OTA requestors device1 and device2. + // + // 1) We announce ourselves to device1 first. + // 2) When device1 queries, we return image available at imagePath1. + // 3) We set the BDX begin and end handlers for device1 and device1 starts the BDX transfer. + // 4) At this time, we announce ourselves to device2. + // 5) When device2 queries, we return image available with a busy delay of 30 secs. + // 6) When device1 completes the BDX transfer, we wait for device2 to query. + // 7) When device 2 queries again, we return image available at imagePath2. + // 8) We set the BDX begin and end handlers for device2 and device2 starts the BDX transfer. + // 9) Device1 applies the update independently and reboots with the new image. + // 10) At this point, we set the apply update handlers for device2. + // 11) Device2 applies the update and reboots with its new image. + + // This test expects a pre-generated raw image at otaRawImagePath1 for device1 and at otaRawImagePath2 for device2. + NSString * otaRawImagePath1 = @"/tmp/ota-raw-image-v10"; + NSString * otaRawImagePath2 = @"/tmp/ota-raw-image-v5"; + + // Check whether the ota raw image exists at otaRawImagePath1 and otaRawImagePath2 + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath1]); + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath2]); + + XCTestExpectation * queryExpectation1 = [self expectationWithDescription:@"handleQueryImageForNodeID called for device1"]; + XCTestExpectation * queryExpectation2 = + [self expectationWithDescription:@"handleQueryImageForNodeID called for device2 - busy"]; + XCTestExpectation * queryExpectation3 = + [self expectationWithDescription:@"handleQueryImageForNodeID called for device2 - available"]; + + XCTestExpectation * bdxBeginExpectation1 = + [self expectationWithDescription:@"handleBDXTransferSessionBeginForNodeID called for device1"]; + XCTestExpectation * bdxBeginExpectation2 = + [self expectationWithDescription:@"handleBDXTransferSessionBeginForNodeID called for device2"]; + + XCTestExpectation * bdxQueryExpectation1 = [self expectationWithDescription:@"handleBDXQueryForNodeID called for device1"]; + XCTestExpectation * bdxQueryExpectation2 = [self expectationWithDescription:@"handleBDXQueryForNodeID called for device2"]; + + XCTestExpectation * bdxEndExpectation1 = + [self expectationWithDescription:@"handleBDXTransferSessionEndForNodeID called for device1"]; + XCTestExpectation * bdxEndExpectation2 = + [self expectationWithDescription:@"handleBDXTransferSessionEndForNodeID called for device2"]; + + XCTestExpectation * applyUpdateRequestExpectation1 = + [self expectationWithDescription:@"handleApplyUpdateRequestForNodeID called for device1"]; + XCTestExpectation * applyUpdateRequestExpectation2 = + [self expectationWithDescription:@"handleApplyUpdateRequestForNodeID called for device2"]; + + XCTestExpectation * notifyUpdateAppliedExpectation1 = + [self expectationWithDescription:@"handleNotifyUpdateAppliedForNodeID called for device1"]; + XCTestExpectation * notifyUpdateAppliedExpectation2 = + [self expectationWithDescription:@"handleNotifyUpdateAppliedForNodeID called for device2"]; + + __block XCTestExpectation * announceResponseExpectation2; + + NSString * imagePath1 = [otaRawImagePath1 stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; + + NSString * imagePath2 = [otaRawImagePath2 stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; + + // Find the right absolute path to our ota_image_tool.py script. PWD should + // point to our src/darwin/Framework, while the script is in + // src/app/ota_image_tool.py. + NSString * pwd = [[NSProcessInfo processInfo] environment][@"PWD"]; + NSString * imageToolPath = [NSString + pathWithComponents:@[ [pwd substringToIndex:(pwd.length - @"darwin/Framework".length)], @"app", @"ota_image_tool.py" ]]; + + NSTask * task1 = [[NSTask alloc] init]; + [task1 setLaunchPath:imageToolPath]; + [task1 setArguments:@[ + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion_10 stringValue], @"-vs", + kUpdatedSoftwareVersionString_10, @"-da", @"sha256", otaRawImagePath1, imagePath1 + ]]; + NSError * launchError = nil; + [task1 launchAndReturnError:&launchError]; + XCTAssertNil(launchError); + [task1 waitUntilExit]; + XCTAssertEqual([task1 terminationStatus], 0); + + NSTask * task2 = [[NSTask alloc] init]; + [task2 setLaunchPath:imageToolPath]; + [task2 setArguments:@[ + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion_5 stringValue], @"-vs", + kUpdatedSoftwareVersionString_5, @"-da", @"sha256", otaRawImagePath2, imagePath2 + ]]; + launchError = nil; + [task2 launchAndReturnError:&launchError]; + XCTAssertNil(launchError); + [task2 waitUntilExit]; + XCTAssertEqual([task2 terminationStatus], 0); + + NSData * updateToken1 = [sOTAProviderDelegate generateUpdateToken]; + NSData * updateToken2 = [sOTAProviderDelegate generateUpdateToken]; + + __block NSFileHandle * readHandle; + __block uint64_t imageSize; + __block uint32_t lastBlockIndex = UINT32_MAX; + const uint16_t busyDelay = 30; // 30 second + __auto_type * device1 = sConnectedDevice1; + __auto_type * device2 = sConnectedDevice2; + + // This to keep track of whether queryImageHandler for device 2 was called or not. The first time it's called we will + // fulfill queryExpectation2 and proceed with BDX for device 1. + __block bool firstQueryImageForDevice2Received = false; + + // Set up the query handler for device 1 to return image available at imagePath1 + sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterQueryImageParams * params, QueryImageCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + + sOTAProviderDelegate.queryImageHandler = nil; + [sOTAProviderDelegate respondAvailableWithDelay:@(0) + uri:imagePath1 + updateToken:updateToken1 + softwareVersion:kUpdatedSoftwareVersion_10 + softwareVersionString:kUpdatedSoftwareVersionString_10 + completion:completion]; + [queryExpectation1 fulfill]; + }; + + // Set up the BDX transfer begin, block query and transfer end handlers for device1 so it can go ahead with the BDX transfer + sOTAProviderDelegate.transferBeginHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSString * fileDesignator, + NSNumber * offset, MTRStatusCompletion outerCompletion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(fileDesignator, imagePath1); + XCTAssertEqualObjects(offset, @(0)); + + readHandle = [NSFileHandle fileHandleForReadingAtPath:fileDesignator]; + XCTAssertNotNil(readHandle); + + NSError * endSeekError; + XCTAssertTrue([readHandle seekToEndReturningOffset:&imageSize error:&endSeekError]); + XCTAssertNil(endSeekError); + sOTAProviderDelegate.transferBeginHandler = nil; + + // Don't actually respond until the second requestor has queried us for + // an image to ensure BDX for device1 starts only after device2 has queried us once. + + // Set up the query handler for device2 to return image available at imagePath2 but a busy delay of 30 secs + sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterQueryImageParams * params, QueryImageCompletion innerCompletion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + + [sOTAProviderDelegate respondAvailableWithDelay:@(busyDelay) + uri:imagePath2 + updateToken:updateToken2 + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 + completion:innerCompletion]; + if (!firstQueryImageForDevice2Received) { + [queryExpectation2 fulfill]; + + // Respond with success for the tranfer begin completion for device1 + [sOTAProviderDelegate respondSuccess:outerCompletion]; + [bdxBeginExpectation1 fulfill]; + } + firstQueryImageForDevice2Received = true; + }; + + // Announce ourselves to device2 + announceResponseExpectation2 = [self announceProviderToDevice:device2]; + }; + sOTAProviderDelegate.blockQueryHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSNumber * blockSize, + NSNumber * blockIndex, NSNumber * bytesToSkip, BlockQueryCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(blockSize, @(1024)); // Seems to always be 1024. + XCTAssertEqualObjects(blockIndex, @(lastBlockIndex + 1)); + XCTAssertEqualObjects(bytesToSkip, @(0)); // Don't expect to see skips here. + // Make sure we actually end up with multiple blocks. + XCTAssertTrue(blockSize.unsignedLongLongValue < imageSize); + + XCTAssertNotNil(readHandle); + uint64_t offset = blockSize.unsignedLongLongValue * blockIndex.unsignedLongLongValue; + NSError * seekError = nil; + [readHandle seekToOffset:offset error:&seekError]; + XCTAssertNil(seekError); + + NSError * readError = nil; + NSData * data = [readHandle readDataUpToLength:blockSize.unsignedLongValue error:&readError]; + XCTAssertNil(readError); + XCTAssertNotNil(data); + + BOOL isEOF = offset + blockSize.unsignedLongValue >= imageSize; + + ++lastBlockIndex; + + if (isEOF) { + sOTAProviderDelegate.blockQueryHandler = nil; + } + + completion(data, isEOF); + + if (isEOF) { + [bdxQueryExpectation1 fulfill]; + } + }; + sOTAProviderDelegate.transferEndHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSError * _Nullable error) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + XCTAssertNil(error); + sOTAProviderDelegate.transferEndHandler = nil; + [bdxEndExpectation1 fulfill]; + + // BDX transfer with device1 has completed + // Set up the query handler for device2 to return image available at imagePath2 + sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterQueryImageParams * params, QueryImageCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + + sOTAProviderDelegate.queryImageHandler = nil; + [sOTAProviderDelegate respondAvailableWithDelay:@(0) + uri:imagePath2 + updateToken:updateToken2 + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 + completion:completion]; + NSLog(@"OTA queryExpectation3"); + [queryExpectation3 fulfill]; + }; + + // Set up the BDX transfer begin, block query and transfer end handlers for device2 so it can go ahead with the BDX transfer + sOTAProviderDelegate.transferBeginHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + NSString * fileDesignator, NSNumber * offset, MTRStatusCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(fileDesignator, imagePath2); + XCTAssertEqualObjects(offset, @(0)); + + readHandle = [NSFileHandle fileHandleForReadingAtPath:fileDesignator]; + XCTAssertNotNil(readHandle); + + NSError * endSeekError; + XCTAssertTrue([readHandle seekToEndReturningOffset:&imageSize error:&endSeekError]); + XCTAssertNil(endSeekError); + sOTAProviderDelegate.transferBeginHandler = nil; + [sOTAProviderDelegate respondSuccess:completion]; + lastBlockIndex = UINT32_MAX; + [bdxBeginExpectation2 fulfill]; + }; + sOTAProviderDelegate.blockQueryHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSNumber * blockSize, + NSNumber * blockIndex, NSNumber * bytesToSkip, BlockQueryCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(blockSize, @(1024)); // Seems to always be 1024. + XCTAssertEqualObjects(blockIndex, @(lastBlockIndex + 1)); + XCTAssertEqualObjects(bytesToSkip, @(0)); // Don't expect to see skips here. + // Make sure we actually end up with multiple blocks. + XCTAssertTrue(blockSize.unsignedLongLongValue < imageSize); + + XCTAssertNotNil(readHandle); + uint64_t offset = blockSize.unsignedLongLongValue * blockIndex.unsignedLongLongValue; + NSError * seekError = nil; + [readHandle seekToOffset:offset error:&seekError]; + XCTAssertNil(seekError); + + NSError * readError = nil; + NSData * data = [readHandle readDataUpToLength:blockSize.unsignedLongValue error:&readError]; + XCTAssertNil(readError); + XCTAssertNotNil(data); + + BOOL isEOF = offset + blockSize.unsignedLongValue >= imageSize; + + ++lastBlockIndex; + + if (isEOF) { + sOTAProviderDelegate.blockQueryHandler = nil; + } + + completion(data, isEOF); + + if (isEOF) { + [bdxQueryExpectation2 fulfill]; + } + }; + sOTAProviderDelegate.transferEndHandler + = ^(NSNumber * nodeID, MTRDeviceController * controller, NSError * _Nullable error) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + XCTAssertNil(error); + sOTAProviderDelegate.transferEndHandler = nil; + [bdxEndExpectation2 fulfill]; + }; + }; + + // Flags to track if the applyUpdateRequest from both device1 and device2 has been handled. + __block bool device1HasHandledApplyUpdateRequest = false; + __block bool device2HasHandledApplyUpdateRequest = false; + + // Flags to track if device1 and device have notified that the update has been applied. + __block bool device1HasNotifiedUpdateApplied = false; + __block bool device2HasNotifiedUpdateApplied = false; + + // Set up the apply update request and update applied handlers for device1 and device2. Use the nodeID to verify which + // device sent the applyUpdateRequest and subsequent notifyUpdateApplied commands. + sOTAProviderDelegate.applyUpdateRequestHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams * params, ApplyUpdateRequestCompletion completion) { + XCTAssertTrue([nodeID isEqualToNumber:@(kDeviceId1)] || [nodeID isEqualToNumber:@(kDeviceId2)]); + + bool isDeviceID1 = [nodeID isEqualToNumber:@(kDeviceId1)]; + NSData * updateToken = (isDeviceID1) ? updateToken1 : updateToken2; + + // Device1 is updated to version 10 and device2 to version 5. + NSNumber * kSoftwareVersion = (isDeviceID1) ? kUpdatedSoftwareVersion_10 : kUpdatedSoftwareVersion_5; + NSString * otaImageFilePath = (isDeviceID1) ? otaRawImagePath1 : otaRawImagePath2; + NSString * otaDownloadedFilePath = (isDeviceID1) ? kOtaDownloadedFilePath1 : kOtaDownloadedFilePath2; + + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(params.updateToken, updateToken); + XCTAssertEqualObjects(params.newVersion, kSoftwareVersion); + + XCTAssertTrue([[NSFileManager defaultManager] contentsEqualAtPath:otaImageFilePath andPath:otaDownloadedFilePath]); + + [sOTAProviderDelegate respondToApplyUpdateRequestWithAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed + completion:completion]; + + if (isDeviceID1) { + device1HasHandledApplyUpdateRequest = true; + [applyUpdateRequestExpectation1 fulfill]; + } else { + device2HasHandledApplyUpdateRequest = true; + [applyUpdateRequestExpectation2 fulfill]; + } + + // If the applyUpdateRequest from both device1 and device2 has been handled, reset the + // applyUpdateRequestHandler to nil + if (device1HasHandledApplyUpdateRequest && device2HasHandledApplyUpdateRequest) { + sOTAProviderDelegate.applyUpdateRequestHandler = nil; + } + }; + + sOTAProviderDelegate.notifyUpdateAppliedHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * params, MTRStatusCompletion completion) { + XCTAssertTrue([nodeID isEqualToNumber:@(kDeviceId1)] || [nodeID isEqualToNumber:@(kDeviceId2)]); + + bool isDeviceID1 = [nodeID isEqualToNumber:@(kDeviceId1)]; + NSData * updateToken = (isDeviceID1) ? updateToken1 : updateToken2; + + // Device1 is updated to version 10 and device2 to version 5. + NSNumber * kSoftwareVersion = (isDeviceID1) ? kUpdatedSoftwareVersion_10 : kUpdatedSoftwareVersion_5; + + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(params.updateToken, updateToken); + XCTAssertEqualObjects(params.softwareVersion, kSoftwareVersion); + + [sOTAProviderDelegate respondSuccess:completion]; + + if (isDeviceID1) { + device1HasNotifiedUpdateApplied = true; + [notifyUpdateAppliedExpectation1 fulfill]; + } else { + device2HasNotifiedUpdateApplied = true; + [notifyUpdateAppliedExpectation2 fulfill]; + } + + // If both device1 and device2 have notified that the update has been applied, reset the + // notifyUpdateAppliedHandler to nil + if (device1HasNotifiedUpdateApplied && device2HasNotifiedUpdateApplied) { + sOTAProviderDelegate.notifyUpdateAppliedHandler = nil; + } + }; + + // Advertise ourselves as an OTA provider. + XCTestExpectation * announceResponseExpectation1 = [self announceProviderToDevice:device1]; + + // Make sure we get our callbacks in order for both device1 and device2. Since we do not + // send image available to device2 until BDX for device1 has ended, queryExpectation3 must follow + // bdxEndExpectation1. + // + // Give it a bit more time, because we want to allow time for the BDX downloads. + [self waitForExpectations:@[ + queryExpectation1, bdxBeginExpectation1, bdxQueryExpectation1, bdxEndExpectation1, queryExpectation3, bdxBeginExpectation2, + bdxQueryExpectation2, bdxEndExpectation2 + ] + timeout:(kTimeoutWithUpdateInSeconds) enforceOrder:YES]; + + // Make sure we get our query expectation for device2 fulfilled when we send busy for device2. + [self waitForExpectations:@[ queryExpectation2 ] timeout:(kTimeoutInSeconds)]; + + // Nothing really defines the ordering of bdxEndExpectation and + // applyUpdateRequestExpectation with respect to each other. + [self waitForExpectations:@[ + applyUpdateRequestExpectation1, notifyUpdateAppliedExpectation1, applyUpdateRequestExpectation2, + notifyUpdateAppliedExpectation2 + ] + timeout:kTimeoutInSeconds + enforceOrder:NO]; + + // Nothing defines the ordering of announceResponseExpectation with respect + // to _any_ of the above expectations. + [self waitForExpectations:@[ announceResponseExpectation1, announceResponseExpectation2 ] timeout:kTimeoutInSeconds]; +} + +- (void)test007_DoBDXTransferIncrementalOtaUpdate +{ + // In this test, we test incremental OTA update with device3. First we update device3 + // to version 5 using image at imagePath1. Once device3 updates and reboots, we update + // it to version 10 using image at imagePath2. + // + // 1) We announce ourselves to device3. + // 2) When device3 queries, we return image available at imagePath1 with version number 5. + // 3) We set the BDX begin and end handlers for device3 and device3 starts the BDX transfer. + // 4) Device3 completes the BDX transfer + // 5) Device3 applies the update and reboots with the new image with version number 5 + // 6) We announce ourselves to device 3 again. + // 7) When device3 queries again, we return image available at imagePath2 with version number 10. + // 8) We set the BDX begin and end handlers for device3 and device3 starts the BDX transfer. + // 4) Device3 completes the BDX transfer + // 5) Device3 applies the update and reboots with the new image with version number 10 + + // This test expects a pre-generated raw image at otaRawImagePath1 and a raw image at otaRawImagePath2 + NSString * otaRawImagePath1 = @"/tmp/ota-raw-image-v5"; + NSString * otaRawImagePath2 = @"/tmp/ota-raw-image-v10"; + + // Check whether the ota raw image exists at otaRawImagePath1 and otaRawImagePath2 + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath1]); + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath2]); + + __auto_type * device = sConnectedDevice3; + + __auto_type * checker = + [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath1 + otaImageDownloadFilePath:kOtaDownloadedFilePath3 + nodeID:@(kDeviceId3) + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed testcase:self]; @@ -887,8 +1381,39 @@ - (void)test005_DoBDXTransferAllowUpdateRequest // Nothing defines the ordering of announceResponseExpectation with respect // to _any_ of the above expectations. [self waitForExpectations:@[ announceResponseExpectation ] timeout:kTimeoutInSeconds]; + + // Provide an incremental update and makes sure the app is updated to the new version + + __auto_type * checker1 = + [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath2 + otaImageDownloadFilePath:kOtaDownloadedFilePath3 + nodeID:@(kDeviceId3) + softwareVersion:kUpdatedSoftwareVersion_10 + softwareVersionString:kUpdatedSoftwareVersionString_10 + applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed + testcase:self]; + + // Advertise ourselves as an OTA provider. + XCTestExpectation * announceResponseExpectation1 = [self announceProviderToDevice:device]; + + // Make sure we get our callbacks in order. Give it a bit more time, because + // we want to allow time for the BDX download. + [self waitForExpectations:@[ + checker1.queryExpectation, checker1.bdxBeginExpectation, checker1.bdxQueryExpectation, checker1.bdxEndExpectation + ] + timeout:(kTimeoutWithUpdateInSeconds) enforceOrder:YES]; + + // Nothing really defines the ordering of bdxEndExpectation and + // applyUpdateRequestExpectation with respect to each other. + [self waitForExpectations:@[ checker1.applyUpdateRequestExpectation, checker1.notifyUpdateAppliedExpectation ] + timeout:kTimeoutInSeconds + enforceOrder:YES]; + + // Nothing defines the ordering of announceResponseExpectation with respect + // to _any_ of the above expectations. + [self waitForExpectations:@[ announceResponseExpectation1 ] timeout:kTimeoutInSeconds]; } -#endif // ENABLE_TEST_005 +#endif // ENABLE_REAL_OTA_UPDATE_TESTS - (void)test999_TearDown { @@ -897,6 +1422,10 @@ - (void)test999_TearDown device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId2) controller:sController]; ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); + + device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId3) controller:sController]; + ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); + [[self class] shutdownStack]; } From a360e9cec4d874c5c1aae770b0fd5f363a14fd73 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 28 Jul 2023 20:40:05 -0400 Subject: [PATCH 080/159] Allow MTRDeviceControllerFactory to store a more generic storage delegate. (#28383) We might not always use MTRPersistentStorageDelegateBridge. --- .../CHIP/MTRDeviceControllerFactory.mm | 26 +++++++++---------- .../MTRDeviceControllerFactory_Internal.h | 5 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 053a3a5c6a5094..27e15ebd700d23 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -74,7 +74,7 @@ @interface MTRDeviceControllerFactory () @property (atomic, readonly) dispatch_queue_t chipWorkQueue; @property (readonly) DeviceControllerFactory * controllerFactory; -@property (readonly) MTRPersistentStorageDelegateBridge * persistentStorageDelegateBridge; +@property (readonly) PersistentStorageDelegate * persistentStorageDelegate; @property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; @property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; @property (readonly) Crypto::RawKeySessionKeystore * sessionKeystore; @@ -273,9 +273,9 @@ - (void)cleanupStartupObjects _opCertStore = nullptr; } - if (_persistentStorageDelegateBridge) { - delete _persistentStorageDelegateBridge; - _persistentStorageDelegateBridge = nullptr; + if (_persistentStorageDelegate) { + delete _persistentStorageDelegate; + _persistentStorageDelegate = nullptr; } } @@ -291,7 +291,7 @@ - (void)cleanupStartupObjects __block BOOL listFilled = NO; auto fillListBlock = ^{ FabricTable fabricTable; - CHIP_ERROR err = fabricTable.Init({ .storage = self->_persistentStorageDelegateBridge, + CHIP_ERROR err = fabricTable.Init({ .storage = self->_persistentStorageDelegate, .operationalKeystore = self->_keystore, .opCertStore = self->_opCertStore }); if (err != CHIP_NO_ERROR) { @@ -348,8 +348,8 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams [MTRControllerAccessControl init]; - _persistentStorageDelegateBridge = new MTRPersistentStorageDelegateBridge(startupParams.storage); - if (_persistentStorageDelegateBridge == nil) { + _persistentStorageDelegate = new MTRPersistentStorageDelegateBridge(startupParams.storage); + if (_persistentStorageDelegate == nil) { MTR_LOG_ERROR("Error: %@", kErrorPersistentStorageInit); errorCode = CHIP_ERROR_NO_MEMORY; return; @@ -415,7 +415,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - errorCode = _keystore->Init(_persistentStorageDelegateBridge); + errorCode = _keystore->Init(_persistentStorageDelegate); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); return; @@ -429,7 +429,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - errorCode = _opCertStore->Init(_persistentStorageDelegateBridge); + errorCode = _opCertStore->Init(_persistentStorageDelegate); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorCertStoreInit); return; @@ -482,7 +482,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams params.groupDataProvider = _groupDataProvider; params.sessionKeystore = _sessionKeystore; - params.fabricIndependentStorage = _persistentStorageDelegateBridge; + params.fabricIndependentStorage = _persistentStorageDelegate; params.operationalKeystore = _keystore; params.opCertStore = _opCertStore; params.certificateValidityPolicy = _certificateValidityPolicy; @@ -788,7 +788,7 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable assertChipStackLockedByCurrentThread(); CHIP_ERROR err = fabricTable.Init( - { .storage = _persistentStorageDelegateBridge, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); + { .storage = _persistentStorageDelegate, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't initialize fabric table: %s", ErrorStr(err)); return NO; @@ -937,9 +937,9 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID } } -- (MTRPersistentStorageDelegateBridge *)storageDelegateBridge +- (PersistentStorageDelegate *)storageDelegate { - return _persistentStorageDelegateBridge; + return _persistentStorageDelegate; } - (Credentials::GroupDataProvider *)groupData diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 91b5813c896fb8..9903eaa77e2cd2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -23,11 +23,10 @@ #import "MTRDeviceControllerFactory.h" +#include #include #include -class MTRPersistentStorageDelegateBridge; - namespace chip { namespace Credentials { class GroupDataProvider; @@ -54,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID; -@property (readonly) MTRPersistentStorageDelegateBridge * storageDelegateBridge; +@property (readonly) chip::PersistentStorageDelegate * storageDelegate; @property (readonly) chip::Credentials::GroupDataProvider * groupData; @property (readonly) chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; @end From 2a681e3e2c809bf2c05f5adc96042226b465166d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 28 Jul 2023 20:53:57 -0400 Subject: [PATCH 081/159] Fix missing lock around _controllers access. (#28384) The rules for the locking are that we must lock when on the Matter queue, which is the case in createControllerOnExistingFabric. --- src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 27e15ebd700d23..f26492b9a99448 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -96,7 +96,7 @@ @interface MTRDeviceControllerFactory () // // 1) The only mutating accesses to the controllers array happen when the // current queue is not the Matter queue. This is a good assumption, because -// the implementation of the fucntions that mutate the array do sync dispatch +// the implementation of the functions that mutate the array do sync dispatch // to the Matter queue, which would deadlock if they were called when that // queue was the current queue. // 2) It's our API consumer's responsibility to serialize access to us from @@ -597,7 +597,11 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo return; } - for (MTRDeviceController * existing in _controllers) { + os_unfair_lock_lock(&_controllersLock); + NSArray * controllersCopy = [_controllers copy]; + os_unfair_lock_unlock(&_controllersLock); + + for (MTRDeviceController * existing in controllersCopy) { BOOL isRunning = YES; // assume the worst if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] != CHIP_NO_ERROR) { From 693ef7264064d53743b47efcf1c4e697677ea68a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Sat, 29 Jul 2023 07:43:59 -0400 Subject: [PATCH 082/159] Refactor controller startup a bit to share more code. (#28385) There was a lot of identical boilerplate between createControllerOnNewFabric and createControllerOnExistingFabric. checkIsRunning already sets error, which is why the setting of error if that returns false was removed. --- .../CHIP/MTRDeviceControllerFactory.mm | 217 ++++++++---------- 1 file changed, 97 insertions(+), 120 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index f26492b9a99448..72cf8737f8aa7c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -553,16 +553,21 @@ - (void)stopControllerFactory _running = NO; } -- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams - error:(NSError * __autoreleasing *)error +/** + * Helper function to start a device controller with the given startup params. + * The fabricChecker block will run on the Matter queue, and is expected to + * return nil if pre-startup fabric table checks fail, and set fabricError to + * the right error value in that situation. + */ +- (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerStartupParams *)startupParams + fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)( + FabricTable * fabricTable, CHIP_ERROR & fabricError))fabricChecker + error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; if (![self checkIsRunning:error]) { MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } return nil; } @@ -578,53 +583,14 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo __block MTRDeviceControllerStartupParamsInternal * params = nil; __block CHIP_ERROR fabricError = CHIP_NO_ERROR; + // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; FabricTable * fabricTable = &fabricTableInstance; - dispatch_sync(_chipWorkQueue, ^{ - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return; - } - - if (fabric == nullptr) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); - fabricError = CHIP_ERROR_NOT_FOUND; - return; - } - - os_unfair_lock_lock(&_controllersLock); - NSArray * controllersCopy = [_controllers copy]; - os_unfair_lock_unlock(&_controllersLock); - - for (MTRDeviceController * existing in controllersCopy) { - BOOL isRunning = YES; // assume the worst - if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] - != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); - fabricError = CHIP_ERROR_INTERNAL; - return; - } - if (isRunning) { - MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return; - } - } - - params = [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable - fabricIndex:fabric->GetFabricIndex() - keystore:_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } + dispatch_sync(_chipWorkQueue, ^{ + params = fabricChecker(fabricTable, fabricError); }); if (params == nil) { @@ -653,19 +619,68 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo return controller; } +- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams + error:(NSError * __autoreleasing *)error +{ + [self _assertCurrentQueueIsNotMatterQueue]; + + return [self + _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *(FabricTable * fabricTable, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric == nullptr) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); + fabricError = CHIP_ERROR_NOT_FOUND; + return nil; + } + + os_unfair_lock_lock(&self->_controllersLock); + NSArray * controllersCopy = [self->_controllers copy]; + os_unfair_lock_unlock(&self->_controllersLock); + + for (MTRDeviceController * existing in controllersCopy) { + BOOL isRunning = YES; // assume the worst + if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] + != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (isRunning) { + MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + + return params; + } + error:error]; +} + - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; - if (![self isRunning]) { - MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - return nil; - } - if (startupParams.vendorID == nil) { MTR_LOG_ERROR("Must provide vendor id when starting controller on new fabric"); if (error != nil) { @@ -682,71 +697,33 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl return nil; } - // Create the controller, so we start the event loop, since we plan to do - // our fabric table operations there. - auto * controller = [self createController]; - if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; - } - return nil; - } - - __block MTRDeviceControllerStartupParamsInternal * params = nil; - __block CHIP_ERROR fabricError = CHIP_NO_ERROR; - // We want the block to end up with just a pointer to the fabric table, - // since we know our on-stack instance will outlive the block. - FabricTable fabricTableInstance; - FabricTable * fabricTable = &fabricTableInstance; - dispatch_sync(_chipWorkQueue, ^{ - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return; - } - - if (fabric != nullptr) { - MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return; - } - - params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable - keystore:_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } - }); - - if (params == nil) { - [self controllerShuttingDown:controller]; - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:fabricError]; - } - return nil; - } - - BOOL ok = [controller startup:params]; - if (ok == NO) { - // TODO: get error from controller's startup. - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } - return nil; - } - - // TODO: Need better error propagation. - controller = [self maybeInitializeOTAProvider:controller]; - if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } - } - return controller; + return [self + _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *(FabricTable * fabricTable, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric != nullptr) { + MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + + auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + return params; + } + error:error]; } - (MTRDeviceController * _Nullable)createController From c96ffaaa50192915a2cba547bfabb38ed018d6e2 Mon Sep 17 00:00:00 2001 From: Jerry-ESP <107675966+Jerry-ESP@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:28:14 +0800 Subject: [PATCH 083/159] add nvs size to 48k bytes for matter 1.1 (#28353) --- examples/all-clusters-app/esp32/partitions.csv | 2 +- examples/all-clusters-minimal-app/esp32/partitions.csv | 2 +- examples/bridge-app/esp32/partitions.csv | 4 ++-- examples/chef/esp32/partitions.csv | 2 +- examples/light-switch-app/esp32/partitions.csv | 2 +- examples/lighting-app/esp32/partitions.csv | 2 +- examples/lighting-app/esp32/partitions_encrypted.csv | 2 +- examples/lighting-app/esp32/partitions_h2.csv | 2 +- examples/lock-app/esp32/partitions.csv | 4 ++-- examples/ota-provider-app/esp32/partitions.csv | 2 +- examples/ota-requestor-app/esp32/partitions.csv | 2 +- examples/persistent-storage/esp32/partitions.csv | 4 ++-- examples/pigweed-app/esp32/partitions.csv | 4 ++-- examples/shell/esp32/partitions.csv | 4 ++-- examples/temperature-measurement-app/esp32/partitions.csv | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/examples/all-clusters-app/esp32/partitions.csv b/examples/all-clusters-app/esp32/partitions.csv index 2211b30fa01a74..47172e25774ebb 100644 --- a/examples/all-clusters-app/esp32/partitions.csv +++ b/examples/all-clusters-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1900K, diff --git a/examples/all-clusters-minimal-app/esp32/partitions.csv b/examples/all-clusters-minimal-app/esp32/partitions.csv index 43acef25d0245d..7d399d0f5dd48e 100644 --- a/examples/all-clusters-minimal-app/esp32/partitions.csv +++ b/examples/all-clusters-minimal-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1500K, diff --git a/examples/bridge-app/esp32/partitions.csv b/examples/bridge-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/bridge-app/esp32/partitions.csv +++ b/examples/bridge-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/chef/esp32/partitions.csv b/examples/chef/esp32/partitions.csv index b338ff11a11589..c0855b66229dc4 100644 --- a/examples/chef/esp32/partitions.csv +++ b/examples/chef/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB factory, app, factory, , 1945K, diff --git a/examples/light-switch-app/esp32/partitions.csv b/examples/light-switch-app/esp32/partitions.csv index 9c801081f71c04..eb41fc9c431ff0 100644 --- a/examples/light-switch-app/esp32/partitions.csv +++ b/examples/light-switch-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1500K, diff --git a/examples/lighting-app/esp32/partitions.csv b/examples/lighting-app/esp32/partitions.csv index 3753d8bcf13a35..428d873fa54a05 100644 --- a/examples/lighting-app/esp32/partitions.csv +++ b/examples/lighting-app/esp32/partitions.csv @@ -1,7 +1,7 @@ # Name, Type, SubType, Offset, Size, Flags # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted -nvs, data, nvs, 0x10000, 0x6000, +nvs, data, nvs, 0x10000, 0xC000, nvs_keys, data, nvs_keys,, 0x1000, otadata, data, ota, , 0x2000 phy_init, data, phy, , 0x1000, diff --git a/examples/lighting-app/esp32/partitions_encrypted.csv b/examples/lighting-app/esp32/partitions_encrypted.csv index 807ee35dc8e645..94ec9f7a2b7f17 100644 --- a/examples/lighting-app/esp32/partitions_encrypted.csv +++ b/examples/lighting-app/esp32/partitions_encrypted.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, encrypted phy_init, data, phy, , 0x1000, encrypted ota_0, app, ota_0, , 1500K, encrypted diff --git a/examples/lighting-app/esp32/partitions_h2.csv b/examples/lighting-app/esp32/partitions_h2.csv index 6d04b8d05e3a0a..16a8b0f7453040 100644 --- a/examples/lighting-app/esp32/partitions_h2.csv +++ b/examples/lighting-app/esp32/partitions_h2.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1500K, diff --git a/examples/lock-app/esp32/partitions.csv b/examples/lock-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/lock-app/esp32/partitions.csv +++ b/examples/lock-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/ota-provider-app/esp32/partitions.csv b/examples/ota-provider-app/esp32/partitions.csv index 0d8e94e5c1f16a..009b96d704d596 100644 --- a/examples/ota-provider-app/esp32/partitions.csv +++ b/examples/ota-provider-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.6MB factory, app, factory, , 1600K, diff --git a/examples/ota-requestor-app/esp32/partitions.csv b/examples/ota-requestor-app/esp32/partitions.csv index 56849bb3037058..421f1bef343436 100644 --- a/examples/ota-requestor-app/esp32/partitions.csv +++ b/examples/ota-requestor-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, # OTA partitions of size 1.5M each diff --git a/examples/persistent-storage/esp32/partitions.csv b/examples/persistent-storage/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/persistent-storage/esp32/partitions.csv +++ b/examples/persistent-storage/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/pigweed-app/esp32/partitions.csv b/examples/pigweed-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/pigweed-app/esp32/partitions.csv +++ b/examples/pigweed-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/shell/esp32/partitions.csv b/examples/shell/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/shell/esp32/partitions.csv +++ b/examples/shell/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/temperature-measurement-app/esp32/partitions.csv b/examples/temperature-measurement-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/temperature-measurement-app/esp32/partitions.csv +++ b/examples/temperature-measurement-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, From 9f2996ef78034f99715290fd00285dfe5a878a25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:37:25 +0000 Subject: [PATCH 084/159] Bump third_party/openthread/repo from `7f4c7fc` to `e958f88` (#28400) Bumps [third_party/openthread/repo](https://github.com/openthread/openthread) from `7f4c7fc` to `e958f88`. - [Release notes](https://github.com/openthread/openthread/releases) - [Commits](https://github.com/openthread/openthread/compare/7f4c7fca2e72e2fee3c33f8acf14d36d1be205a6...e958f8827ede37d543e962513d332d00dab6b1c3) --- updated-dependencies: - dependency-name: third_party/openthread/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/openthread/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 7f4c7fca2e72e2..e958f8827ede37 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 7f4c7fca2e72e2fee3c33f8acf14d36d1be205a6 +Subproject commit e958f8827ede37d543e962513d332d00dab6b1c3 From 8f63dcbe366640c5fedcc886a14b7d2afbf5d62f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:38:02 +0000 Subject: [PATCH 085/159] Bump third_party/mbedtls/repo from `4e73afe` to `e15b8d2` (#28401) Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `4e73afe` to `e15b8d2`. - [Release notes](https://github.com/ARMmbed/mbedtls/releases) - [Commits](https://github.com/ARMmbed/mbedtls/compare/4e73afe6ed21edfc03057f2c97d541b57d0d01e9...e15b8d21d62a68ac602c4f8dbfd6cb17d04bf06c) --- updated-dependencies: - dependency-name: third_party/mbedtls/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/mbedtls/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index 4e73afe6ed21ed..e15b8d21d62a68 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit 4e73afe6ed21edfc03057f2c97d541b57d0d01e9 +Subproject commit e15b8d21d62a68ac602c4f8dbfd6cb17d04bf06c From a096a4270242e2793654c18aebae6e4e15b04716 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:38:17 +0000 Subject: [PATCH 086/159] Bump third_party/imgui/repo from `1109de3` to `19ae142` (#28402) Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `1109de3` to `19ae142`. - [Release notes](https://github.com/ocornut/imgui/releases) - [Commits](https://github.com/ocornut/imgui/compare/1109de38277fd2d14d4dca4c1cb8d4a2c4ff0f95...19ae142bdddf9fcb840549b4b1279739a36c3fa6) --- updated-dependencies: - dependency-name: third_party/imgui/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/imgui/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 1109de38277fd2..19ae142bdddf9f 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 1109de38277fd2d14d4dca4c1cb8d4a2c4ff0f95 +Subproject commit 19ae142bdddf9fcb840549b4b1279739a36c3fa6 From 29192c180be72bac81b4cba53ecc71ccdd0ba964 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:39:21 +0000 Subject: [PATCH 087/159] Bump third_party/nanopb/repo from `ab19ecb` to `09a3560` (#28405) Bumps [third_party/nanopb/repo](https://github.com/nanopb/nanopb) from `ab19ecb` to `09a3560`. - [Commits](https://github.com/nanopb/nanopb/compare/ab19ecbe1b9f377ab4ee8e762bfe16c39068ad68...09a356071fb9c2a31671ad1cf982dc52d5fae1d2) --- updated-dependencies: - dependency-name: third_party/nanopb/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/nanopb/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/nanopb/repo b/third_party/nanopb/repo index ab19ecbe1b9f37..09a356071fb9c2 160000 --- a/third_party/nanopb/repo +++ b/third_party/nanopb/repo @@ -1 +1 @@ -Subproject commit ab19ecbe1b9f377ab4ee8e762bfe16c39068ad68 +Subproject commit 09a356071fb9c2a31671ad1cf982dc52d5fae1d2 From d92ff3f5ad391f717d031b0e803cdd5902fd4efd Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 31 Jul 2023 10:46:49 -0400 Subject: [PATCH 088/159] [text decode] Fix event decoding and add unit tests. (#28376) * Fix id for event report decoding * Add unit tests for event decoding * Restyled by clang-format --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- src/lib/format/protocol_messages.matter | 2 +- src/lib/format/tests/TestDecoding.cpp | 37 +++++++++++++++++++++++++ src/lib/format/tests/sample_data.cpp | 23 +++++++++++++++ src/lib/format/tests/sample_data.h | 4 +++ 4 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/lib/format/protocol_messages.matter b/src/lib/format/protocol_messages.matter index 0346b138fd45b0..786c50d85dffb0 100644 --- a/src/lib/format/protocol_messages.matter +++ b/src/lib/format/protocol_messages.matter @@ -262,7 +262,7 @@ client cluster IMProtocol = 0xFFFF0001 { int64u delta_system_timestamp = 6; // } - cluster_event_payload data = 2; + cluster_event_payload data = 7; } struct EventReportIB { diff --git a/src/lib/format/tests/TestDecoding.cpp b/src/lib/format/tests/TestDecoding.cpp index 7dfc005e8e5988..9ad6f97b6849d5 100644 --- a/src/lib/format/tests/TestDecoding.cpp +++ b/src/lib/format/tests/TestDecoding.cpp @@ -355,6 +355,43 @@ void TestFullDataDecoding(nlTestSuite * inSuite, void * inContext) " Channel::ChangeChannel\n" " match: \"channel name\"\n" " interaction_model_revison: 1\n"); + + TestSampleData(inSuite, params, im_protocol_event_software_fault, + "report_data\n" + " event_reports\n" + " Anonymous<>\n" + " event_data\n" + " path\n" + " endpoint_id: 0\n" + " cluster_id: 52 == 'SoftwareDiagnostics'\n" + " event_id: 0 == 'SoftwareFault'\n" + " event_number: 196610\n" + " priority: 1\n" + " epoch_timestamp: 1690566548210\n" + " SoftwareDiagnostics::SoftwareFault\n" + " id: 2454952\n" + " name: \"2454952\"\n" + " faultRecording: hex:467269204A756C2032382031333A34393A30382032303233\n" + " suppress_response: true\n" + " interaction_model_revison: 1\n"); + + TestSampleData(inSuite, params, im_protocol_event_multipress, + "report_data\n" + " event_reports\n" + " Anonymous<>\n" + " event_data\n" + " path\n" + " endpoint_id: 0\n" + " cluster_id: 59 == 'Switch'\n" + " event_id: 6 == 'MultiPressComplete'\n" + " event_number: 196611\n" + " priority: 1\n" + " epoch_timestamp: 1690566820898\n" + " Switch::MultiPressComplete\n" + " previousPosition: 1\n" + " totalNumberOfPressesCounted: 23\n" + " suppress_response: true\n" + " interaction_model_revison: 1\n"); } void TestMetaDataOnlyDecoding(nlTestSuite * inSuite, void * inContext) diff --git a/src/lib/format/tests/sample_data.cpp b/src/lib/format/tests/sample_data.cpp index b5304198bdda1a..52bfb64a54c085 100644 --- a/src/lib/format/tests/sample_data.cpp +++ b/src/lib/format/tests/sample_data.cpp @@ -104,6 +104,23 @@ const uint8_t payload_1_8_change_channel[] = { 0x15, 0x28, 0x00, 0x28, 0x01, 0x3 0x00, 0x0C, 0x63, 0x68, 0x61, 0x6E, 0x6E, 0x65, 0x6C, 0x20, 0x6E, 0x61, 0x6D, 0x65, 0x18, 0x18, 0x18, 0x24, 0xFF, 0x01, 0x18 }; +// Software fault event: +// id: 2454952, name: "2454952", faultRecording: "467269204A756C2032382031333A34393A30382032303233" +const uint8_t payload_1_5_software_fault_event[] = { + 0x15, 0x36, 0x02, 0x15, 0x35, 0x01, 0x37, 0x00, 0x24, 0x01, 0x00, 0x24, 0x02, 0x34, 0x24, 0x03, 0x00, 0x18, 0x26, + 0x01, 0x02, 0x00, 0x03, 0x00, 0x24, 0x02, 0x01, 0x27, 0x03, 0xF2, 0x5A, 0x9E, 0x9D, 0x89, 0x01, 0x00, 0x00, 0x35, + 0x07, 0x26, 0x00, 0xA8, 0x75, 0x25, 0x00, 0x2C, 0x01, 0x07, 0x32, 0x34, 0x35, 0x34, 0x39, 0x35, 0x32, 0x30, 0x02, + 0x18, 0x46, 0x72, 0x69, 0x20, 0x4A, 0x75, 0x6C, 0x20, 0x32, 0x38, 0x20, 0x31, 0x33, 0x3A, 0x34, 0x39, 0x3A, 0x30, + 0x38, 0x20, 0x32, 0x30, 0x32, 0x33, 0x18, 0x18, 0x18, 0x18, 0x29, 0x04, 0x24, 0xFF, 0x01, 0x18 +}; + +// A multipress complete event +// previousPosition: 1, totalNumberOfPressesCounted: 23 +const uint8_t payload_1_5_multipress_event[] = { 0x15, 0x36, 0x02, 0x15, 0x35, 0x01, 0x37, 0x00, 0x24, 0x01, 0x00, 0x24, 0x02, 0x3B, + 0x24, 0x03, 0x06, 0x18, 0x26, 0x01, 0x03, 0x00, 0x03, 0x00, 0x24, 0x02, 0x01, 0x27, + 0x03, 0x22, 0x84, 0xA2, 0x9D, 0x89, 0x01, 0x00, 0x00, 0x35, 0x07, 0x24, 0x00, 0x01, + 0x24, 0x01, 0x17, 0x18, 0x18, 0x18, 0x18, 0x29, 0x04, 0x24, 0xFF, 0x01, 0x18 }; + } // namespace const SamplePayload secure_channel_mrp_ack = { chip::Protocols::Id(VendorId::Common, 0), 16, @@ -127,5 +144,11 @@ const SamplePayload im_protocol_report_data_acl = { chip::Protocols::Id(VendorId const SamplePayload im_protocol_report_data_window_covering = { chip::Protocols::Id(VendorId::Common, 1), 5, ByteSpan(payload_1_5_window_covering) }; +const SamplePayload im_protocol_event_software_fault = { chip::Protocols::Id(VendorId::Common, 1), 5, + ByteSpan(payload_1_5_software_fault_event) }; + +const SamplePayload im_protocol_event_multipress = { chip::Protocols::Id(VendorId::Common, 1), 5, + ByteSpan(payload_1_5_multipress_event) }; + } // namespace TestData } // namespace chip diff --git a/src/lib/format/tests/sample_data.h b/src/lib/format/tests/sample_data.h index d8bf5864593978..cc74ae09e296fc 100644 --- a/src/lib/format/tests/sample_data.h +++ b/src/lib/format/tests/sample_data.h @@ -46,5 +46,9 @@ extern const SamplePayload im_protocol_report_data_acl; extern const SamplePayload im_protocol_report_data_window_covering; extern const SamplePayload im_protocol_invoke_request_change_channel; +// different event reports +extern const SamplePayload im_protocol_event_software_fault; +extern const SamplePayload im_protocol_event_multipress; + } // namespace TestData } // namespace chip From 12a1d38dae8f90152eb3b6f90e237362050a68c7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 31 Jul 2023 13:41:13 -0400 Subject: [PATCH 089/159] Factor out CheckFabricInfo test helper into a separate header. (#28411) This way we can use it from multiple test files if needed. --- .../Framework/CHIPTests/MTRFabricInfoTests.m | 42 +------------ .../TestHelpers/MTRFabricInfoChecker.h | 24 ++++++++ .../TestHelpers/MTRFabricInfoChecker.m | 59 +++++++++++++++++++ .../Matter.xcodeproj/project.pbxproj | 6 ++ 4 files changed, 90 insertions(+), 41 deletions(-) create mode 100644 src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h create mode 100644 src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m diff --git a/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m b/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m index 23deb27d90422c..a98067098688b5 100644 --- a/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m +++ b/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m @@ -19,53 +19,13 @@ // system dependencies #import +#import "MTRFabricInfoChecker.h" #import "MTRTestKeys.h" #import "MTRTestStorage.h" static uint16_t kTestVendorId1 = 0xFFF1u; static uint16_t kTestVendorId2 = 0xFFF2u; -void CheckFabricInfo(NSArray * fabricInfoList, NSMutableSet * expectedSet) -{ - XCTAssertEqual([fabricInfoList count], [expectedSet count]); - for (size_t i = 0; i < [fabricInfoList count]; ++i) { - __auto_type * info = fabricInfoList[i]; - NSSet * expectedInfoForIndex = [expectedSet objectsPassingTest:^(NSDictionary * obj, BOOL * stop) { - return [info.fabricIndex isEqual:obj[@"fabricIndex"]]; - }]; - XCTAssertEqual([expectedInfoForIndex count], 1); - __auto_type * expected = [expectedInfoForIndex anyObject]; - XCTAssertEqualObjects(info.rootPublicKey, expected[@"rootPublicKey"]); - XCTAssertEqualObjects(info.vendorID, expected[@"vendorID"]); - XCTAssertEqualObjects(info.fabricID, expected[@"fabricID"]); - XCTAssertEqualObjects(info.nodeID, expected[@"nodeID"]); - XCTAssertEqualObjects(info.label, expected[@"label"]); - XCTAssertNotNil(info.rootCertificate); - XCTAssertNotNil(info.rootCertificateTLV); - XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.rootCertificate], info.rootCertificateTLV); - XCTAssertEqualObjects([MTRCertificates convertMatterCertificate:info.rootCertificateTLV], info.rootCertificate); - XCTAssertEqual((info.intermediateCertificate == nil), (info.intermediateCertificateTLV == nil)); - XCTAssertEqualObjects(@(info.intermediateCertificate != nil), expected[@"hasIntermediateCertificate"]); - if (info.intermediateCertificate != nil) { - XCTAssertEqualObjects( - [MTRCertificates convertX509Certificate:info.intermediateCertificate], info.intermediateCertificateTLV); - XCTAssertEqualObjects( - [MTRCertificates convertMatterCertificate:info.intermediateCertificateTLV], info.intermediateCertificate); - } - XCTAssertNotNil(info.operationalCertificate); - XCTAssertNotNil(info.operationalCertificateTLV); - XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.operationalCertificate], info.operationalCertificateTLV); - XCTAssertEqualObjects( - [MTRCertificates convertMatterCertificate:info.operationalCertificateTLV], info.operationalCertificate); - __auto_type * certInfo = [[MTRCertificateInfo alloc] initWithTLVBytes:info.operationalCertificateTLV]; - XCTAssertNotNil(certInfo); - XCTAssertEqualObjects(certInfo.subject.nodeID, info.nodeID); - XCTAssertEqualObjects(certInfo.subject.fabricID, info.fabricID); - XCTAssertEqualObjects(info.fabricIndex, expected[@"fabricIndex"]); - [expectedSet removeObject:expected]; - } -} - @interface MTRFabricInfoTests : XCTestCase @end diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h new file mode 100644 index 00000000000000..53dc3d2ef363b0 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h @@ -0,0 +1,24 @@ +/** + * 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. + */ + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +void CheckFabricInfo(NSArray * fabricInfoList, NSMutableSet * expectedSet); + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m new file mode 100644 index 00000000000000..c4a1a66f044fee --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m @@ -0,0 +1,59 @@ +/** + * 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. + */ + +#import "MTRFabricInfoChecker.h" +#import + +void CheckFabricInfo(NSArray * fabricInfoList, NSMutableSet * expectedSet) +{ + XCTAssertEqual([fabricInfoList count], [expectedSet count]); + for (size_t i = 0; i < [fabricInfoList count]; ++i) { + __auto_type * info = fabricInfoList[i]; + NSSet * expectedInfoForIndex = [expectedSet objectsPassingTest:^(NSDictionary * obj, BOOL * stop) { + return [info.fabricIndex isEqual:obj[@"fabricIndex"]]; + }]; + XCTAssertEqual([expectedInfoForIndex count], 1); + __auto_type * expected = [expectedInfoForIndex anyObject]; + XCTAssertEqualObjects(info.rootPublicKey, expected[@"rootPublicKey"]); + XCTAssertEqualObjects(info.vendorID, expected[@"vendorID"]); + XCTAssertEqualObjects(info.fabricID, expected[@"fabricID"]); + XCTAssertEqualObjects(info.nodeID, expected[@"nodeID"]); + XCTAssertEqualObjects(info.label, expected[@"label"]); + XCTAssertNotNil(info.rootCertificate); + XCTAssertNotNil(info.rootCertificateTLV); + XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.rootCertificate], info.rootCertificateTLV); + XCTAssertEqualObjects([MTRCertificates convertMatterCertificate:info.rootCertificateTLV], info.rootCertificate); + XCTAssertEqual((info.intermediateCertificate == nil), (info.intermediateCertificateTLV == nil)); + XCTAssertEqualObjects(@(info.intermediateCertificate != nil), expected[@"hasIntermediateCertificate"]); + if (info.intermediateCertificate != nil) { + XCTAssertEqualObjects( + [MTRCertificates convertX509Certificate:info.intermediateCertificate], info.intermediateCertificateTLV); + XCTAssertEqualObjects( + [MTRCertificates convertMatterCertificate:info.intermediateCertificateTLV], info.intermediateCertificate); + } + XCTAssertNotNil(info.operationalCertificate); + XCTAssertNotNil(info.operationalCertificateTLV); + XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.operationalCertificate], info.operationalCertificateTLV); + XCTAssertEqualObjects( + [MTRCertificates convertMatterCertificate:info.operationalCertificateTLV], info.operationalCertificate); + __auto_type * certInfo = [[MTRCertificateInfo alloc] initWithTLVBytes:info.operationalCertificateTLV]; + XCTAssertNotNil(certInfo); + XCTAssertEqualObjects(certInfo.subject.nodeID, info.nodeID); + XCTAssertEqualObjects(certInfo.subject.fabricID, info.fabricID); + XCTAssertEqualObjects(info.fabricIndex, expected[@"fabricIndex"]); + [expectedSet removeObject:expected]; + } +} diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 8dc126d5e24f2a..fea8bd9966ac2a 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -173,6 +173,7 @@ 51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C252740CB32008D5055 /* MTRStructsObjc.mm */; }; 51B22C2A2740CB47008D5055 /* MTRCommandPayloadsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C292740CB47008D5055 /* MTRCommandPayloadsObjc.mm */; }; 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C8E3F72825CDB600D47D00 /* MTRTestKeys.m */; }; + 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */; }; 51D10D2E2808E2CA00E8CA3D /* MTRTestStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 51D10D2D2808E2CA00E8CA3D /* MTRTestStorage.m */; }; 51E0310027EA20D20083DC9C /* MTRControllerAccessControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */; }; 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */; }; @@ -477,6 +478,8 @@ 51B22C252740CB32008D5055 /* MTRStructsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRStructsObjc.mm; sourceTree = ""; }; 51B22C292740CB47008D5055 /* MTRCommandPayloadsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCommandPayloadsObjc.mm; sourceTree = ""; }; 51C8E3F72825CDB600D47D00 /* MTRTestKeys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestKeys.m; sourceTree = ""; }; + 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRFabricInfoChecker.m; sourceTree = ""; }; + 51C984612A61CE2A00B0AD9A /* MTRFabricInfoChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFabricInfoChecker.h; sourceTree = ""; }; 51D10D2D2808E2CA00E8CA3D /* MTRTestStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestStorage.m; sourceTree = ""; }; 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerAccessControl.h; sourceTree = ""; }; 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRControllerAccessControl.mm; sourceTree = ""; }; @@ -947,6 +950,8 @@ 1E748B3828941A44008A1BE8 /* MTRTestOTAProvider.m */, 51742B4829CB5F45009974FE /* MTRTestResetCommissioneeHelper.h */, 51742B4929CB5FC0009974FE /* MTRTestResetCommissioneeHelper.m */, + 51C984612A61CE2A00B0AD9A /* MTRFabricInfoChecker.h */, + 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */, ); path = TestHelpers; sourceTree = ""; @@ -1536,6 +1541,7 @@ 7596A8512878709F004DAE0E /* MTRAsyncCallbackQueueTests.m in Sources */, 997DED1A26955D0200975E97 /* MTRThreadOperationalDatasetTests.mm in Sources */, 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */, + 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */, 99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */, 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */, 5A6FEC9D27B5E48900F25F42 /* MTRXPCProtocolTests.m in Sources */, From dc3aef70be055cff164dd2b32678f99aae937dc4 Mon Sep 17 00:00:00 2001 From: Jaehoon-You <55170115+Jaehoon-You@users.noreply.github.com> Date: Tue, 1 Aug 2023 03:28:21 +0900 Subject: [PATCH 090/159] virtual-device-app: Add android service for managing app server (#28399) Signed-off-by: Jaehoon You Signed-off-by: Charles Kim --- .../App/app/src/main/AndroidManifest.xml | 2 + .../res/drawable/ic_launcher_background.xml | 0 .../res/drawable/ic_launcher_foreground.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin .../app/core/matter/MatterAppService.kt | 92 ++++++++++++++++++ .../core/matter/MatterAppServiceConstants.kt | 10 ++ 17 files changed, 104 insertions(+) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/drawable/ic_launcher_background.xml (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/drawable/ic_launcher_foreground.xml (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-hdpi/ic_launcher_round.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-mdpi/ic_launcher_round.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename examples/virtual-device-app/android/App/{app => core/common}/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) create mode 100644 examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt create mode 100644 examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt diff --git a/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml index a57ddde21a56eb..b971d9fb375a99 100644 --- a/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml +++ b/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_background.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_foreground.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_foreground.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_foreground.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt new file mode 100644 index 00000000000000..0bcbee73e5fcd2 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt @@ -0,0 +1,92 @@ +package com.matter.virtual.device.app.core.matter + +import android.app.Notification +import android.app.NotificationChannel +import android.app.NotificationManager +import android.app.Service +import android.content.Intent +import android.os.Build +import android.os.IBinder +import androidx.core.app.NotificationCompat +import dagger.hilt.android.AndroidEntryPoint +import timber.log.Timber + +@AndroidEntryPoint +class MatterAppService : Service() { + + override fun onCreate() { + super.onCreate() + Timber.d("onCreate()") + } + + override fun onDestroy() { + super.onDestroy() + Timber.d("onDestroy()") + } + + override fun onBind(intent: Intent?): IBinder? { + Timber.d("onBind()") + return null + } + + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { + Timber.d("Hit") + + intent?.let { + when (it.action) { + MatterAppServiceConstants.ACTION_START_MATTER_APP_SERVICE -> { + Timber.i("Start matter app service") + startService() + } + MatterAppServiceConstants.ACTION_STOP_MATTER_APP_SERVICE -> { + Timber.i("Stop matter app service") + stopService() + } + else -> {} + } + } + + return START_REDELIVER_INTENT + } + + private fun createNotificationChannel() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + val notificationChannel = + NotificationChannel( + MatterAppServiceConstants.NOTIFICATION_CHANNEL_ID, + MatterAppServiceConstants.NOTIFICATION_CHANNEL_NAME, + NotificationManager.IMPORTANCE_DEFAULT + ) + + val manager = getSystemService(NotificationManager::class.java) + manager?.createNotificationChannel(notificationChannel) + } + } + + private fun cancelNotificationChannel() { + val manager = getSystemService(NotificationManager::class.java) + manager?.cancel(MatterAppServiceConstants.NOTIFICATION_FOREGROUND_ID) + } + + private fun startService() { + Timber.d("Hit") + + createNotificationChannel() + + val notification: Notification = + NotificationCompat.Builder(this, MatterAppServiceConstants.NOTIFICATION_CHANNEL_ID) + .setContentTitle("MatterApp Service") + .setContentText("MatterApp is running") + .setSmallIcon(R.mipmap.ic_launcher) + .build() + + startForeground(MatterAppServiceConstants.NOTIFICATION_FOREGROUND_ID, notification) + } + + private fun stopService() { + Timber.d("Hit") + cancelNotificationChannel() + stopForeground(true) + stopSelf() + } +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt new file mode 100644 index 00000000000000..bcee27164c17de --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt @@ -0,0 +1,10 @@ +package com.matter.virtual.device.app.core.matter + +object MatterAppServiceConstants { + const val ACTION_START_MATTER_APP_SERVICE = "ACTION_START_MATTER_APP_SERVICE" + const val ACTION_STOP_MATTER_APP_SERVICE = "ACTION_STOP_MATTER_APP_SERVICE" + + const val NOTIFICATION_CHANNEL_ID = "VIRTUAL_DEVICE" + const val NOTIFICATION_FOREGROUND_ID = 1 + const val NOTIFICATION_CHANNEL_NAME = "Matter App" +} From 46e5bb2c80d93d0eba74bfe417d9ff5be218a384 Mon Sep 17 00:00:00 2001 From: chulspro Date: Tue, 1 Aug 2023 03:29:10 +0900 Subject: [PATCH 091/159] Add reset api for android app server (#28398) Signed-off-by: Jaehoon You Signed-off-by: Charles Kim Co-authored-by: Jaehoon You --- .../matter/virtual/device/app/core/matter/MatterApp.kt | 4 ++++ src/app/server/java/AndroidAppServerWrapper.cpp | 5 +++++ src/app/server/java/AndroidAppServerWrapper.h | 2 ++ src/app/server/java/CHIPAppServer-JNI.cpp | 8 ++++++++ src/app/server/java/src/chip/appserver/ChipAppServer.java | 2 ++ 5 files changed, 21 insertions(+) diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt index 19d73cced0f04b..3b38261bf85496 100644 --- a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt @@ -45,4 +45,8 @@ class MatterApp @Inject constructor() { fun stop() { chipAppServer?.stopApp() } + + fun reset() { + chipAppServer?.resetApp() + } } diff --git a/src/app/server/java/AndroidAppServerWrapper.cpp b/src/app/server/java/AndroidAppServerWrapper.cpp index ab88729d6f1d9b..69436b17641d55 100644 --- a/src/app/server/java/AndroidAppServerWrapper.cpp +++ b/src/app/server/java/AndroidAppServerWrapper.cpp @@ -80,3 +80,8 @@ void ChipAndroidAppShutdown(void) chip::Server::GetInstance().Shutdown(); chip::Platform::MemoryShutdown(); } + +void ChipAndroidAppReset(void) +{ + chip::Server::GetInstance().ScheduleFactoryReset(); +} diff --git a/src/app/server/java/AndroidAppServerWrapper.h b/src/app/server/java/AndroidAppServerWrapper.h index 19088b9913ada1..8b09579185a773 100644 --- a/src/app/server/java/AndroidAppServerWrapper.h +++ b/src/app/server/java/AndroidAppServerWrapper.h @@ -25,6 +25,8 @@ CHIP_ERROR ChipAndroidAppInit(AppDelegate * appDelegate = nullptr); void ChipAndroidAppShutdown(void); +void ChipAndroidAppReset(void); + jint AndroidAppServerJNI_OnLoad(JavaVM * jvm, void * reserved); void AndroidAppServerJNI_OnUnload(JavaVM * jvm, void * reserved); diff --git a/src/app/server/java/CHIPAppServer-JNI.cpp b/src/app/server/java/CHIPAppServer-JNI.cpp index 1b486f1bd3ac82..2fd6aa8dbb516c 100644 --- a/src/app/server/java/CHIPAppServer-JNI.cpp +++ b/src/app/server/java/CHIPAppServer-JNI.cpp @@ -165,6 +165,14 @@ JNI_METHOD(jboolean, stopApp)(JNIEnv * env, jobject self) return JNI_TRUE; } +JNI_METHOD(jboolean, resetApp)(JNIEnv * env, jobject self) +{ + chip::DeviceLayer::StackLock lock; + ChipAndroidAppReset(); + + return JNI_TRUE; +} + void * IOThreadAppMain(void * arg) { JNIEnv * env; diff --git a/src/app/server/java/src/chip/appserver/ChipAppServer.java b/src/app/server/java/src/chip/appserver/ChipAppServer.java index e501329085522f..3d947081df4cfb 100644 --- a/src/app/server/java/src/chip/appserver/ChipAppServer.java +++ b/src/app/server/java/src/chip/appserver/ChipAppServer.java @@ -39,4 +39,6 @@ public ChipFabricProvider getFabricProvider() { public native boolean startAppWithDelegate(ChipAppServerDelegate appDelegate); public native boolean stopApp(); + + public native boolean resetApp(); } From dc59a151ff97ad80784c698a1b83fec6f66cec98 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 31 Jul 2023 14:38:42 -0400 Subject: [PATCH 092/159] Add missing validity checks to GroupKeyManagement cluster (#28379) * Add missing validity checks to GroupKeyManagement cluster Problem: - GroupKeyManagement cluster did not enforce length checks on EpochKey0/1/2 - Some corner cases of checks were not covered. - Spec fixed in https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/7342 - Fixes #28222 This PR: - Adds all the missing checks that spec updates imply - Adds tests for each of the individual checks - Adds improved logging for failures Testing done: - New integration tests added - Integration tests pass * Restyled by clang-format * Restyled by prettier-yaml * Add revision 2 * Fix revision 2 setting * Address comments from @bzbarsky-apple * Fix unit test * Restyled by clang-format * ZAP regen --------- Co-authored-by: tennessee.carmelveilleux@gmail.com Co-authored-by: Restyled.io --- src/app/CommandHandler.cpp | 15 + src/app/CommandHandler.h | 5 + .../group-key-mgmt-server.cpp | 181 ++- .../suites/TestGroupKeyManagementCluster.yaml | 339 ++++++ .../tests/data_model/TestCommands.cpp | 7 +- .../chip-tool/zap-generated/test/Commands.h | 902 ++++++++++---- .../zap-generated/test/Commands.h | 1078 ++++++++++++++--- 7 files changed, 2092 insertions(+), 435 deletions(-) diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 29abc1f321a9bd..14ad098965f5e5 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -470,6 +470,21 @@ CHIP_ERROR CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, c return AddStatusInternal(aCommandPath, StatusIB(aStatus)); } +CHIP_ERROR CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Status aStatus, + const char * aMessage) +{ + if (aStatus != Status::Success) + { + ChipLogError(DataManagement, + "Failed to handle on Endpoint=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI + " with " ChipLogFormatIMStatus ": %s", + aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueIMStatus(aStatus), aMessage); + } + + return AddStatus(aCommandPath, aStatus); +} + CHIP_ERROR CommandHandler::AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus) { return AddStatusInternal(aCommandPath, StatusIB(Status::Success, aClusterStatus)); diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index cc175a9a125cd8..e2d2f4a6f75e1e 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -172,6 +172,11 @@ class CommandHandler : public Messaging::ExchangeDelegate System::PacketBufferHandle && payload, bool isTimedInvoke); CHIP_ERROR AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus); + // Same as AddStatus, but logs that the command represented by aCommandPath failed with the given + // error status and error message, if aStatus is an error. + CHIP_ERROR AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, + const char * aMessage); + CHIP_ERROR AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus); CHIP_ERROR AddClusterSpecificFailure(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus); diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 9f29d0b25a6966..8edf8810f70c4b 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -111,6 +111,7 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface // TODO: Once there is MCSP support, this may need to change. static constexpr bool IsMCSPSupported() { return false; } + static constexpr uint16_t kImplementedClusterRevision = 2; CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override { @@ -119,7 +120,7 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface switch (aPath.mAttributeId) { case GroupKeyManagement::Attributes::ClusterRevision::Id: - return ReadClusterRevision(aPath.mEndpointId, aEncoder); + return aEncoder.Encode(kImplementedClusterRevision); case Attributes::FeatureMap::Id: { uint32_t features = 0; if (IsMCSPSupported()) @@ -285,6 +286,121 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface } }; +Status +ValidateKeySetWriteArguments(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) +{ + // SPEC: If the EpochKey0 field is null or its associated EpochStartTime0 field is null, then this command SHALL fail with an + // INVALID_COMMAND status code responded to the client. + if (commandData.groupKeySet.epochKey0.IsNull() || commandData.groupKeySet.epochStartTime0.IsNull()) + { + return Status::InvalidCommand; + } + + // SPEC: If the EpochStartTime0 is set to 0, then this command SHALL fail with an INVALID_COMMAND status code responded to the + // client. + if (0 == commandData.groupKeySet.epochStartTime0.Value()) + { + return Status::InvalidCommand; + } + + // By now we at least have epochKey0. + static_assert(GroupDataProvider::EpochKey::kLengthBytes == 16, + "Expect EpochKey internal data structure to have a length of 16 bytes."); + + // SPEC: If the EpochKey0 field's length is not exactly 16 bytes, then this command SHALL fail with a CONSTRAINT_ERROR status + // code responded to the client. + if (commandData.groupKeySet.epochKey0.Value().size() != GroupDataProvider::EpochKey::kLengthBytes) + { + return Status::ConstraintError; + } + + // Already known to be false by now + bool epoch_key0_is_null = false; + uint64_t epoch_start_time0 = commandData.groupKeySet.epochStartTime0.Value(); + + bool epoch_key1_is_null = commandData.groupKeySet.epochKey1.IsNull(); + bool epoch_start_time1_is_null = commandData.groupKeySet.epochStartTime1.IsNull(); + + uint64_t epoch_start_time1 = 0; // Will be overridden when known to be present. + + // SPEC: If exactly one of the EpochKey1 or EpochStartTime1 is null, rather than both being null, or neither being null, then + // this command SHALL fail with an INVALID_COMMAND status code responded to the client. + if (epoch_key1_is_null != epoch_start_time1_is_null) + { + return Status::InvalidCommand; + } + + if (!epoch_key1_is_null) + { + // SPEC: If the EpochKey1 field is not null, then the EpochKey0 field SHALL NOT be null. Otherwise this command SHALL fail + // with an INVALID_COMMAND status code responded to the client. + if (epoch_key0_is_null) + { + return Status::InvalidCommand; + } + + // SPEC: If the EpochKey1 field is not null, and the field's length is not exactly 16 bytes, then this command SHALL fail + // with a CONSTRAINT_ERROR status code responded to the client. + if (commandData.groupKeySet.epochKey1.Value().size() != GroupDataProvider::EpochKey::kLengthBytes) + { + return Status::ConstraintError; + } + + // By now, if EpochKey1 was present, we know EpochStartTime1 was also present. + epoch_start_time1 = commandData.groupKeySet.epochStartTime1.Value(); + + // SPEC: If the EpochKey1 field is not null, its associated EpochStartTime1 field SHALL NOT be null and SHALL contain a + // later epoch start time than the epoch start time found in the EpochStartTime0 field. Otherwise this command SHALL fail + // with an INVALID_COMMAND status code responded to the client. + bool epoch1_later_than_epoch0 = epoch_start_time1 > epoch_start_time0; + if (!epoch1_later_than_epoch0) + { + return Status::InvalidCommand; + } + } + + bool epoch_key2_is_null = commandData.groupKeySet.epochKey2.IsNull(); + bool epoch_start_time2_is_null = commandData.groupKeySet.epochStartTime2.IsNull(); + + // SPEC: If exactly one of the EpochKey2 or EpochStartTime2 is null, rather than both being null, or neither being null, then + // this command SHALL fail with an INVALID_COMMAND status code responded to the client. + if (epoch_key2_is_null != epoch_start_time2_is_null) + { + return Status::InvalidCommand; + } + + if (!epoch_key2_is_null) + { + // SPEC: If the EpochKey2 field is not null, then the EpochKey1 and EpochKey0 fields SHALL NOT be null. Otherwise this + // command SHALL fail with an INVALID_COMMAND status code responded to the client. + if (epoch_key0_is_null || epoch_key1_is_null) + { + return Status::InvalidCommand; + } + + // SPEC: If the EpochKey2 field is not null, and the field's length is not exactly 16 bytes, then this command SHALL fail + // with a CONSTRAINT_ERROR status code responded to the client. + if (commandData.groupKeySet.epochKey2.Value().size() != GroupDataProvider::EpochKey::kLengthBytes) + { + return Status::ConstraintError; + } + + // By now, if EpochKey2 was present, we know EpochStartTime2 was also present. + uint64_t epoch_start_time2 = commandData.groupKeySet.epochStartTime2.Value(); + + // SPEC: If the EpochKey2 field is not null, its associated EpochStartTime2 field SHALL NOT be null and SHALL contain a + // later epoch start time than the epoch start time found in the EpochStartTime1 field. Otherwise this command SHALL fail + // with an INVALID_COMMAND status code responded to the client. + bool epoch2_later_than_epoch1 = epoch_start_time2 > epoch_start_time1; + if (!epoch2_later_than_epoch1) + { + return Status::InvalidCommand; + } + } + + return Status::Success; +} + constexpr uint16_t GroupKeyManagementAttributeAccess::kClusterRevision; GroupKeyManagementAttributeAccess gAttribute; @@ -304,12 +420,20 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) { - if (commandData.groupKeySet.epochKey0.IsNull() || commandData.groupKeySet.epochStartTime0.IsNull() || - commandData.groupKeySet.epochKey0.Value().empty() || (0 == commandData.groupKeySet.epochStartTime0.Value())) + auto provider = GetGroupDataProvider(); + auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); + + if (nullptr == provider || nullptr == fabric) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on provider/fabric"); + return true; + } + + // Pre-validate all complex data dependency assumptions about the epoch keys + Status status = ValidateKeySetWriteArguments(commandData); + if (status != Status::Success) { - // If the EpochKey0 field is null or its associated EpochStartTime0 field is null, - // then this command SHALL fail with an INVALID_COMMAND - commandObj->AddStatus(commandPath, Status::InvalidCommand); + commandObj->AddStatusAndLogIfFailure(commandPath, status, "Failure to validate KeySet data dependencies."); return true; } @@ -319,7 +443,8 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // supported by the server, because it is ... a new value unrecognized // by a legacy server, then the server SHALL generate a general // constraint error - commandObj->AddStatus(commandPath, Status::ConstraintError); + commandObj->AddStatusAndLogIfFailure(commandPath, Status::ConstraintError, + "Received unknown GroupKeySecurityPolicyEnum value"); return true; } @@ -330,28 +455,25 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // any action attempting to set CacheAndSync in the // GroupKeySecurityPolicy field SHALL fail with an INVALID_COMMAND // error. - commandObj->AddStatus(commandPath, Status::InvalidCommand); + commandObj->AddStatusAndLogIfFailure(commandPath, Status::InvalidCommand, + "Received a CacheAndSync GroupKeySecurityPolicyEnum when MCSP not supported"); return true; } + // All flight checks completed: by now we know that non-null keys are all valid and correct size. + bool epoch_key1_present = !commandData.groupKeySet.epochKey1.IsNull(); + bool epoch_key2_present = !commandData.groupKeySet.epochKey2.IsNull(); + GroupDataProvider::KeySet keyset(commandData.groupKeySet.groupKeySetID, commandData.groupKeySet.groupKeySecurityPolicy, 0); - // Epoch Key 0 + // Epoch Key 0 always present keyset.epoch_keys[0].start_time = commandData.groupKeySet.epochStartTime0.Value(); memcpy(keyset.epoch_keys[0].key, commandData.groupKeySet.epochKey0.Value().data(), GroupDataProvider::EpochKey::kLengthBytes); keyset.num_keys_used++; // Epoch Key 1 - if (!commandData.groupKeySet.epochKey1.IsNull()) + if (epoch_key1_present) { - if (commandData.groupKeySet.epochStartTime1.IsNull() || - commandData.groupKeySet.epochStartTime1.Value() <= commandData.groupKeySet.epochStartTime0.Value()) - { - // If the EpochKey1 field is not null, its associated EpochStartTime1 field SHALL contain - // a later epoch start time than the epoch start time found in the EpochStartTime0 field. - commandObj->AddStatus(commandPath, Status::InvalidCommand); - return true; - } keyset.epoch_keys[1].start_time = commandData.groupKeySet.epochStartTime1.Value(); memcpy(keyset.epoch_keys[1].key, commandData.groupKeySet.epochKey1.Value().data(), GroupDataProvider::EpochKey::kLengthBytes); @@ -359,33 +481,14 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( } // Epoch Key 2 - if (!commandData.groupKeySet.epochKey2.IsNull()) + if (epoch_key2_present) { - if (commandData.groupKeySet.epochKey1.IsNull() || commandData.groupKeySet.epochStartTime2.IsNull() || - commandData.groupKeySet.epochStartTime2.Value() <= commandData.groupKeySet.epochStartTime1.Value()) - { - // If the EpochKey2 field is not null then: - // * The EpochKey1 field SHALL NOT be null - // * Its associated EpochStartTime1 field SHALL contain a later epoch start time - // than the epoch start time found in the EpochStartTime0 field. - commandObj->AddStatus(commandPath, Status::InvalidCommand); - return true; - } keyset.epoch_keys[2].start_time = commandData.groupKeySet.epochStartTime2.Value(); memcpy(keyset.epoch_keys[2].key, commandData.groupKeySet.epochKey2.Value().data(), GroupDataProvider::EpochKey::kLengthBytes); keyset.num_keys_used++; } - auto provider = GetGroupDataProvider(); - auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); - - if (nullptr == provider || nullptr == fabric) - { - commandObj->AddStatus(commandPath, Status::Failure); - return true; - } - uint8_t compressed_fabric_id_buffer[sizeof(uint64_t)]; MutableByteSpan compressed_fabric_id(compressed_fabric_id_buffer); CHIP_ERROR err = fabric->GetCompressedFabricIdBytes(compressed_fabric_id); @@ -403,7 +506,7 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( } else { - ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite: %s", err.AsString()); + ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite: %" CHIP_ERROR_FORMAT, err.Format()); } // Send response diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index bc1091050d828a..034bdfd0a9a7b5 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -74,6 +74,345 @@ tests: constraints: minValue: 3 + # TODO(#28396): Re-enabled when CI wouldn't break on this syntax + # + # command: "readAttribute" + # attribute: "ClusterRevision" + # response: + # saveAs: ClusterRevisionValue + # constraints: + # minValue: 1 + # maxValue: 2 + # type: int16u + + # - label: "Creates a new variable to hold if the cluster revision is == 2" + # cluster: EqualityCommands + # command: UnsignedNumberEquals + # arguments: + # values: + # - name: Value1 + # value: ClusterRevisionValue + # - name: Value2 + # value: 2 + # response: + # - values: + # - name: Equals + # saveAs: ClusterIsRevision2 + + ########### KeySetWrite Epoch0 field validations + - label: "KeySetWrite with EpochKey0 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 1110000, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: "KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: null, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 0, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochKey0 with length 1 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochKey0 with length 0 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + ########### KeySetWrite Epoch1 field validations + - label: "KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: "KeySetWrite with EpochKey1 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: null, + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochKey1 with length 1 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0", + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochKey1 with length 0 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "", + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochStartTime1 not later than EpochStart0 fails + with INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + ########### KeySetWrite Epoch2 field validations + - label: "KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND" + command: "KeySetWrite" + # runIf: ClusterIsRevision2 + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: "KeySetWrite with EpochKey2 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: 1110002, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochKey2 with length 1 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xc0", + EpochStartTime2: 1110002, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochKey2 with length 0 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "", + EpochStartTime2: 1110002, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochStartTime2 not later than EpochStart1 fails + with INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 100, + } + response: + error: INVALID_COMMAND + + ################ Rest of normal checks for KeySetWrite - label: "KeySet Write 1" command: "KeySetWrite" arguments: diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index 5714cc0f9877a7..f9d1e35a900b73 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -85,8 +85,8 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip if (DataModel::Decode(aReader, dataRequest) != CHIP_NO_ERROR) { - ChipLogError(Controller, "Unable to decode the request"); - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); + apCommandObj->AddStatusAndLogIfFailure(aCommandPath, Protocols::InteractionModel::Status::Failure, + "Unable to decode the request"); return; } @@ -120,7 +120,8 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip // test is not really testing what it should. for (size_t i = 0; i < 4; ++i) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Success); + apCommandObj->AddStatusAndLogIfFailure(aCommandPath, Protocols::InteractionModel::Status::Success, + "No error but testing AddStatusAndLogIfFailure in success case"); } // And one failure on the end. apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7caa48359ca68f..7198be4927de21 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -113404,7 +113404,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 48, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 63, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113471,21 +113471,66 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -113506,7 +113551,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 1110002ULL)); } break; - case 12: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType value; @@ -113516,19 +113561,19 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 0U)); } break; - case 13: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 14: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 15: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113557,7 +113602,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 18: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113602,7 +113647,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 19: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113631,7 +113676,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 20: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113676,7 +113721,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 21: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113685,7 +113730,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 22: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113694,7 +113739,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 23: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113703,7 +113748,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 24: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113712,7 +113757,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 25: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113721,7 +113766,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 26: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113790,7 +113835,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 27: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113873,7 +113918,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 28: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113900,7 +113945,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 29: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113983,13 +114028,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 30: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 32: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114010,7 +114055,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 33: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114031,7 +114076,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 34: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -114040,7 +114085,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 35: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114095,10 +114140,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 36: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114111,28 +114156,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 38: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 39: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 40: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 41: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 42: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114149,10 +114194,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 46: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 47: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114224,34 +114269,20 @@ class TestGroupKeyManagementClusterSuite : public TestCommand GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "KeySet Write 1"); + LogStep(6, "KeySetWrite with EpochKey0 null fails INVALID_COMMAND"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; value.groupKeySet.groupKeySetID = 417U; value.groupKeySet.groupKeySecurityPolicy = static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); + value.groupKeySet.epochKey0.SetNull(); value.groupKeySet.epochStartTime0.SetNonNull(); value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional @@ -114259,35 +114290,23 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 7: { - LogStep(7, "KeySet Write 2 CacheAndSync"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - value.groupKeySet.groupKeySetID = 418U; + value.groupKeySet.groupKeySetID = 417U; value.groupKeySet.groupKeySecurityPolicy = - static_cast(1); + static_cast(0); value.groupKeySet.epochKey0.SetNonNull(); value.groupKeySet.epochKey0.Value() = chip::ByteSpan( chip::Uint8::from_const_char( - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + value.groupKeySet.epochStartTime0.SetNull(); + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional @@ -114295,35 +114314,24 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 8: { - LogStep(8, "KeySet Write 2 TrustFirst"); - VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - value.groupKeySet.groupKeySetID = 418U; + value.groupKeySet.groupKeySetID = 417U; value.groupKeySet.groupKeySecurityPolicy = static_cast(0); value.groupKeySet.epochKey0.SetNonNull(); value.groupKeySet.epochKey0.Value() = chip::ByteSpan( chip::Uint8::from_const_char( - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), 16); value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + value.groupKeySet.epochStartTime0.Value() = 0ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional @@ -114331,85 +114339,545 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 9: { - LogStep(9, "KeySet Write 3 CacheAndSync"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySetID = 417U; value.groupKeySet.groupKeySecurityPolicy = - static_cast(1); + static_cast(0); value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), - 16); + value.groupKeySet.epochKey0.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("\240garbage: not in length on purpose"), 1); value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + value.groupKeySet.epochStartTime0.Value() = 1ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); - return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, - value, chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional ); } case 10: { - LogStep(10, "KeySet Write 3 TrustFirst"); - VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 11: { + LogStep(11, "KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; value.groupKeySet.groupKeySecurityPolicy = static_cast(0); value.groupKeySet.epochKey0.SetNonNull(); value.groupKeySet.epochKey0.Value() = chip::ByteSpan( chip::Uint8::from_const_char( - "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), 16); value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; value.groupKeySet.epochKey1.SetNonNull(); value.groupKeySet.epochKey1.Value() = chip::ByteSpan( chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); - return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, - value, chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "KeySet Read"); + case 12: { + LogStep(12, "KeySetWrite with EpochKey1 null fails INVALID_COMMAND"); ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 417U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 13: { + LogStep(13, "KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("\260garbage: not in length on purpose"), 1); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 14: { + LogStep(14, "KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 15: { + LogStep(15, "KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 16: { + LogStep(16, "KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 17: { + LogStep(17, "KeySetWrite with EpochKey2 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 18: { + LogStep(18, "KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("\300garbage: not in length on purpose"), 1); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 19: { + LogStep(19, "KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 20: { + LogStep(20, "KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 100ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 21: { + LogStep(21, "KeySet Write 1"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 22: { + LogStep(22, "KeySet Write 2 CacheAndSync"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 418U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(1); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 23: { + LogStep(23, "KeySet Write 2 TrustFirst"); + VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 418U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 24: { + LogStep(24, "KeySet Write 3 CacheAndSync"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(1); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "KeySet Read All Indices"); + case 25: { + LogStep(25, "KeySet Write 3 TrustFirst"); + VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, + value, chip::NullOptional + + ); + } + case 26: { + LogStep(26, "KeySet Read"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; + value.groupKeySetID = 417U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, + value, chip::NullOptional + + ); + } + case 27: { + LogStep(27, "KeySet Read All Indices"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, @@ -114417,8 +114885,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 13: { - LogStep(13, "Write Group Keys (invalid)"); + case 28: { + LogStep(28, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114436,8 +114904,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Write Group Keys (too many)"); + case 29: { + LogStep(29, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114507,8 +114975,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "Write Group Keys on alpha"); + case 30: { + LogStep(30, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114538,8 +115006,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Write Group Keys on beta"); + case 31: { + LogStep(31, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114569,28 +115037,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 17: { - LogStep(17, "Read Group Keys on alpha"); + case 32: { + LogStep(32, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read Group Keys on alpha without fabric filtering"); + case 33: { + LogStep(33, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 19: { - LogStep(19, "Read Group Keys on beta"); + case 34: { + LogStep(34, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Read Group Keys on beta without fabric filtering"); + case 35: { + LogStep(35, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 21: { - LogStep(21, "Add Group 1"); + case 36: { + LogStep(36, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -114599,8 +115067,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 22: { - LogStep(22, "Add Group 2"); + case 37: { + LogStep(37, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -114609,8 +115077,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 23: { - LogStep(23, "Add Group 3"); + case 38: { + LogStep(38, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -114619,8 +115087,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 24: { - LogStep(24, "Add Group 4"); + case 39: { + LogStep(39, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -114629,8 +115097,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 25: { - LogStep(25, "Add Group 5"); + case 40: { + LogStep(40, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -114639,28 +115107,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 26: { - LogStep(26, "Read GroupTable from alpha"); + case 41: { + LogStep(41, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read GroupTable from alpha without fabric filtering"); + case 42: { + LogStep(42, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 28: { - LogStep(28, "Read GroupTable from beta"); + case 43: { + LogStep(43, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read GroupTable from beta without fabric filtering"); + case 44: { + LogStep(44, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 30: { - LogStep(30, "KeySet Remove 1"); + case 45: { + LogStep(45, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -114669,8 +115137,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 31: { - LogStep(31, "KeySet Read (removed)"); + case 46: { + LogStep(46, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -114679,8 +115147,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 32: { - LogStep(32, "KeySet Read (not removed) CacheAndSync"); + case 47: { + LogStep(47, "KeySet Read (not removed) CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -114690,8 +115158,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 33: { - LogStep(33, "KeySet Read (not removed) TrustFirst"); + case 48: { + LogStep(48, "KeySet Read (not removed) TrustFirst"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -114701,8 +115169,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 34: { - LogStep(34, "Remove Group 1"); + case 49: { + LogStep(49, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -114711,13 +115179,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 35: { - LogStep(35, "Read GroupTable 2"); + case 50: { + LogStep(50, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Remove All"); + case 51: { + LogStep(51, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -114725,13 +115193,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 37: { - LogStep(37, "Read GroupTable 3"); + case 52: { + LogStep(52, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "KeySet Remove 2"); + case 53: { + LogStep(53, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -114740,8 +115208,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 39: { - LogStep(39, "KeySet Read (also removed)"); + case 54: { + LogStep(54, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -114750,8 +115218,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "KeySet Write 1"); + case 55: { + LogStep(55, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114785,8 +115253,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 41: { - LogStep(41, "KeySet Write 2 CacheAndSync"); + case 56: { + LogStep(56, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114821,8 +115289,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 42: { - LogStep(42, "KeySet Write 2 TrustFirst"); + case 57: { + LogStep(57, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114857,8 +115325,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 43: { - LogStep(43, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 58: { + LogStep(58, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114884,8 +115352,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 44: { - LogStep(44, "Remove keyset 1"); + case 59: { + LogStep(59, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -114894,13 +115362,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 45: { - LogStep(45, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 60: { + LogStep(60, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Remove keyset 2"); + case 61: { + LogStep(61, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -114909,8 +115377,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 47: { - LogStep(47, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 62: { + LogStep(62, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index a7e81dca8316ac..5acafa1f5f6831 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -175716,204 +175716,272 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestReadMaxGroupKeysPerFabric_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : KeySet Write 1\n"); - err = TestKeySetWrite1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : KeySetWrite with EpochKey0 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochKey0NullFailsInvalidCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : KeySet Write 2 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2CacheAndSync_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime0NullFailsInvalidCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : KeySet Write 2 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2TrustFirst_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime0SetToZeroFailsInvalidCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : KeySet Write 3 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite3CacheAndSync_9(); + ChipLogProgress( + chipTool, " ***** Test Step 9 : KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey0WithLength116FailsWithConstraintError_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : KeySet Write 3 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite3TrustFirst_10(); + ChipLogProgress( + chipTool, " ***** Test Step 10 : KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey0WithLength016FailsWithConstraintError_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : KeySet Read\n"); - err = TestKeySetRead_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime1NullFailsInvalidCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Read All Indices\n"); - err = TestKeySetReadAllIndices_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : KeySetWrite with EpochKey1 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochKey1NullFailsInvalidCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_13(); + ChipLogProgress( + chipTool, " ***** Test Step 13 : KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey1WithLength116FailsWithConstraintError_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_14(); + ChipLogProgress( + chipTool, " ***** Test Step 14 : KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey1WithLength016FailsWithConstraintError_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_15(); + ChipLogProgress(chipTool, + " ***** Test Step 15 : KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime1NotLaterThanEpochStart0FailsWithInvalidCommand_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime2NullFailsInvalidCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : KeySetWrite with EpochKey2 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochKey2NullFailsInvalidCommand_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_18(); + ChipLogProgress( + chipTool, " ***** Test Step 18 : KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey2WithLength116FailsWithConstraintError_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_19(); + ChipLogProgress( + chipTool, " ***** Test Step 19 : KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey2WithLength016FailsWithConstraintError_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_20(); + ChipLogProgress(chipTool, + " ***** Test Step 20 : KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime2NotLaterThanEpochStart1FailsWithInvalidCommand_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Add Group 1\n"); - err = TestAddGroup1_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : KeySet Write 1\n"); + err = TestKeySetWrite1_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Add Group 2\n"); - err = TestAddGroup2_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : KeySet Write 2 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2CacheAndSync_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Add Group 3\n"); - err = TestAddGroup3_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : KeySet Write 2 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2TrustFirst_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Add Group 4\n"); - err = TestAddGroup4_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : KeySet Write 3 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite3CacheAndSync_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Add Group 5\n"); - err = TestAddGroup5_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : KeySet Write 3 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite3TrustFirst_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : KeySet Read\n"); + err = TestKeySetRead_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : KeySet Read All Indices\n"); + err = TestKeySetReadAllIndices_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : KeySet Remove 1\n"); - err = TestKeySetRemove1_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : KeySet Read (not removed) CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetReadNotRemovedCacheAndSync_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : KeySet Read (not removed) TrustFirst\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetReadNotRemovedTrustFirst_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Remove Group 1\n"); - err = TestRemoveGroup1_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read GroupTable 2\n"); - err = TestReadGroupTable2_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Remove All\n"); - err = TestRemoveAll_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Add Group 1\n"); + err = TestAddGroup1_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read GroupTable 3\n"); - err = TestReadGroupTable3_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 2\n"); + err = TestAddGroup2_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : KeySet Remove 2\n"); - err = TestKeySetRemove2_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 3\n"); + err = TestAddGroup3_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 4\n"); + err = TestAddGroup4_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : KeySet Write 1\n"); - err = TestKeySetWrite1_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 5\n"); + err = TestAddGroup5_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : KeySet Write 2 CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 41 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : KeySet Remove 1\n"); + err = TestKeySetRemove1_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (not removed) CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2CacheAndSync_41(); + err = TestKeySetReadNotRemovedCacheAndSync_47(); break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : KeySet Write 2 TrustFirst\n"); + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) TrustFirst\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetReadNotRemovedTrustFirst_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Remove Group 1\n"); + err = TestRemoveGroup1_49(); + break; + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : Read GroupTable 2\n"); + err = TestReadGroupTable2_50(); + break; + case 51: + ChipLogProgress(chipTool, " ***** Test Step 51 : Remove All\n"); + err = TestRemoveAll_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Read GroupTable 3\n"); + err = TestReadGroupTable3_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : KeySet Remove 2\n"); + err = TestKeySetRemove2_53(); + break; + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Write 1\n"); + err = TestKeySetWrite1_55(); + break; + case 56: + ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 2 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2CacheAndSync_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 TrustFirst\n"); if (ShouldSkip("!GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2TrustFirst_42(); + err = TestKeySetWrite2TrustFirst_57(); break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43(); + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58(); break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Remove keyset 1\n"); - err = TestRemoveKeyset1_44(); + case 59: + ChipLogProgress(chipTool, " ***** Test Step 59 : Remove keyset 1\n"); + err = TestRemoveKeyset1_59(); break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45(); + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60(); break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Remove keyset 2\n"); - err = TestRemoveKeyset2_46(); + case 61: + ChipLogProgress(chipTool, " ***** Test Step 61 : Remove keyset 2\n"); + err = TestRemoveKeyset2_61(); break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47(); + case 62: + ChipLogProgress(chipTool, " ***** Test Step 62 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62(); break; } @@ -175945,49 +176013,49 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176011,16 +176079,16 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176044,7 +176112,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176065,11 +176133,56 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 58: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 61: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 62: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176083,7 +176196,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 48; + const uint16_t mTestCount = 63; chip::Optional mNodeId; chip::Optional mCluster; @@ -176183,7 +176296,620 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_6() + CHIP_ERROR TestKeySetWriteWithEpochKey0NullFailsInvalidCommand_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey0 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime0NullFailsInvalidCommand_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime0SetToZeroFailsInvalidCommand_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:0ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey0WithLength116FailsWithConstraintError_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"\240" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey0WithLength016FailsWithConstraintError_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"" + length:0]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime1NullFailsInvalidCommand_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey1NullFailsInvalidCommand_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey1 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey1WithLength116FailsWithConstraintError_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"\260" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey1WithLength016FailsWithConstraintError_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"" + length:0]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime1NotLaterThanEpochStart0FailsWithInvalidCommand_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime2NullFailsInvalidCommand_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey2NullFailsInvalidCommand_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey2 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey2WithLength116FailsWithConstraintError_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"\300" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey2WithLength016FailsWithConstraintError_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"" + length:0]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime2NotLaterThanEpochStart1FailsWithInvalidCommand_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:100ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWrite1_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176223,7 +176949,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_7() + CHIP_ERROR TestKeySetWrite2CacheAndSync_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176263,7 +176989,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_8() + CHIP_ERROR TestKeySetWrite2TrustFirst_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176303,7 +177029,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite3CacheAndSync_9() + CHIP_ERROR TestKeySetWrite3CacheAndSync_24() { MTRBaseDevice * device = GetDevice("beta"); @@ -176343,7 +177069,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite3TrustFirst_10() + CHIP_ERROR TestKeySetWrite3TrustFirst_25() { MTRBaseDevice * device = GetDevice("beta"); @@ -176383,7 +177109,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRead_11() + CHIP_ERROR TestKeySetRead_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176434,7 +177160,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAllIndices_12() + CHIP_ERROR TestKeySetReadAllIndices_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176459,7 +177185,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_13() + CHIP_ERROR TestWriteGroupKeysInvalid_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176494,7 +177220,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_14() + CHIP_ERROR TestWriteGroupKeysTooMany_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176594,7 +177320,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_15() + CHIP_ERROR TestWriteGroupKeysOnAlpha_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176640,7 +177366,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_16() + CHIP_ERROR TestWriteGroupKeysOnBeta_31() { MTRBaseDevice * device = GetDevice("beta"); @@ -176686,7 +177412,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_17() + CHIP_ERROR TestReadGroupKeysOnAlpha_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176748,7 +177474,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_18() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176842,7 +177568,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_19() + CHIP_ERROR TestReadGroupKeysOnBeta_34() { MTRBaseDevice * device = GetDevice("beta"); @@ -176904,7 +177630,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_20() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_35() { MTRBaseDevice * device = GetDevice("beta"); @@ -176998,7 +177724,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_21() + CHIP_ERROR TestAddGroup1_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177030,7 +177756,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_22() + CHIP_ERROR TestAddGroup2_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177062,7 +177788,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_23() + CHIP_ERROR TestAddGroup3_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177094,7 +177820,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_24() + CHIP_ERROR TestAddGroup4_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177126,7 +177852,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_25() + CHIP_ERROR TestAddGroup5_40() { MTRBaseDevice * device = GetDevice("beta"); @@ -177158,7 +177884,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_26() + CHIP_ERROR TestReadGroupTableFromAlpha_41() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177247,7 +177973,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_27() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177351,7 +178077,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_28() + CHIP_ERROR TestReadGroupTableFromBeta_43() { MTRBaseDevice * device = GetDevice("beta"); @@ -177395,7 +178121,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_29() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_44() { MTRBaseDevice * device = GetDevice("beta"); @@ -177499,7 +178225,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_30() + CHIP_ERROR TestKeySetRemove1_45() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177522,7 +178248,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_31() + CHIP_ERROR TestKeySetReadRemoved_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177549,7 +178275,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_32() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177600,7 +178326,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_33() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177651,7 +178377,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_34() + CHIP_ERROR TestRemoveGroup1_49() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177682,7 +178408,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_35() + CHIP_ERROR TestReadGroupTable2_50() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177756,7 +178482,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_36() + CHIP_ERROR TestRemoveAll_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177774,7 +178500,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_37() + CHIP_ERROR TestReadGroupTable3_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177803,7 +178529,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_38() + CHIP_ERROR TestKeySetRemove2_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177826,7 +178552,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_39() + CHIP_ERROR TestKeySetReadAlsoRemoved_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177853,7 +178579,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_40() + CHIP_ERROR TestKeySetWrite1_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177893,7 +178619,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_41() + CHIP_ERROR TestKeySetWrite2CacheAndSync_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177933,7 +178659,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_42() + CHIP_ERROR TestKeySetWrite2TrustFirst_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177973,7 +178699,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178014,7 +178740,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_44() + CHIP_ERROR TestRemoveKeyset1_59() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178037,7 +178763,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178075,7 +178801,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_46() + CHIP_ERROR TestRemoveKeyset2_61() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178098,7 +178824,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62() { MTRBaseDevice * device = GetDevice("alpha"); From 683d5574ce9d2026f0c2056427a4b4a899f29597 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:56:10 +0000 Subject: [PATCH 093/159] Bump third_party/pigweed/repo from `f4d0b35` to `cf4291d` (#28404) * Bump third_party/pigweed/repo from `f4d0b35` to `cf4291d` Bumps [third_party/pigweed/repo](https://github.com/google/pigweed) from `f4d0b35` to `cf4291d`. - [Commits](https://github.com/google/pigweed/compare/f4d0b3563c09d945478267fcff619a959cd3e9f6...cf4291da443f5b2db18827747bb66499459de5bd) --- updated-dependencies: - dependency-name: third_party/pigweed/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Attempt to save a bit of space by not compiling unneeded app during coverage run * Split out ef32 builds to try to not run out of storage * Another update to try to reduce size of coverage output - do not build additional tools --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Litvin --- .github/workflows/examples-efr32.yaml | 26 +++++++++++++++++++++++--- scripts/build_coverage.sh | 8 +++++++- third_party/pigweed/repo | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 13f4b1d81f871d..685a641e5a552a 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -61,22 +61,42 @@ jobs: scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker rm -rf ./out/ - - name: Build some BRD4187C variants + - name: Build some BRD4187C variants (1) run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --enable-flashbundle \ - --target efr32-brd4187c-window-covering-additional_data_advertising \ --target efr32-brd4187c-thermostat-openthread_mtd \ --target efr32-brd4187c-switch-sed-shell-use_ot_coap_lib \ --target efr32-brd4187c-unit-test \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Clean out build output + run: rm -rf ./out + - name: Build some BRD4187C variants (2) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ --target efr32-brd4187c-light-use_ot_lib \ - --target efr32-brd4187c-light-rpc \ --target efr32-brd4187c-pump \ --target efr32-brd4187c-lock-rpc-shell-enable_heap_monitoring \ build \ --copy-artifacts-to out/artifacts \ " + - name: Clean out build output + run: rm -rf ./out + - name: Build BRD4187C variants (3) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4187c-window-covering-additional_data_advertising \ + --target efr32-brd4187c-light-rpc \ + build \ + --copy-artifacts-to out/artifacts \ + " - name: Prepare some bloat report from the previous builds run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ diff --git a/scripts/build_coverage.sh b/scripts/build_coverage.sh index f88129a6c94260..9e7b4a0fe8a6d6 100755 --- a/scripts/build_coverage.sh +++ b/scripts/build_coverage.sh @@ -119,7 +119,13 @@ if [ "$skip_gn" == false ]; then source "$CHIP_ROOT/scripts/activate.sh" # Generates ninja files - gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args='use_coverage=true chip_build_all_clusters_app=true' + EXTRA_GN_ARGS="" + if [[ "$TESTS" == "yaml" || "$TESTS" == "all" ]]; then + EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_all_clusters_app=true" + else + EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_tools=false" + fi + gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="use_coverage=true$EXTRA_GN_ARGS" ninja -C "$OUTPUT_ROOT" # Run unit tests diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index f4d0b3563c09d9..cf4291da443f5b 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit f4d0b3563c09d945478267fcff619a959cd3e9f6 +Subproject commit cf4291da443f5b2db18827747bb66499459de5bd From 55a1857f0afb155832a34f8d3b8048ccbc229cf4 Mon Sep 17 00:00:00 2001 From: Matt Hazley Date: Mon, 31 Jul 2023 19:58:35 +0100 Subject: [PATCH 094/159] Adding missing `descriptor` cluster in air quality devices (#28408) * Modified the devices XML to add descriptor cluster to Air Purifier and Air Quality Sensor * Added missing Descriptor cluster to air purifier chef device --- ...umiditysensor_thermostat_56de3d5f45.matter | 13 + ...r_humiditysensor_thermostat_56de3d5f45.zap | 534 +++++++++++++----- .../zcl/data-model/chip/matter-devices.xml | 2 + 3 files changed, 396 insertions(+), 153 deletions(-) diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 8219da431bdf80..95b99f4913654e 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -2034,6 +2034,19 @@ endpoint 2 { ram attribute clusterRevision default = 4; } + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster AirQuality { ram attribute airQuality default = 0; callback attribute generatedCommandList; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 33e807fc0b5906..2e1b66115e61f7 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -5478,7 +5478,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7354,7 +7354,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -7370,7 +7370,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7386,7 +7386,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7402,7 +7402,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7418,7 +7418,7 @@ "side": "server", "type": "epoch_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7434,7 +7434,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7450,7 +7450,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7466,7 +7466,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7482,7 +7482,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7498,7 +7498,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7598,7 +7598,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -7614,7 +7614,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7630,7 +7630,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7646,7 +7646,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7662,7 +7662,7 @@ "side": "server", "type": "epoch_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7678,7 +7678,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7694,7 +7694,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7710,7 +7710,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7726,7 +7726,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7742,7 +7742,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9160,7 +9160,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9176,7 +9176,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9192,7 +9192,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9208,7 +9208,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10960,7 +10960,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10970,13 +10970,241 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "", + "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": "", + "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": "", + "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": "", + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, + "defaultValue": "", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11071,7 +11299,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11152,7 +11380,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11168,7 +11396,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11184,7 +11412,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11200,7 +11428,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11364,7 +11592,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11380,7 +11608,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11396,7 +11624,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11412,7 +11640,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11576,7 +11804,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11592,7 +11820,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11608,7 +11836,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11624,7 +11852,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11900,7 +12128,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11916,7 +12144,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11932,7 +12160,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11948,7 +12176,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12224,7 +12452,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12240,7 +12468,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12256,7 +12484,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12272,7 +12500,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12548,7 +12776,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12564,7 +12792,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12580,7 +12808,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12596,7 +12824,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12872,7 +13100,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12888,7 +13116,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12904,7 +13132,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12920,7 +13148,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13196,7 +13424,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13212,7 +13440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13228,7 +13456,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13244,7 +13472,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13520,7 +13748,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13536,7 +13764,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13552,7 +13780,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13568,7 +13796,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13844,7 +14072,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13860,7 +14088,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13876,7 +14104,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13892,7 +14120,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14168,7 +14396,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14184,7 +14412,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14200,7 +14428,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14216,7 +14444,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14492,7 +14720,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14508,7 +14736,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14524,7 +14752,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14540,7 +14768,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14816,7 +15044,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14832,7 +15060,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14848,7 +15076,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14864,7 +15092,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14994,7 +15222,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15010,7 +15238,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15022,7 +15250,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15038,7 +15266,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15054,7 +15282,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15070,7 +15298,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15170,7 +15398,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15186,11 +15414,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15202,11 +15430,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15218,11 +15446,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15234,7 +15462,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15250,7 +15478,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15266,7 +15494,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15282,7 +15510,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15298,7 +15526,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15462,7 +15690,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15478,7 +15706,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15494,7 +15722,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15510,7 +15738,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15640,7 +15868,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15656,7 +15884,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15668,7 +15896,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15684,7 +15912,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15700,7 +15928,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15716,7 +15944,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15816,7 +16044,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15832,11 +16060,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15848,11 +16076,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15864,11 +16092,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15880,7 +16108,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15896,7 +16124,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15912,7 +16140,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15928,7 +16156,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15944,7 +16172,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16108,7 +16336,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16124,7 +16352,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16140,7 +16368,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16156,7 +16384,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16286,7 +16514,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16302,7 +16530,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16314,7 +16542,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16330,7 +16558,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16346,7 +16574,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16362,7 +16590,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16424,7 +16652,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16446,11 +16674,11 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16466,7 +16694,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16482,7 +16710,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16498,7 +16726,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16514,7 +16742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16578,7 +16806,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16594,7 +16822,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16610,7 +16838,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16626,7 +16854,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16642,7 +16870,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16658,7 +16886,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16674,7 +16902,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16690,7 +16918,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16706,7 +16934,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17600,7 +17828,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17616,7 +17844,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17632,7 +17860,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17648,7 +17876,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index be7b55cb5ed43e..350a52ca1c0277 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1906,6 +1906,7 @@ limitations under the License. 0x0103 0x002D + IDENTIFY_TIME IDENTIFY_TYPE @@ -1924,6 +1925,7 @@ limitations under the License. 0x0103 0x002C + IDENTIFY_TIME IDENTIFY_TYPE From 521eb16c220bfab3d9ddc439db87ab3cfb502d40 Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:14:34 -0400 Subject: [PATCH 095/159] opstate - add operational state test scripts (#28373) * add operational state scripts * use pics not pixit * address comments * address comments * address comments * clean up --- src/python_testing/TC_OPSTATE_2_1.py | 185 +++++++++++++++++++++++++++ src/python_testing/TC_OPSTATE_2_3.py | 158 +++++++++++++++++++++++ 2 files changed, 343 insertions(+) create mode 100644 src/python_testing/TC_OPSTATE_2_1.py create mode 100644 src/python_testing/TC_OPSTATE_2_3.py diff --git a/src/python_testing/TC_OPSTATE_2_1.py b/src/python_testing/TC_OPSTATE_2_1.py new file mode 100644 index 00000000000000..1b0e253f4aeb11 --- /dev/null +++ b/src/python_testing/TC_OPSTATE_2_1.py @@ -0,0 +1,185 @@ +# +# 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. +# 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 logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_OPSTATE_2_1(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.OperationalState + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def read_and_validate_opstate(self, step, expected_state): + self.print_step(step, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.OperationalState.Attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, expected_state, + "OperationalState(%s) should equal %s" % (operational_state, expected_state)) + + async def read_and_validate_operror(self, step, expected_error): + self.print_step(step, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.OperationalState.Attributes.OperationalError) + logging.info("OperationalError: %s" % (operational_error)) + asserts.assert_equal(operational_error.errorStateID, expected_error, + "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + + @async_test_body + async def test_TC_OPSTATE_2_1(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + attributes = Clusters.OperationalState.Attributes + + self.print_step(1, "Commissioning, already done") + + if self.check_pics("OPSTATE.S.A0000"): + self.print_step(2, "Read PhaseList attribute") + phase_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.PhaseList) + + if phase_list == NullValue: + logging.info("PhaseList is null") + else: + logging.info("PhaseList: %s" % (phase_list)) + + phase_list_len = len(phase_list) + + asserts.assert_less_equal(phase_list_len, 32, + "PhaseList length(%d) must be less than 32!" % phase_list_len) + + if self.check_pics("OPSTATE.S.A0001"): + self.print_step(3, "Read CurrentPhase attribute") + current_phase = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentPhase) + logging.info("CurrentPhase: %s" % (current_phase)) + + if phase_list == NullValue: + asserts.assert_true(current_phase == NullValue, "CurrentPhase(%s) should be null" % current_phase) + else: + asserts.assert_true(0 <= current_phase and current_phase < phase_list_len, + "CurrentPhase(%s) must be between 0 and %s" % (current_phase, (phase_list_len - 1))) + + if self.check_pics("OPSTATE.S.A0002"): + self.print_step(4, "Read CountdownTime attribute") + countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.CountdownTime) + + logging.info("CountdownTime: %s" % (countdown_time)) + if countdown_time is not NullValue: + asserts.assert_true(0 <= countdown_time <= 259200, + "CountdownTime(%s) must be between 0 and 259200" % countdown_time) + + if self.check_pics("OPSTATE.S.A0003"): + self.print_step(5, "Read OperationalStateList attribute") + operational_state_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalStateList) + + logging.info("OperationalStateList: %s" % (operational_state_list)) + + defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum + if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] + + for state in operational_state_list: + in_range = (0x80 <= state.operationalStateID <= 0xBF) + asserts.assert_true(state.operationalStateID in defined_states or in_range, + "Found a OperationalStateList entry with invalid ID value!") + if in_range: + asserts.assert_true(state.operationalStateLabel is not None, + "The OperationalStateLabel should be populated") + if state.operationalStateID == Clusters.OperationalState.Enums.OperationalStateEnum.kError: + error_state_present = True + + asserts.assert_true(error_state_present, "The OperationalStateList does not have an ID entry of Error(0x03)") + + if self.check_pics("OPSTATE.S.A0004"): + self.print_step(6, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + + logging.info("OperationalState: %s" % (operational_state)) + + in_range = (0x80 <= operational_state <= 0xBF) + asserts.assert_true(operational_state in defined_states or in_range, "OperationalState has an invalid ID value!") + + if self.check_pics("OPSTATE.S.M.ST_STOPPED"): + self.print_step("6a", "Manually put the device in the stopped state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6b", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kStopped) + if self.check_pics("OPSTATE.S.M.ST_RUNNING"): + self.print_step("6c", "Manually put the device in the running state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6d", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kRunning) + if self.check_pics("OPSTATE.S.M.ST_PAUSED"): + self.print_step("6e", "Manually put the device in the paused state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6f", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kPaused) + if self.check_pics("OPSTATE.S.M.ST_ERROR"): + self.print_step("6g", "Manually put the device in the error state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError) + + if self.check_pics("OPSTATE.S.A0005"): + self.print_step(7, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalError) + + logging.info("OperationalError: %s" % (operational_error)) + + # Defined Errors + defined_errors = [error.value for error in Clusters.OperationalState.Enums.ErrorStateEnum + if error is not Clusters.OperationalState.Enums.ErrorStateEnum.kUnknownEnumValue] + + in_range = (0x80 <= operational_error.errorStateID <= 0xBF) + asserts.assert_true(operational_error.errorStateID in defined_errors + or in_range, "OperationalError has an invalid ID value!") + if in_range: + asserts.assert_true(operational_error.errorStateLabel is not None, "ErrorStateLabel should be populated") + + if self.check_pics("OPSTATE.S.M.ERR_NO_ERROR"): + self.print_step("7a", "Manually put the device in the no error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7b", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kNoError) + if self.check_pics("OPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME"): + self.print_step("7c", "Manually put the device in the unable to start or resume error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume) + if self.check_pics("OPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION"): + self.print_step("7e", "Manually put the device in the unable to complete operation error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation) + if self.check_pics("OPSTATE.S.M.ERR_COMMAND_INVALID_STATE"): + self.print_step("7g", "Manually put the device in the command invalid error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OPSTATE_2_3.py b/src/python_testing/TC_OPSTATE_2_3.py new file mode 100644 index 00000000000000..d8950c90ad81f3 --- /dev/null +++ b/src/python_testing/TC_OPSTATE_2_3.py @@ -0,0 +1,158 @@ +# +# 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. +# 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 logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_OPSTATE_2_3(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.OperationalState + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def send_pause_cmd(self) -> Clusters.Objects.OperationalState.Commands.Pause: + ret = await self.send_single_cmd(cmd=Clusters.Objects.OperationalState.Commands.Pause(), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.OperationalState.Commands.OperationalCommandResponse), + "Unexpected return type for Pause") + return ret + + async def send_resume_cmd(self) -> Clusters.Objects.OperationalState.Commands.Resume: + ret = await self.send_single_cmd(cmd=Clusters.Objects.OperationalState.Commands.Resume(), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.OperationalState.Commands.OperationalCommandResponse), + "Unexpected return type for Resume") + return ret + + @async_test_body + async def test_TC_OPSTATE_2_3(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + asserts.assert_true(self.check_pics("OPSTATE.S.A0002"), "OPSTATE.S.A0002 must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.A0003"), "OPSTATE.S.A0003 must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.A0004"), "OPSTATE.S.A0004 must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.C00.Rsp"), "OPSTATE.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.C03.Rsp"), "OPSTATE.S.C03.Rsp must be supported") + + attributes = Clusters.OperationalState.Attributes + + self.print_step(1, "Commissioning, already done") + + self.print_step(2, "Manually put the device in a state where it can receive a Pause command") + input("Press Enter when done.\n") + + self.print_step(3, "Read OperationalStateList attribute") + op_state_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalStateList) + + logging.info("OperationalStateList: %s" % (op_state_list)) + + defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum + if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] + + state_ids = set([s.operationalStateID for s in op_state_list]) + + asserts.assert_true(all(id in state_ids for id in defined_states), "OperationalStateList is missing a required entry") + + self.print_step(4, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(5, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, + "OperationalState ID should be Paused(0x02)") + + self.print_step(6, "Read CountdownTime attribute") + initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (initial_countdown_time)) + if initial_countdown_time is not NullValue: + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null " % initial_countdown_time) + + self.print_step(7, "Waiting for 5 seconds") + time.sleep(5) + + self.print_step(8, "Read CountdownTime attribute") + countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (countdown_time)) + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) + asserts.assert_equal(countdown_time, initial_countdown_time, "CountdownTime(%s) does not equal to the intial CountdownTime(%s)" + % (countdown_time, initial_countdown_time)) + + self.print_step(9, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(10, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(11, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, + "OperationalState(%s) should be Running(0x01)" % operational_state) + + self.print_step(12, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") + input("Press Enter when done.\n") + + self.print_step(14, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, + Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) + + self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") + input("Press Enter when done.\n") + + self.print_step(16, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, + Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) + + +if __name__ == "__main__": + default_matter_test_main() From f71a48feb5434c5356570b97f7c004a0d6bde682 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 31 Jul 2023 15:58:40 -0400 Subject: [PATCH 096/159] Add missing enums in Group Key Management cluster (#28413) * Update group-key-mgmt-cluster.xml * Re-gen ZAP --------- Co-authored-by: tennessee.carmelveilleux@gmail.com --- .../all-clusters-common/all-clusters-app.matter | 4 ++++ .../all-clusters-minimal-app.matter | 4 ++++ .../bridge-app/bridge-common/bridge-app.matter | 4 ++++ ...oip_rootnode_dimmablelight_bCwGYSDpoe.matter | 4 ++++ ..._humiditysensor_thermostat_56de3d5f45.matter | 4 ++++ .../rootnode_basicvideoplayer_0ff86e943b.matter | 4 ++++ ...node_colortemperaturelight_hbUnzYVeyn.matter | 4 ++++ .../rootnode_contactsensor_lFAGG1bfRO.matter | 4 ++++ .../rootnode_dimmablelight_bCwGYSDpoe.matter | 4 ++++ .../devices/rootnode_doorlock_aNKYAreMXE.matter | 4 ++++ ...ootnode_extendedcolorlight_8lcaaYJVAa.matter | 4 ++++ .../chef/devices/rootnode_fan_7N2TobIlOX.matter | 4 ++++ .../rootnode_flowsensor_1zVxHedlaV.matter | 4 ++++ ...ootnode_heatingcoolingunit_ncdGai1E5a.matter | 4 ++++ .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 4 ++++ .../rootnode_lightsensor_lZQycTFcJK.matter | 4 ++++ .../rootnode_occupancysensor_iHyVgifZuo.matter | 4 ++++ .../rootnode_onofflight_bbs1b7IaOV.matter | 4 ++++ .../rootnode_onofflightswitch_FsPlMr090Q.matter | 4 ++++ .../rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 4 ++++ .../rootnode_pressuresensor_s0qC9wLH4k.matter | 4 ++++ .../devices/rootnode_pump_a811bb33a0.matter | 4 ++++ .../devices/rootnode_speaker_RpzeXdimqA.matter | 4 ++++ ...rootnode_temperaturesensor_Qy1zkNW7c3.matter | 4 ++++ .../rootnode_thermostat_bm3fb8dhYi.matter | 4 ++++ .../rootnode_windowcovering_RLCxaGi9Yx.matter | 4 ++++ .../contact-sensor-app.matter | 4 ++++ .../dishwasher-common/dishwasher-app.matter | 4 ++++ .../light-switch-common/light-switch-app.matter | 4 ++++ .../data_model/lighting-app-thread.matter | 4 ++++ .../data_model/lighting-app-wifi.matter | 4 ++++ .../lighting-common/lighting-app.matter | 4 ++++ .../lighting-app/nxp/zap/lighting-on-off.matter | 4 ++++ examples/lighting-app/qpg/zap/light.matter | 4 ++++ .../data_model/lighting-thread-app.matter | 4 ++++ .../silabs/data_model/lighting-wifi-app.matter | 4 ++++ examples/lock-app/lock-common/lock-app.matter | 4 ++++ examples/lock-app/nxp/zap/lock-app.matter | 4 ++++ examples/lock-app/qpg/zap/lock.matter | 4 ++++ .../ota-provider-common/ota-provider-app.matter | 4 ++++ .../ota-requestor-app.matter | 4 ++++ examples/pump-app/pump-common/pump-app.matter | 4 ++++ .../silabs/data_model/pump-thread-app.matter | 4 ++++ .../silabs/data_model/pump-wifi-app.matter | 4 ++++ .../pump-controller-app.matter | 4 ++++ .../resource-monitoring-app.matter | 4 ++++ .../smoke-co-alarm-app.matter | 4 ++++ .../temperature-measurement.matter | 4 ++++ .../thermostat-common/thermostat.matter | 4 ++++ examples/tv-app/tv-common/tv-app.matter | 4 ++++ .../tv-casting-common/tv-casting-app.matter | 4 ++++ .../virtual-device-app.matter | 4 ++++ examples/window-app/common/window-app.matter | 4 ++++ .../data-model/chip/group-key-mgmt-cluster.xml | 17 +++++++++++------ .../data_model/controller-clusters.matter | 4 ++++ src/controller/python/chip/clusters/Objects.py | 4 ++++ .../CHIP/zap-generated/MTRBaseClusters.h | 4 ++++ .../app-common/zap-generated/cluster-enums.h | 6 ++++++ 58 files changed, 241 insertions(+), 6 deletions(-) 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 c22343aef01b93..44a852efa8d887 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 @@ -2295,6 +2295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 5bc8ec3ab4475a..1f31c58a314f35 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1934,6 +1934,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 54b3350c3a3805..9ef1be662e38d9 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1546,6 +1546,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 4bff8df11f908b..3fa94f796969e9 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1431,6 +1431,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 95b99f4913654e..a10059b8f5d77d 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -898,6 +898,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 46a8708f546889..169129dd542a12 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1131,6 +1131,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 01e315b2a165f5..d4ed8ae7833f32 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1191,6 +1191,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 8d3d9e60304b56..e757bfca40c244 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index b8afaea3572f59..ecddba32229e2a 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1295,6 +1295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index aeb594c5de3e2e..cb7af5398cb2d9 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 076ebe9ded9b6b..cd0309d8576232 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1295,6 +1295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index d851670914addd..5253394dac1473 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1132,6 +1132,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index e2d092aadc74da..5f7dc401654574 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 95067271e9bdbf..5c16ff4316165a 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1289,6 +1289,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 51539608f77c93..282e57cb787065 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 046c96f788b42c..60663594687e76 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 5f4df720ab7645..159d6df5d0c559 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index cdc5ce1f05fc1f..82a253ba91ab62 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1295,6 +1295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index aad75b19c1c549..3e3de2c710e365 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1259,6 +1259,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 062beadb18923b..0f341394b711b3 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1194,6 +1194,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 348af0da8d066d..eadffeffcfd559 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 81c38d03d7d445..f461f2e7c49151 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -844,6 +844,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 707711726b0578..d452974aac5c8e 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1289,6 +1289,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 11c8f04ded349e..b4eb0ec4c22094 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 6d8d1131ec69b0..57f3f09d4a4963 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 445dc383e2fc42..a5e2ad2299635d 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 15ebf07c2d6673..965124f01f4518 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1356,6 +1356,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 51446e3cdc8f96..cabe702de3ad44 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -976,6 +976,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 55bf0e75db0511..5faea0c1c4648e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1859,6 +1859,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 7c7332cc0306b2..f68eff373f0a5d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1464,6 +1464,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 67de97758bf6d0..27a1971fb2239d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1374,6 +1374,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index cc83b244b78f10..90c4d57386023d 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1723,6 +1723,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 6e3048786bdbc4..b2781f7c7efc0e 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1290,6 +1290,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index c568ff0c5d7ee0..6b1ccd4ce982ce 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1356,6 +1356,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 1f9f2105f81af7..89681a67ce9e42 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1816,6 +1816,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 1bc4ca085ac095..f199cdf557122a 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1705,6 +1705,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 0e9be617da8907..1fda0929962ee8 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1564,6 +1564,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 397452eb07fa79..8bf3d16ee20939 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -908,6 +908,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index cb7ce687d9a89b..04faba95ce4713 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1189,6 +1189,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 18b9e1e99e5ed3..7adf53eed5a933 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -889,6 +889,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index fe4652795026ba..23bd852d592ed9 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -1072,6 +1072,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 5636ad24e581b8..91fbb9ebdff027 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1148,6 +1148,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index dae3db394fcbd9..6642cb7c237657 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -1148,6 +1148,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index dae3db394fcbd9..6642cb7c237657 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -1148,6 +1148,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 16c72d7d0341bd..1f69469501cb44 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1073,6 +1073,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index 51dadb42c36cbe..297294cf44bfb7 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -1408,6 +1408,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 1956af2af19e1c..a16b80d49cd1a9 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1475,6 +1475,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 70f93bcd68ec64..07b170ea8325d6 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -940,6 +940,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 49776bcef7069d..88d23fdbcc46e4 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1560,6 +1560,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 38a9224dabe38f..bd3b6687d4b694 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1709,6 +1709,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 3c03e7fb70df31..cdbf91567fd29b 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1272,6 +1272,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 280eac184ac8c5..ceb3526d73d508 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1498,6 +1498,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index b6a03dc6d91d13..7b2840b18cf469 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1692,6 +1692,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml index 9c4fe41cd058d9..6dcf1b0eaa33a0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml @@ -30,6 +30,17 @@ limitations under the License. + + + + + + + + + + + @@ -42,12 +53,6 @@ limitations under the License. - - - - - - General Group Key Management diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index f5434d4cd08ced..f024e626d4ed2a 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2577,6 +2577,10 @@ client cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9d5670c8e8d930..d63180139714cf 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -13451,6 +13451,10 @@ class GroupKeySecurityPolicyEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, + class Bitmaps: + class Feature(IntFlag): + kCacheAndSync = 0x1 + class Structs: @dataclass class GroupInfoMapStruct(ClusterObject): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index ded2a0be84a606..573551ffbe636f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -26432,6 +26432,10 @@ typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { MTRGroupKeyManagementGroupKeySecurityPolicyCacheAndSync API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { + MTRGroupKeyManagementFeatureCacheAndSync MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { MTRICDManagementFeatureCheckInProtocolSupport MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 6cef8dce3faef4..2e07f6be4d9132 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -1444,6 +1444,12 @@ enum class GroupKeySecurityPolicyEnum : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 2, }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kCacheAndSync = 0x1, +}; } // namespace GroupKeyManagement namespace FixedLabel {} // namespace FixedLabel From e059202613e91da78884aec4e1041d76da0af9bf Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Mon, 31 Jul 2023 20:15:06 -0400 Subject: [PATCH 097/159] [ICD] Subscription report emission when becoming active (#28266) * Added mechanism to emit report when switching to active mode if necessary * Restyled by clang-format * Reworked the logic to force a report emission when min elapsed and inject the scheduler in the ICD manager from Server::Init() * Update src/app/reporting/ReportScheduler.h Co-authored-by: Boris Zbarsky * Created StateObserver as an interface class to fix dependencies issues in app/BUILD.gn * Restyled by whitespace * Update src/app/icd/ICDManager.cpp Co-authored-by: Boris Zbarsky * Moved the report on active mode ifdef to ReportSchedulerImpl and removed misleading comment * Restyled by clang-format * Put the now timestamp in the #if check to avoid unused variable error --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- src/app/BUILD.gn | 2 +- src/app/ReadHandler.h | 4 +-- src/app/icd/BUILD.gn | 9 ++++++- src/app/icd/ICDManager.cpp | 16 +++++++++--- src/app/icd/ICDManager.h | 4 ++- src/app/icd/ICDStateObserver.h | 30 +++++++++++++++++++++++ src/app/reporting/ReportScheduler.h | 5 +++- src/app/reporting/ReportSchedulerImpl.cpp | 17 +++++++++++++ src/app/reporting/ReportSchedulerImpl.h | 3 +++ src/app/server/Server.cpp | 2 +- 10 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 src/app/icd/ICDStateObserver.h diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index c8d20b58aff129..312a53aa6ee1a7 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -213,7 +213,7 @@ static_library("app") { public_deps = [ ":app_config", "${chip_root}/src/access", - "${chip_root}/src/app/icd:cluster-srcs", + "${chip_root}/src/app/icd:observer-srcs", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index 5f1d3221886084..a87c121ffaf8b0 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -418,8 +418,8 @@ class ReadHandler : public Messaging::ExchangeDelegate friend class chip::app::reporting::Engine; friend class chip::app::InteractionModelEngine; - // The report scheduler needs to be able to access StateFlag private functions IsReportable(), IsGeneratingReports() and - // IsDirty() to know when to schedule a run so it is declared as a friend class. + // The report scheduler needs to be able to access StateFlag private functions IsReportable(), IsGeneratingReports(), + // ForceDirtyState() and IsDirty() to know when to schedule a run so it is declared as a friend class. friend class chip::app::reporting::ReportScheduler; enum class HandlerState : uint8_t diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index f4d5b9a7375dac..18aea3f155d845 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -17,6 +17,10 @@ import("icd.gni") # ICD Server sources and configurations +source_set("observer-srcs") { + sources = [ "ICDStateObserver.h" ] +} + # ICD Manager source-set is broken out of the main source-set to enable unit tests # All sources and configurations used by the ICDManager need to go in this source-set source_set("manager-srcs") { @@ -25,7 +29,10 @@ source_set("manager-srcs") { "ICDManager.h", ] - deps = [ ":cluster-srcs" ] + deps = [ + ":cluster-srcs", + ":observer-srcs", + ] public_deps = [ "${chip_root}/src/credentials:credentials" ] } diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index 853fd044d36732..e3787f2ddc747a 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -33,6 +33,11 @@ #define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0 #endif +#ifndef ICD_REPORT_ON_ENTER_ACTIVE_MODE +// Enabling this makes the device emit subscription reports when transitioning from idle to active mode. +#define ICD_REPORT_ON_ENTER_ACTIVE_MODE 0 +#endif + namespace chip { namespace app { @@ -40,12 +45,15 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::IcdManagement; -void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable) +void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, ICDStateObserver * stateObserver) { VerifyOrDie(storage != nullptr); VerifyOrDie(fabricTable != nullptr); - mStorage = storage; - mFabricTable = fabricTable; + VerifyOrDie(stateObserver != nullptr); + + mStorage = storage; + mFabricTable = fabricTable; + mStateObserver = stateObserver; uint32_t activeModeInterval = IcdManagementServer::GetInstance().GetActiveModeInterval(); VerifyOrDie(kFastPollingInterval.count() < activeModeInterval); @@ -152,6 +160,8 @@ void ICDManager::UpdateOperationState(OperationalState state) { ChipLogError(AppServer, "Failed to set Polling Interval: err %" CHIP_ERROR_FORMAT, err.Format()); } + + mStateObserver->OnEnterActiveMode(); } else { diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index 94127d645e9c18..10a1704a670cfa 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -16,6 +16,7 @@ */ #pragma once +#include #include #include #include @@ -51,7 +52,7 @@ class ICDManager }; ICDManager() {} - void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable); + void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, ICDStateObserver * stateObserver); void Shutdown(); void UpdateIcdMode(); void UpdateOperationState(OperationalState state); @@ -86,6 +87,7 @@ class ICDManager ICDMode mICDMode = ICDMode::SIT; PersistentStorageDelegate * mStorage = nullptr; FabricTable * mFabricTable = nullptr; + ICDStateObserver * mStateObserver = nullptr; }; } // namespace app diff --git a/src/app/icd/ICDStateObserver.h b/src/app/icd/ICDStateObserver.h new file mode 100644 index 00000000000000..aa088a7b87f81a --- /dev/null +++ b/src/app/icd/ICDStateObserver.h @@ -0,0 +1,30 @@ +/* + * + * 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 + +namespace chip { +namespace app { + +class ICDStateObserver +{ +public: + virtual ~ICDStateObserver() {} + virtual void OnEnterActiveMode() = 0; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h index d691e4b36889ed..fc1858862bc4bd 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include @@ -38,7 +39,7 @@ class TimerContext virtual void TimerFired() = 0; }; -class ReportScheduler : public ReadHandler::Observer +class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver { public: /// @brief This class acts as an interface between the report scheduler and the system timer to reduce dependencies on the @@ -172,6 +173,8 @@ class ReportScheduler : public ReadHandler::Observer bool IsReportableNow(ReadHandler * aReadHandler) { return FindReadHandlerNode(aReadHandler)->IsReportableNow(); } /// @brief Check if a ReadHandler is reportable without considering the timing bool IsReadHandlerReportable(ReadHandler * aReadHandler) const { return aReadHandler->IsReportable(); } + /// @brief Sets the ForceDirty flag of a ReadHandler + void HandlerForceDirtyState(ReadHandler * aReadHandler) { aReadHandler->ForceDirtyState(); } /// @brief Get the number of ReadHandlers registered in the scheduler's node pool size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); } diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index b6170fba9e0fdf..74f75a663277aa 100644 --- a/src/app/reporting/ReportSchedulerImpl.cpp +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -37,6 +37,23 @@ ReportSchedulerImpl::ReportSchedulerImpl(TimerDelegate * aTimerDelegate) : Repor VerifyOrDie(nullptr != mTimerDelegate); } +/// @brief Method that triggers a report emission on each ReadHandler that is not blocked on its min interval. +/// Each read handler that is not blocked is immediately marked dirty so that it will report as soon as possible. +void ReportSchedulerImpl::OnEnterActiveMode() +{ +#if ICD_REPORT_ON_ENTER_ACTIVE_MODE + Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + mNodesPool.ForEachActiveObject([now, this](ReadHandlerNode * node) { + if (now >= node->GetMinTimestamp()) + { + this->HandlerForceDirtyState(node->GetReadHandler()); + } + + return Loop::Continue; + }); +#endif +} + /// @brief When a ReadHandler is added, register it, which will schedule an engine run void ReportSchedulerImpl::OnReadHandlerCreated(ReadHandler * aReadHandler) { diff --git a/src/app/reporting/ReportSchedulerImpl.h b/src/app/reporting/ReportSchedulerImpl.h index 3ac47449f834bc..573184ada02d5a 100644 --- a/src/app/reporting/ReportSchedulerImpl.h +++ b/src/app/reporting/ReportSchedulerImpl.h @@ -32,6 +32,9 @@ class ReportSchedulerImpl : public ReportScheduler ReportSchedulerImpl(TimerDelegate * aTimerDelegate); ~ReportSchedulerImpl() override { UnregisterAllHandlers(); } + // ICDStateObserver + void OnEnterActiveMode() override; + // ReadHandlerObserver void OnReadHandlerCreated(ReadHandler * aReadHandler) final; void OnBecameReportable(ReadHandler * aReadHandler) final; diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index a4c8b95d550f79..b416d5086c3096 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -250,7 +250,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT #if CHIP_CONFIG_ENABLE_ICD_SERVER - mICDManager.Init(mDeviceStorage, &GetFabricTable()); + mICDManager.Init(mDeviceStorage, &GetFabricTable(), &mReportScheduler); mICDEventManager.Init(&mICDManager); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER From 4ac93047a5491bae6a2bcb8dd463978000771b9f Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 1 Aug 2023 19:04:33 +0530 Subject: [PATCH 098/159] [ESP32] Update esp-idf to v5.1 release (#28326) * [ESP32] Update esp-idf to v5.1 release * Fix the requirements for v5.1 * Fix the pyparsing version and explaining comment * Update the container image to use the latest one * remove gdbgui from few more places * fixup constraints for pyparsing * Fix kconfig module * Fix the esp32 qemu * Fix freertos path * Fix format specifier in esp32 pigweed logger * Restyled by clang-format * Fix the shell app * Move freertos function from IRAM to flash for chef app * Fixes for building all-clusters-app with Target m5stack. Also, IRAM usage shot up so moved the freertos functions to flash * Changes to fix all-clusters-minimal app * Remove gdbgui references * Changes in lighting-app * Examples supporting display must build for non esp32 targets * Pull in few dram optimizations from temperature app * Reduce the critical logging buffer --------- Co-authored-by: Restyled.io --- .github/workflows/chef.yaml | 4 +- .github/workflows/examples-esp32.yaml | 10 +---- .github/workflows/qemu.yaml | 5 +-- .github/workflows/release_artifacts.yaml | 2 +- config/esp32/components/chip/CMakeLists.txt | 25 +++-------- docs/guides/esp32/setup_idf_chip.md | 42 ++++--------------- .../all-clusters-app/esp32/CMakeLists.txt | 7 ++-- .../esp32/main/CMakeLists.txt | 15 +++++-- .../all-clusters-app/esp32/sdkconfig.defaults | 3 ++ .../esp32/sdkconfig_c3devkit.defaults | 3 ++ .../esp32/sdkconfig_m5stack.defaults | 3 ++ .../esp32/sdkconfig_m5stack_rpc.defaults | 6 +++ .../esp32/CMakeLists.txt | 7 ++-- .../esp32/main/CMakeLists.txt | 13 ++++-- .../esp32/partitions.csv | 4 +- .../esp32/sdkconfig.defaults | 3 ++ .../esp32/sdkconfig_c3devkit.defaults | 3 ++ .../esp32/sdkconfig_m5stack.defaults | 3 ++ .../esp32/sdkconfig_m5stack_rpc.defaults | 6 +++ examples/chef/esp32/sdkconfig.defaults | 3 ++ examples/chef/esp32/sdkconfig_rpc.defaults | 3 ++ examples/common/m5stack-tft/repo | 2 +- .../common/screen-framework/CMakeLists.txt | 8 +++- examples/lighting-app/esp32/CMakeLists.txt | 7 ++-- .../lighting-app/esp32/main/CMakeLists.txt | 16 ++++--- examples/lock-app/esp32/main/CMakeLists.txt | 9 +++- .../esp32/main/CMakeLists.txt | 8 +++- .../pigweed-app/esp32/main/CMakeLists.txt | 8 +++- examples/platform/esp32/PigweedLogger.cpp | 2 +- examples/shell/esp32/main/CMakeLists.txt | 2 +- .../esp32/main/CMakeLists.txt | 8 +++- scripts/setup/constraints.txt | 2 +- scripts/setup/requirements.esp32.txt | 13 +++--- src/test_driver/esp32/main/main_app.cpp | 13 +----- 34 files changed, 143 insertions(+), 125 deletions(-) diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 35d62da349d4f0..76bbb9cf6da05c 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -54,7 +54,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 options: --user root steps: @@ -64,8 +64,6 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - name: CI Examples ESP32 shell: bash run: | diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 99c74c80eb7f27..3757d952b29fda 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -46,9 +46,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Set up environment for size reports uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} @@ -130,7 +127,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -142,9 +139,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Build example Bridge App run: scripts/examples/esp_example.sh bridge-app diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 078b4dd960c679..13badfcf8340b6 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:1 + image: ghcr.io/project-chip/chip-build-esp32-qemu:2 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -50,9 +50,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Build ESP32 QEMU test images run: | scripts/run_in_build_env.sh " \ diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index a6c14d8401a5c2..5cbcc9b53308b9 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 steps: - name: Checkout diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index d35791cf1ed3c0..dfda6287ccb60e 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -462,26 +462,11 @@ foreach(phy_blob ${phy_blobs}) list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a") endforeach() -idf_component_get_property(esp_event_lib esp_event COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(hal_lib hal COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(soc_lib soc COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(efuse_lib efuse COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(vfs_lib vfs COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(driver_lib driver COMPONENT_LIB) -list(APPEND chip_libraries $) +set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos) +foreach(component ${components_to_link}) + idf_component_get_property(lib_name ${component} COMPONENT_LIB) + list(APPEND chip_libraries $) +endforeach() target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group ${chip_libraries} diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index ff5ee40c60aed8..ef57e61ca3c3ac 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -13,42 +13,32 @@ step. ### Install Prerequisites -- [Linux](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/linux-setup.html) -- [macOS](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/macos-setup.html) +- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-linux-users) +- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-macos-users) -### Get IDF v4.4.4 +### Get IDF v5.1 - Clone ESP-IDF - [v4.4.4 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.4) + [v5.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1) ``` - $ git clone -b v4.4.4 --recursive https://github.com/espressif/esp-idf.git + $ git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git $ cd esp-idf $ ./install.sh ``` -- To update an existing esp-idf toolchain to v4.4.4: +- To update an existing esp-idf toolchain to v5.1: ``` $ cd path/to/esp-idf $ git fetch origin - $ git checkout v4.4.4 - $ git reset --hard origin/v4.4.4 + $ git checkout v5.1 + $ git reset --hard origin/v5.1 $ git submodule update --recursive --init $ git clean -fdx $ ./install.sh ``` -- For ESP32C6 & ESP32H2, please use commit - [ea5e0ff](https://github.com/espressif/esp-idf/tree/ea5e0ff). - - ``` - $ cd esp-idf - $ git checkout ea5e0ff - $ git submodule update --init - $ ./install.sh - ``` - ## Setup Matter environment ### Install Prerequisites @@ -80,22 +70,6 @@ below: python3 -m pip install esptool ``` -For MacOS, `gdbgui` python package will not be installed using `bootstrap.sh` -script as it is restricted only for x64 Linux platforms. It is restricted -because, building wheels for `gevent` (dependency of `gdbgui`) fails on MacOS. - -For ARM-based Mac, no further installation steps are necessary if Python3 -version is greater than or equal to 3.11. - -If Python3 version is less than 3.11 or you are using x86(Intel-based) Mac then -please run the below commands after every bootstrapping to install gdbgui wheels -as binary - -``` -python3 -m pip install -c scripts/setup/constraints.txt --no-cache --prefer-binary gdbgui==0.13.2.0 -deactivate -``` - --- Once IDF and Matter environment is set up, head over to diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt index dc92f0c65b2e19..d5508c4197d790 100644 --- a/examples/all-clusters-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/CMakeLists.txt @@ -26,12 +26,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) + if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() project(chip-all-clusters-app) diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 14015338230788..1b4b6ff21e6296 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -110,8 +110,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -119,9 +125,10 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) -set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread) -if(CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft spidrier screen-framework) +set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) endif() if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM) diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults b/examples/all-clusters-app/esp32/sdkconfig.defaults index d824c990600f65..c3b10929d4120d 100644 --- a/examples/all-clusters-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults @@ -66,3 +66,6 @@ CONFIG_MBEDTLS_HKDF_C=y # This example uses the older version of RMT driver to work with both # idf-v4.4.3 and idf-v5.0, so supressing the warnings by setting below option CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults index 24d4fe754ebdc8..8d7455d0d7610f 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults @@ -50,3 +50,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults index a7d058bc7fe30a..287262d17e57cc 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults index e0cf1a0f22a874..213d44fe9c616e 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -74,3 +74,9 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# to avoid dram overflow, reduce the critical loggin buffer to 1K +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 diff --git a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt index 0d6aa7b68931f6..0af660ce2990e2 100644 --- a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt @@ -26,12 +26,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) + if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() project(chip-all-clusters-minimal-app) diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index c445c54d32e370..33582927c19d26 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -100,8 +100,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -110,8 +116,9 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" endif (CONFIG_ENABLE_PW_RPC) set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread) -if(CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft spidrier screen-framework) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) endif() if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM) diff --git a/examples/all-clusters-minimal-app/esp32/partitions.csv b/examples/all-clusters-minimal-app/esp32/partitions.csv index 7d399d0f5dd48e..47172e25774ebb 100644 --- a/examples/all-clusters-minimal-app/esp32/partitions.csv +++ b/examples/all-clusters-minimal-app/esp32/partitions.csv @@ -3,6 +3,6 @@ nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 1500K, -ota_1, app, ota_1, , 1500K, +ota_0, app, ota_0, , 1900K, +ota_1, app, ota_1, , 1900K, ot_storage, data, 0x3a, , 0x2000, diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults index dcceac3858cd3e..fda02fbf7c9bae 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults @@ -66,3 +66,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults index 24d4fe754ebdc8..8d7455d0d7610f 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults @@ -50,3 +50,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults index a7d058bc7fe30a..287262d17e57cc 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults index e0cf1a0f22a874..213d44fe9c616e 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -74,3 +74,9 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# to avoid dram overflow, reduce the critical loggin buffer to 1K +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 diff --git a/examples/chef/esp32/sdkconfig.defaults b/examples/chef/esp32/sdkconfig.defaults index ca2cd09fcd1541..bd714ab0202833 100644 --- a/examples/chef/esp32/sdkconfig.defaults +++ b/examples/chef/esp32/sdkconfig.defaults @@ -59,3 +59,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# IRAM optimizations +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/chef/esp32/sdkconfig_rpc.defaults b/examples/chef/esp32/sdkconfig_rpc.defaults index caac0212b3b17a..a1506dd52891bc 100644 --- a/examples/chef/esp32/sdkconfig_rpc.defaults +++ b/examples/chef/esp32/sdkconfig_rpc.defaults @@ -58,3 +58,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# IRAM optimizations +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/common/m5stack-tft/repo b/examples/common/m5stack-tft/repo index 3344a8105f8dfe..a6299b6c7c0b2e 160000 --- a/examples/common/m5stack-tft/repo +++ b/examples/common/m5stack-tft/repo @@ -1 +1 @@ -Subproject commit 3344a8105f8dfecb95832f369733cf6f863a1662 +Subproject commit a6299b6c7c0b2e3eb62fa08ee4bf7155c39bad1f diff --git a/examples/common/screen-framework/CMakeLists.txt b/examples/common/screen-framework/CMakeLists.txt index 5b5739e12c2df5..af304459ea69e3 100644 --- a/examples/common/screen-framework/CMakeLists.txt +++ b/examples/common/screen-framework/CMakeLists.txt @@ -1,6 +1,12 @@ +set(require_list chip driver) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND require_list tft) +endif() + idf_component_register(SRCS "Display.cpp" "ScreenManager.cpp" "Screen.cpp" "ListScreen.cpp" INCLUDE_DIRS "include" - PRIV_REQUIRES tft chip driver) + REQUIRES ${require_list}) diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index b37c8154a45208..356a3cd14d6b64 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -26,15 +26,14 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() + project(chip-lighting-app) # WARNING: This is just an example for using key for decrypting the encrypted OTA image diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index b6e29691bacd23..fcb0121d9f6d78 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -69,6 +69,10 @@ set(SRC_DIRS_LIST set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash) +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) +endif() + if (CONFIG_ENABLE_PW_RPC) # Append additional directories for RPC build set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" @@ -77,8 +81,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -86,10 +96,6 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) -if (CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft screen-framework) -endif() - idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST} SRC_DIRS ${SRC_DIRS_LIST} PRIV_REQUIRES ${PRIV_REQUIRES_LIST}) diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index bf9edad36d7f7e..dc5fa500b03434 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -19,6 +19,13 @@ get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) if (CONFIG_ENABLE_PW_RPC) + +if (${IDF_VERSION_MAJOR} LESS 5) + set(freertos_include_path "${IDF_PATH}/components/freertos/include/freertos") +else() + set(freertos_include_path "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" @@ -30,7 +37,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" "${CMAKE_CURRENT_LIST_DIR}/include" - "${IDF_PATH}/components/freertos/include/freertos" + "${freertos_include_path}" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" diff --git a/examples/ota-requestor-app/esp32/main/CMakeLists.txt b/examples/ota-requestor-app/esp32/main/CMakeLists.txt index 6a3633f442ac64..10c61e162900f2 100644 --- a/examples/ota-requestor-app/esp32/main/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/main/CMakeLists.txt @@ -72,8 +72,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" diff --git a/examples/pigweed-app/esp32/main/CMakeLists.txt b/examples/pigweed-app/esp32/main/CMakeLists.txt index 005f587b70b50c..e06bb5a5296a14 100644 --- a/examples/pigweed-app/esp32/main/CMakeLists.txt +++ b/examples/pigweed-app/esp32/main/CMakeLists.txt @@ -14,6 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +if (${IDF_VERSION_MAJOR} LESS 5) + set(freertos_include_path "${IDF_PATH}/components/freertos/include/freertos") +else() + set(freertos_include_path "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" @@ -21,7 +27,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" + "${freertos_include_path}" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" diff --git a/examples/platform/esp32/PigweedLogger.cpp b/examples/platform/esp32/PigweedLogger.cpp index e7bb260f9da034..d10b89bcd9f69f 100644 --- a/examples/platform/esp32/PigweedLogger.cpp +++ b/examples/platform/esp32/PigweedLogger.cpp @@ -138,7 +138,7 @@ extern "C" void __wrap_esp_log_writev(esp_log_level_t level, const char * tag, c PigweedLogger::putString(logColor, strlen(logColor)); char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%u) %s: ", esp_log_timestamp(), tag); + size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%" PRIu32 ") %s: ", esp_log_timestamp(), tag); PigweedLogger::putString(formattedMsg, len); memset(formattedMsg, 0, sizeof formattedMsg); diff --git a/examples/shell/esp32/main/CMakeLists.txt b/examples/shell/esp32/main/CMakeLists.txt index 8fac15167812f5..5a565edb90a6d5 100644 --- a/examples/shell/esp32/main/CMakeLists.txt +++ b/examples/shell/esp32/main/CMakeLists.txt @@ -23,4 +23,4 @@ idf_component_register(SRCS main.cpp "${CHIP_SHELL_DIR}/shell_common/globals.cpp" PRIV_INCLUDE_DIRS "${CHIP_SHELL_DIR}/shell_common/include" - PRIV_REQUIRES chip nvs_flash bt console) + PRIV_REQUIRES chip nvs_flash bt) diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index 6136d1583709bb..06b274e8d4bade 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -64,8 +64,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 5573d0bc48221f..fa15e9d94ab800 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -248,7 +248,7 @@ pykwalify==1.8.0 # via west pylink-square==0.5.0 # via bflb-iot-tool -pyparsing==2.3.1 +pyparsing==3.0.9 # via -r requirements.esp32.txt pypng==0.0.21 # via -r requirements.telink.txt diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index f688b17b1a521b..d0d6d924ff8ddb 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -1,18 +1,15 @@ click>=7.0 future>=0.15.2 -pyparsing>=2.0.3,<2.4.0 +# pyparsing: Min version was set based on https://github.com/pyparsing/pyparsing/issues/319 +# pyparsing: Max version was set to avoid breaking changes +pyparsing>=3.0.3,<3.1 idf-component-manager pygdbmi<=0.9.0.2 reedsolo>=1.5.3,<=1.5.4 bitstring>=3.1.6,<4 ecdsa>=0.16.0 -kconfiglib==13.7.1 construct==2.10.54 python-socketio<5 itsdangerous<2.1 ; python_version < "3.11" -# -# gdbgui pulls in gevent which fails to compile due to cython updates. -# Could not find a good way to fix this dependency, so commenting it -# out here. -# -# gdbgui==0.13.2.0 ; python_version < "3.11" and platform_machine != 'aarch64' and sys_platform == 'linux' +esp_idf_monitor==1.1.1 +esp-idf-kconfig==1.2.0 diff --git a/src/test_driver/esp32/main/main_app.cpp b/src/test_driver/esp32/main/main_app.cpp index 1eef2ae345439a..0ff3ce4690d6b8 100644 --- a/src/test_driver/esp32/main/main_app.cpp +++ b/src/test_driver/esp32/main/main_app.cpp @@ -19,12 +19,12 @@ #include "esp_heap_caps_init.h" #include "esp_log.h" #include "esp_netif.h" -#include "esp_spi_flash.h" #include "esp_system.h" #include "esp_wifi.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "nvs_flash.h" +#include "spi_flash_mmap.h" #include @@ -48,17 +48,6 @@ static void tester_task(void * pvParameters) extern "C" void app_main() { - esp_chip_info_t chip_info; - esp_chip_info(&chip_info); - - ESP_LOGI(TAG, "This is ESP32 chip with %d CPU cores, WiFi%s%s, ", chip_info.cores, - (chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "", (chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : ""); - - ESP_LOGI(TAG, "silicon revision %d, ", chip_info.revision); - - ESP_LOGI(TAG, "%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024), - (chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external"); - // Initialize the ESP NVS layer. esp_err_t err = nvs_flash_init(); if (err != ESP_OK) From 4a2d6e9fbfd2ffa3c0c073a50aea5dadae314177 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 09:44:01 -0400 Subject: [PATCH 099/159] Fix Matter.framework compilation when -Wundef is enabled. (#28424) Apparently we have some framework consumers that set -Wundef, so fail when MTR_ENABLE_PROVISIONAL is not defined. --- src/darwin/Framework/CHIP/MTRDefines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 323066b4b47fe1..dab6250019e325 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -53,7 +53,7 @@ #define MTR_NEWLY_AVAILABLE #endif -#if MTR_ENABLE_PROVISIONAL +#if defined(MTR_ENABLE_PROVISIONAL) && MTR_ENABLE_PROVISIONAL #define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE #else #define MTR_PROVISIONALLY_AVAILABLE NS_UNAVAILABLE MTR_HIDDEN From e9f25fd1301982bc3e0a86b24f5517c1311c5220 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 1 Aug 2023 16:39:25 +0100 Subject: [PATCH 100/159] Added an example robotic vacuum cleaner configuration to chef devices. (#28365) --- ...ode_roboticvacuumcleaner_1807ff0c49.matter | 1471 +++ ...otnode_roboticvacuumcleaner_1807ff0c49.zap | 10848 ++++++++++++++++ .../sample_app_util/matter_device_types.json | 3 +- 3 files changed, 12321 insertions(+), 1 deletion(-) create mode 100644 examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter create mode 100644 examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter new file mode 100644 index 00000000000000..ed193c8d2bc2a8 --- /dev/null +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -0,0 +1,1471 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + 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 access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 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; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for scene configuration and manipulation. */ +server cluster Scenes = 5 { + bitmap Feature : BITMAP32 { + kSceneNames = 0x1; + } + + bitmap ScenesCopyMode : BITMAP8 { + kCopyAllScenes = 0x1; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute group_id currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u sceneTableSize = 6; + readonly attribute int8u remainingCapacity = 7; + 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 AddSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + optional nullable INT16U transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable INT8U capacity = 1; + group_id groupID = 2; + optional INT8U sceneList[] = 3; + } + + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + 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 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. */ +server cluster AccessControl = 31 { + 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) 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. */ +server cluster BasicInformation = 40 { + 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 char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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 is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + 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; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + 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; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + 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 int8u scanMaxTimeSeconds = 2; + readonly attribute 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 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; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 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 RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** 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. */ +server cluster GeneralDiagnostics = 51 { + 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; + } + + 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 int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute 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; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +server cluster Switch = 59 { + bitmap Feature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 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; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u 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 salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + 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. */ +server cluster OperationalCredentials = 62 { + 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 attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + 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; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcRunMode = 84 { + enum ModeTag : ENUM16 { + kIdle = 16384; + kCleaning = 16385; + } + + enum StatusCode : ENUM8 { + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + kBatteryLow = 72; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 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 ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcCleanMode = 85 { + enum ModeTag : ENUM16 { + kDeepClean = 16384; + kVacuum = 16385; + kMop = 16386; + } + + enum StatusCode : ENUM8 { + kCleaningInProgress = 64; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 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 ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ +server cluster RvcOperationalState = 97 { + enum ErrorStateEnum : ENUM8 { + kFailedToFindChargingDock = 64; + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + } + + enum OperationalStateEnum : ENUM8 { + kSeekingCharger = 64; + kCharging = 65; + kDocked = 66; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute enum8 operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 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; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + command Pause(): OperationalCommandResponse = 0; + command Resume(): OperationalCommandResponse = 3; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 116, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Scenes { + callback attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; + ram attribute nameSupport default = 0x00; + ram attribute sceneTableSize; + callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcRunMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcCleanMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcOperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap new file mode 100644 index 00000000000000..237921c27cd1ca --- /dev/null +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -0,0 +1,10848 @@ +{ + "featureLevel": 97, + "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": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "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": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "", + "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": "", + "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": "", + "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": "", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "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": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "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": "10", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "XX", + "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": "0", + "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": "", + "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": "0", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "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": "1", + "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": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "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": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "OTAUpdateStateEnum", + "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": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "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": "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": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "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": "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 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 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": "", + "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": "0", + "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": "0", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 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": "", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0001", + "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": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0", + "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": "0x0000", + "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": "0x0000000000000000", + "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": "", + "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": "0x0000000000000000", + "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": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-robotic-vacuum-cleaner", + "deviceTypeCode": 116, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "0", + "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": "0", + "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": "", + "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": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0", + "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": "0", + "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": "", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "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": "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": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "0x0001", + "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": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "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": "0", + "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": "0", + "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": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 116 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index b09cbf7fe26778..9d14653828d7fc 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -41,5 +41,6 @@ "Video Remote Control": 42, "Mode Select": 39, "Air Purifier": 45, - "Air Quality Sensor": 44 + "Air Quality Sensor": 44, + "Robotic Vacuum Cleaner": 116 } From 5aad1a082a6f8b59b691f0fd0b2a4b3da07dc093 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:08:22 -0400 Subject: [PATCH 101/159] [Silabs] Cleanup sdk files (#28370) * Cleanup sdk files * restyle --------- Co-authored-by: Mathieu Kardous --- third_party/silabs/efr32_sdk.gni | 109 ++----------------------------- 1 file changed, 6 insertions(+), 103 deletions(-) diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index dd3e93fb0a6883..579cc1df7ede98 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -149,12 +149,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/system/inc", "${efr32_sdk_root}/platform/service/udelay/inc", "${efr32_sdk_root}/platform/service/legacy_hal/inc", - "${efr32_sdk_root}/platform/service/token_manager/config", - "${efr32_sdk_root}/platform/service/token_manager/inc", - "${efr32_sdk_root}/platform/service/token_manager/test", - "${efr32_sdk_root}/platform/service/token_manager/test/include", - "${efr32_sdk_root}/platform/service/token_manager/test/stack/config", - "${efr32_sdk_root}/platform/service/token_manager/test/stack/include", "${efr32_sdk_root}/platform/middleware/glib", "${efr32_sdk_root}/platform/middleware/glib/config", "${efr32_sdk_root}/platform/middleware/glib/glib", @@ -404,26 +398,6 @@ template("efr32_sdk") { } defines += [ "EFR32MG12" ] - } else if (silabs_family == "efr32mg21") { - _include_dirs += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Include", - "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21/config", - "${efr32_sdk_root}/platform/service/device_init/config/s2/", - ] - - libs += [ - "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG21/GCC/libbluetooth.a", - "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg21_gcc_release.a", - "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", - ] - - defines += [ - "EFR32MG21", - "EFR32_SERIES2_CONFIG1_MICRO", - ] } else if (silabs_family == "efr32mg24") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include", @@ -606,7 +580,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfrco.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_nvic.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager.c", - "${efr32_sdk_root}/platform/service/legacy_hal/src/token_legacy.c", "${efr32_sdk_root}/platform/service/mpu/src/sl_mpu.c", "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager.c", "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_debug.c", @@ -617,9 +590,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_init.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_kernel.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_def.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manager.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manufacturing.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay_armv6m_gcc.S", "${efr32_sdk_root}/util/plugin/security_manager/security_manager.c", @@ -844,84 +814,12 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s1.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c", ] - } else if (silabs_family == "efr32mg21") { - sources += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/startup_efr32mg21.c", - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/system_efr32mg21.c", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rf_path/sl_rail_util_rf_path.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_alt/source/sl_se_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_gcm.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfrco.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", - "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", - ] } else if (silabs_family == "efr32mg24") { sources += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/startup_efr32mg24.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/system_efr32mg24.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_curves_efr32.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", - "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", ] } else if (silabs_family == "mgm24") { sources += [ @@ -929,6 +827,12 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/system_mgm24.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c", + "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_mgm24.c", + ] + } + + if (silabs_family == "mgm24" || silabs_family == "efr32mg24") { + sources += [ "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", @@ -958,7 +862,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_mgm24.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", From ebe11a2668ed064cae4fb5f03ef865894d6b8014 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 12:12:24 -0400 Subject: [PATCH 102/159] Add a FabricTable API to get the next available fabric index. (#28391) * Add a FabricTable API to get the next available fabric index. This can be used during controller startup to map the fabric index (which is allocated to the controller partway through startup and then used immediately for storage keys) to the controller instance being started. * Address review comments. --- src/credentials/FabricTable.cpp | 15 ++++ src/credentials/FabricTable.h | 8 ++ src/credentials/tests/TestFabricTable.cpp | 89 +++++++++++++++++++++++ 3 files changed, 112 insertions(+) diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 6d9f4781fff576..eeb5932f01a48a 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -2080,4 +2080,19 @@ CHIP_ERROR FabricTable::GetFabricLabel(FabricIndex fabricIndex, CharSpan & outFa return CHIP_NO_ERROR; } +CHIP_ERROR FabricTable::PeekFabricIndexForNextAddition(FabricIndex & outIndex) +{ + EnsureNextAvailableFabricIndexUpdated(); + if (!mNextAvailableFabricIndex.HasValue()) + { + return CHIP_ERROR_NO_MEMORY; + } + + FabricIndex index = mNextAvailableFabricIndex.Value(); + VerifyOrReturnError(IsValidFabricIndex(index), CHIP_ERROR_INVALID_FABRIC_INDEX); + + outIndex = index; + return CHIP_NO_ERROR; +} + } // namespace chip diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 82a82521d58be2..60cd54df220041 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -971,6 +971,14 @@ class DLL_EXPORT FabricTable #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } + /** + * Get the fabric index that will be used for the next fabric that will be + * added. Returns error if no more fabrics can be added, otherwise writes + * the fabric index that will be used for the next addition into the + * outparam. + */ + CHIP_ERROR PeekFabricIndexForNextAddition(FabricIndex & outIndex); + private: enum class StateFlags : uint16_t { diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index c6e7998f0c1788..83866b3c8bf78b 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -523,6 +523,12 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + size_t numFabricsIterated = 0; size_t numStorageKeysAtStart = storage.GetNumKeys(); @@ -588,6 +594,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageKeysAtStart); + // Next fabric index has not been updated yet. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + // Validate iterator sees pending { numFabricsIterated = 0; @@ -612,6 +625,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == (numStorageKeysAtStart + 4)); // 2 opcerts + fabric metadata + index + // Next fabric index has been updated. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -679,6 +699,14 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) ByteSpan noc = fabric44CertAuthority.GetNoc(); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + + // Next fabric index should still be the same as before. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; @@ -689,6 +717,12 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, newFabricIndex == 2); // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageAfterFirstAdd); + // Next fabric index has not been updated yet. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } // Commit, now storage should have keys NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); @@ -697,6 +731,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, storage.GetNumKeys(), (numStorageAfterFirstAdd + 5)); // 3 opcerts + fabric metadata + 1 operational key + // Next fabric index has been updated. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -879,6 +920,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == true); NL_TEST_ASSERT(inSuite, saw2 == true); } + + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } size_t numStorageAfterUpdate = storage.GetNumKeys(); @@ -904,6 +952,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().data_equal(CharSpan{ "roboto", strlen("roboto") })); } } + + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } // Sequence 5: Remove FabricIndex 1 (FabricId 11, NodeId 55), make sure FabricIndex 2 (FabricId 44, NodeId 1000) still exists @@ -917,6 +972,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, storage.GetNumKeys(), (numStorageAfterUpdate - 3)); // Deleted NOC, RCAC, Metadata } + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } + // Validate contents of Fabric Index 2 is still OK const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -1374,6 +1436,13 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == true); NL_TEST_ASSERT(inSuite, saw2 == true); } + + // Next fabric index should now be 3, since we added 1 and 2 above. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } // Global: Last known good time + fabric index = 2 @@ -1501,6 +1570,13 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) CHIP_ERROR_INVALID_SIGNATURE); } } + + // Validate that next fabric index is still 3; + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } } @@ -1544,6 +1620,12 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, ByteSpan{}, kVendorId, &newFabricIndex)); @@ -1596,6 +1678,13 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, numFabricsIterated == 0); NL_TEST_ASSERT(inSuite, saw1 == false); } + + // Validate next fabric index has not changed. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } } size_t numStorageAfterRevert = storage.GetNumKeys(); From 83595bb6f8173d7b476ea03d9ce2f33b83053dca Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 12:15:30 -0400 Subject: [PATCH 103/159] Make SessionResumptionStorage injectable in controller. (#28422) * Make SessionResumptionStorage injectable in controller. Fixes https://github.com/project-chip/connectedhomeip/issues/28351 * Address review comment. --- .../CHIPDeviceControllerFactory.cpp | 27 ++++++++++++++----- src/controller/CHIPDeviceControllerFactory.h | 7 +++-- .../CHIPDeviceControllerSystemState.h | 27 ++++++++++++++++--- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index f39a3c7a65ed0e..c57cb9a57dd28c 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -65,6 +65,7 @@ CHIP_ERROR DeviceControllerFactory::Init(FactoryInitParams params) mOperationalKeystore = params.operationalKeystore; mOpCertStore = params.opCertStore; mCertificateValidityPolicy = params.certificateValidityPolicy; + mSessionResumptionStorage = params.sessionResumptionStorage; mEnableServerInteractions = params.enableServerInteractions; CHIP_ERROR err = InitSystemState(params); @@ -94,6 +95,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState() params.operationalKeystore = mOperationalKeystore; params.opCertStore = mOpCertStore; params.certificateValidityPolicy = mCertificateValidityPolicy; + params.sessionResumptionStorage = mSessionResumptionStorage; } return InitSystemState(params); @@ -195,12 +197,24 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) tempFabricTable = stateParams.fabricTable; } - auto sessionResumptionStorage = chip::Platform::MakeUnique(); - ReturnErrorOnFailure(sessionResumptionStorage->Init(params.fabricIndependentStorage)); - stateParams.sessionResumptionStorage = std::move(sessionResumptionStorage); + SessionResumptionStorage * sessionResumptionStorage; + if (params.sessionResumptionStorage == nullptr) + { + auto ownedSessionResumptionStorage = chip::Platform::MakeUnique(); + ReturnErrorOnFailure(ownedSessionResumptionStorage->Init(params.fabricIndependentStorage)); + stateParams.ownedSessionResumptionStorage = std::move(ownedSessionResumptionStorage); + stateParams.externalSessionResumptionStorage = nullptr; + sessionResumptionStorage = stateParams.ownedSessionResumptionStorage.get(); + } + else + { + stateParams.ownedSessionResumptionStorage = nullptr; + stateParams.externalSessionResumptionStorage = params.sessionResumptionStorage; + sessionResumptionStorage = stateParams.externalSessionResumptionStorage; + } auto delegate = chip::Platform::MakeUnique(); - ReturnErrorOnFailure(delegate->Init(stateParams.sessionResumptionStorage.get(), stateParams.groupDataProvider)); + ReturnErrorOnFailure(delegate->Init(sessionResumptionStorage, stateParams.groupDataProvider)); stateParams.fabricTableDelegate = delegate.get(); ReturnErrorOnFailure(stateParams.fabricTable->AddFabricDelegate(stateParams.fabricTableDelegate)); delegate.release(); @@ -222,7 +236,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // Enable listening for session establishment messages. ReturnErrorOnFailure(stateParams.caseServer->ListenForSessionEstablishment( - stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, stateParams.sessionResumptionStorage.get(), + stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, sessionResumptionStorage, stateParams.certificateValidityPolicy, stateParams.groupDataProvider)); // @@ -256,7 +270,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) CASEClientInitParams sessionInitParams = { .sessionManager = stateParams.sessionMgr, - .sessionResumptionStorage = stateParams.sessionResumptionStorage.get(), + .sessionResumptionStorage = sessionResumptionStorage, .certificateValidityPolicy = stateParams.certificateValidityPolicy, .exchangeMgr = stateParams.exchangeMgr, .fabricTable = stateParams.fabricTable, @@ -373,6 +387,7 @@ void DeviceControllerFactory::Shutdown() mOperationalKeystore = nullptr; mOpCertStore = nullptr; mCertificateValidityPolicy = nullptr; + mSessionResumptionStorage = nullptr; } void DeviceControllerSystemState::Shutdown() diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index f807f39e1fd570..04855d62cfc3d2 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -34,6 +34,7 @@ #include #include #include +#include namespace chip { @@ -106,8 +107,8 @@ struct SetupParams }; // TODO everything other than the fabric storage, group data provider, OperationalKeystore, -// OperationalCertificateStore and SessionKeystore here should be removed. We're blocked -// because of the need to support !CHIP_DEVICE_LAYER +// OperationalCertificateStore, SessionKeystore, and SessionResumptionStorage here should +// be removed. We're blocked because of the need to support !CHIP_DEVICE_LAYER struct FactoryInitParams { System::Layer * systemLayer = nullptr; @@ -121,6 +122,7 @@ struct FactoryInitParams FabricTable * fabricTable = nullptr; OperationalKeystore * operationalKeystore = nullptr; Credentials::OperationalCertificateStore * opCertStore = nullptr; + SessionResumptionStorage * sessionResumptionStorage = nullptr; #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; #endif @@ -257,6 +259,7 @@ class DeviceControllerFactory Crypto::OperationalKeystore * mOperationalKeystore = nullptr; Credentials::OperationalCertificateStore * mOpCertStore = nullptr; Credentials::CertificateValidityPolicy * mCertificateValidityPolicy = nullptr; + SessionResumptionStorage * mSessionResumptionStorage = nullptr; bool mEnableServerInteractions = false; }; diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index 37f85b1cd90784..6692fc6ecbc308 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -85,10 +85,18 @@ struct DeviceControllerSystemStateParams Credentials::GroupDataProvider * groupDataProvider = nullptr; Crypto::SessionKeystore * sessionKeystore = nullptr; + // NOTE: Exactly one of externalSessionResumptionStorage (externally provided, + // externally owned) or ownedSessionResumptionStorage (managed by the system + // state) must be non-null. + SessionResumptionStorage * externalSessionResumptionStorage = nullptr; + // Params that will be deallocated via Platform::Delete in // DeviceControllerSystemState::Shutdown. DeviceTransportMgr * transportMgr = nullptr; - Platform::UniquePtr sessionResumptionStorage; + // NOTE: Exactly one of externalSessionResumptionStorage (externally provided, + // externally owned) or ownedSessionResumptionStorage (managed by the system + // state) must be non-null. + Platform::UniquePtr ownedSessionResumptionStorage; Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; SessionManager * sessionMgr = nullptr; Protocols::SecureChannel::UnsolicitedStatusHandler * unsolicitedStatusHandler = nullptr; @@ -132,8 +140,18 @@ class DeviceControllerSystemState mCASESessionManager(params.caseSessionManager), mSessionSetupPool(params.sessionSetupPool), mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider), mTimerDelegate(params.timerDelegate), mReportScheduler(params.reportScheduler), mSessionKeystore(params.sessionKeystore), - mFabricTableDelegate(params.fabricTableDelegate), mSessionResumptionStorage(std::move(params.sessionResumptionStorage)) + mFabricTableDelegate(params.fabricTableDelegate), + mOwnedSessionResumptionStorage(std::move(params.ownedSessionResumptionStorage)) { + if (mOwnedSessionResumptionStorage) + { + mSessionResumptionStorage = mOwnedSessionResumptionStorage.get(); + } + else + { + mSessionResumptionStorage = params.externalSessionResumptionStorage; + } + #if CONFIG_NETWORK_LAYER_BLE mBleLayer = params.bleLayer; #endif @@ -172,7 +190,7 @@ class DeviceControllerSystemState mUnsolicitedStatusHandler != nullptr && mExchangeMgr != nullptr && mMessageCounterManager != nullptr && mFabrics != nullptr && mCASESessionManager != nullptr && mSessionSetupPool != nullptr && mCASEClientPool != nullptr && mGroupDataProvider != nullptr && mReportScheduler != nullptr && mTimerDelegate != nullptr && - mSessionKeystore != nullptr; + mSessionKeystore != nullptr && mSessionResumptionStorage != nullptr; }; System::Layer * SystemLayer() const { return mSystemLayer; }; @@ -221,7 +239,8 @@ class DeviceControllerSystemState app::reporting::ReportScheduler * mReportScheduler = nullptr; Crypto::SessionKeystore * mSessionKeystore = nullptr; FabricTable::Delegate * mFabricTableDelegate = nullptr; - Platform::UniquePtr mSessionResumptionStorage; + SessionResumptionStorage * mSessionResumptionStorage = nullptr; + Platform::UniquePtr mOwnedSessionResumptionStorage; // If mTempFabricTable is not null, it was created during // DeviceControllerFactory::InitSystemState and needs to be From c6fcc20f1896abbffea7fb84602a477cacd7e010 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 13:36:08 -0400 Subject: [PATCH 104/159] Regenerate ZAP to fix CI after bad merge. (#28454) --- .../devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index ed193c8d2bc2a8..8fb00caaadd6a7 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1017,6 +1017,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; From 9e2dfe26093b2d55007704ceaf2152c63b571d5f Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:47:34 -0400 Subject: [PATCH 105/159] [ICD] Add default ICD Behavior to readhandler when establishing a subscription (#28375) * add default ICD behavior to readhandler * Add comments * Update src/app/ReadHandler.cpp Co-authored-by: Boris Zbarsky * move check to top * Add ICD unit tests for ReadHandler * check to avoid division by 0 * fix dependency chain * restyle * remove deps for manager srcs --------- Co-authored-by: Boris Zbarsky --- src/app/ReadHandler.cpp | 51 +++ src/app/icd/BUILD.gn | 4 +- src/app/tests/BUILD.gn | 7 +- src/app/tests/TestReadInteraction.cpp | 406 ++++++++++++++++++ .../suites/TestIcdManagementCluster.yaml | 2 +- src/lib/core/CHIPConfig.h | 2 +- .../chip-tool/zap-generated/test/Commands.h | 2 +- .../zap-generated/test/Commands.h | 2 +- 8 files changed, 468 insertions(+), 8 deletions(-) diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 1c3a40cc962273..4e9e8fccdf5646 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -713,6 +713,57 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP ReturnErrorOnFailure(subscribeRequestParser.GetMaxIntervalCeilingSeconds(&mMaxInterval)); VerifyOrReturnError(mMinIntervalFloorSeconds <= mMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + + // Default behavior for ICDs where the wanted MaxInterval for a subscription is the IdleModeInterval + // defined in the ICD Management Cluster. + // Behavior can be changed with the OnSubscriptionRequested function defined in the application callbacks + + // Default Behavior Steps : + // If MinInterval > IdleModeInterval, try to set the MaxInterval to the first interval of IdleModeIntervals above the + // MinInterval. + // If the next interval is greater than the MaxIntervalCeiling, use the MaxIntervalCeiling. + // Otherwise, use IdleModeInterval as MaxInterval + + // GetPublisherSelectedIntervalLimit() returns the IdleModeInterval if the device is an ICD + uint32_t decidedMaxInterval = GetPublisherSelectedIntervalLimit(); + + // Check if the PublisherSelectedIntervalLimit is 0. If so, set decidedMaxInterval to MaxIntervalCeiling + if (decidedMaxInterval == 0) + { + decidedMaxInterval = mMaxInterval; + } + + // If requestedMinInterval is greater than the IdleTimeInterval, select next active up time as max interval + if (mMinIntervalFloorSeconds > decidedMaxInterval) + { + uint16_t ratio = mMinIntervalFloorSeconds / static_cast(decidedMaxInterval); + if (mMinIntervalFloorSeconds % decidedMaxInterval) + { + ratio++; + } + + decidedMaxInterval *= ratio; + } + + // Verify that decidedMaxInterval is an acceptable value (overflow) + if (decidedMaxInterval > System::Clock::Seconds16::max().count()) + { + decidedMaxInterval = System::Clock::Seconds16::max().count(); + } + + // Verify that the decidedMaxInterval respects MAX(GetPublisherSelectedIntervalLimit(), MaxIntervalCeiling) + uint16_t maximumMaxInterval = std::max(GetPublisherSelectedIntervalLimit(), mMaxInterval); + if (decidedMaxInterval > maximumMaxInterval) + { + decidedMaxInterval = maximumMaxInterval; + } + + // Set max interval of the subscription + mMaxInterval = static_cast(decidedMaxInterval); + +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + // // Notify the application (if requested) of the impending subscription and check whether we should still proceed to set it up. // This also provides the application an opportunity to modify the negotiated min/max intervals set above. diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index 18aea3f155d845..c0034a88e7b9b8 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -29,11 +29,11 @@ source_set("manager-srcs") { "ICDManager.h", ] - deps = [ + public_deps = [ ":cluster-srcs", ":observer-srcs", + "${chip_root}/src/credentials:credentials", ] - public_deps = [ "${chip_root}/src/credentials:credentials" ] } # ICD management cluster source-set is broken out of the main source-set to enable unit tests diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 5378b199aa17f7..90b4796fef3c47 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -17,6 +17,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") +import("${chip_root}/src/app/icd/icd.gni") import("${chip_root}/src/platform/device.gni") static_library("helpers") { @@ -186,7 +187,6 @@ chip_test_suite("tests") { ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app/common:cluster-objects", - "${chip_root}/src/app/icd:cluster-srcs", "${chip_root}/src/app/icd:manager-srcs", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_ember", @@ -195,7 +195,10 @@ chip_test_suite("tests") { "${nlunit_test_root}:nlunit-test", ] - if (chip_config_network_layer_ble && + # Do not run TestCommissionManager when running ICD specific unit tests. + # ICDManager has a dependency on the Accessors.h file which causes a link error + # when building the TestCommissionManager + if (!chip_enable_icd_server && chip_config_network_layer_ble && (chip_device_platform == "linux" || chip_device_platform == "darwin")) { test_sources += [ "TestCommissionManager.cpp" ] public_deps += [ "${chip_root}/src/app/server" ] diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index a818ee3d23e3a4..88571b040e866d 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -322,6 +322,13 @@ class TestReadInteraction static void TestReadClientInvalidReport(nlTestSuite * apSuite, void * apContext); static void TestReadHandlerInvalidAttributePath(nlTestSuite * apSuite, void * apContext); static void TestProcessSubscribeRequest(nlTestSuite * apSuite, void * apContext); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + static void TestICDProcessSubscribeRequestSupMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestInfMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestSupMinInterval(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestMaxMinInterval(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestInvalidIdleModeInterval(nlTestSuite * apSuite, void * apContext); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER static void TestReadRoundtrip(nlTestSuite * apSuite, void * apContext); static void TestPostSubscribeRoundtripChunkReport(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithDataVersionFilter(nlTestSuite * apSuite, void * apContext); @@ -1491,6 +1498,385 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +#if CHIP_CONFIG_ENABLE_ICD_SERVER +/** + * @brief Test validates that an ICD will choose its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MaxIntervalCeiling is superior. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestSupMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 0; + uint16_t kMaxIntervalCeiling = 1; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == idleModeInterval); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MaxIntervalCeiling is inferior. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestInfMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 0; + uint16_t kMaxIntervalCeiling = 1; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == idleModeInterval); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose a multiple of its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MinInterval > IdleModeInterval. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestSupMinInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 3; + uint16_t kMaxIntervalCeiling = 5; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == (2 * idleModeInterval)); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose a maximal value for an uint16 if the multiple of the IdleModeInterval + * is greater than variable size. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestMaxMinInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = System::Clock::Seconds16::max().count(); + uint16_t kMaxIntervalCeiling = System::Clock::Seconds16::max().count(); + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == kMaxIntervalCeiling); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose the MaxIntervalCeiling as MaxInterval if the next multiple after the MinInterval + * is greater than the IdleModeInterval and MaxIntervalCeiling + */ +void TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 3; + uint16_t kMaxIntervalCeiling = 3; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == kMaxIntervalCeiling); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -4419,6 +4805,18 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadClientInvalidReport", chip::app::TestReadInteraction::TestReadClientInvalidReport), NL_TEST_DEF("TestReadHandlerInvalidAttributePath", chip::app::TestReadInteraction::TestReadHandlerInvalidAttributePath), NL_TEST_DEF("TestProcessSubscribeRequest", chip::app::TestReadInteraction::TestProcessSubscribeRequest), + /* + We need to figure out a way to run unit tests with an ICD build without affecting + all the standard unit tests + https://github.com/project-chip/connectedhomeip/issues/28446 + */ +#if CHIP_CONFIG_ENABLE_ICD_SERVER + NL_TEST_DEF("TestICDProcessSubscribeRequestSupMaxIntervalCeiling", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestSupMaxIntervalCeiling), + NL_TEST_DEF("TestICDProcessSubscribeRequestInfMaxIntervalCeiling", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInfMaxIntervalCeiling), + NL_TEST_DEF("TestICDProcessSubscribeRequestSupMinInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestSupMinInterval), + NL_TEST_DEF("TestICDProcessSubscribeRequestMaxMinInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestMaxMinInterval), + NL_TEST_DEF("TestICDProcessSubscribeRequestInvalidIdleModeInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval), +#endif // #if CHIP_CONFIG_ENABLE_ICD_SERVER NL_TEST_DEF("TestSubscribeRoundtrip", chip::app::TestReadInteraction::TestSubscribeRoundtrip), NL_TEST_DEF("TestPostSubscribeRoundtripChunkReport", chip::app::TestReadInteraction::TestPostSubscribeRoundtripChunkReport), NL_TEST_DEF("TestReadClientReceiveInvalidMessage", chip::app::TestReadInteraction::TestReadClientReceiveInvalidMessage), @@ -4437,7 +4835,15 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadHandlerInvalidSubscribeRequest", chip::app::TestReadInteraction::TestReadHandlerInvalidSubscribeRequest), NL_TEST_DEF("TestSubscribeInvalidateFabric", chip::app::TestReadInteraction::TestSubscribeInvalidateFabric), NL_TEST_DEF("TestShutdownSubscription", chip::app::TestReadInteraction::TestShutdownSubscription), + /* + Disable test when running the ICD specific unit tests. + Test tests reporting feature with hard coded time jumps which don't take into account that an ICD + can change the requested MaxInterval during the subscription response / request process + https://github.com/project-chip/connectedhomeip/issues/28419 + */ +#if CHIP_CONFIG_ENABLE_ICD_SERVER != 1 NL_TEST_DEF("TestSubscribeUrgentWildcardEvent", chip::app::TestReadInteraction::TestSubscribeUrgentWildcardEvent), +#endif NL_TEST_DEF("TestSubscribeWildcard", chip::app::TestReadInteraction::TestSubscribeWildcard), NL_TEST_DEF("TestSubscribePartialOverlap", chip::app::TestReadInteraction::TestSubscribePartialOverlap), NL_TEST_DEF("TestSubscribeSetDirtyFullyOverlap", chip::app::TestReadInteraction::TestSubscribeSetDirtyFullyOverlap), diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml index 6b3d29c1fc5f6b..fb52bd71a48a0b 100644 --- a/src/app/tests/suites/TestIcdManagementCluster.yaml +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -32,7 +32,7 @@ tests: command: "readAttribute" attribute: "IdleModeInterval" response: - value: 500 + value: 2000 - label: "Read ActiveModeInterval" command: "readAttribute" diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index d1e6dc45cd8c7b..80b3d18cfe410f 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1470,7 +1470,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; * @brief Default value for the ICD Management cluster IdleModeInterval attribute, in milliseconds */ #ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL -#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 500 +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 2000 #endif /** diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7198be4927de21..0ab94dafd7c628 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -32078,7 +32078,7 @@ class TestIcdManagementClusterSuite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("idleModeInterval", value, 500UL)); + VerifyOrReturn(CheckValue("idleModeInterval", value, 2000UL)); } break; case 2: diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 5acafa1f5f6831..5f4ad1bcda5777 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -43148,7 +43148,7 @@ class TestIcdManagementCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 500UL)); + VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2000UL)); } NextTest(); From 3b5b3500a8875eb89aa216444ccbe264c4d8d9b8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 15:53:24 -0400 Subject: [PATCH 106/159] Add a signature count to MTRTestKeys. (#28452) This lets us check whether CASE resumption is happening. --- src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h | 3 +++ src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h index 8741eb584e3572..9afe75266d1eed 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h @@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN @property (readonly, nonatomic) NSData * publicKeyData; +// Count of how many times this keypair has been used to signMessageECDSA_DER. +@property (readonly, nonatomic, assign) unsigned signatureCount; + - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m index 2d073f64d11fb4..23b602e2e7208c 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m @@ -69,11 +69,15 @@ - (instancetype)init } _publicKey = SecKeyCopyPublicKey(_privateKey); + _signatureCount = 0; + return self; } - (NSData *)signMessageECDSA_DER:(NSData *)message { + ++_signatureCount; + CFErrorRef error = NULL; CFDataRef outData = SecKeyCreateSignature(_privateKey, kSecKeyAlgorithmECDSASignatureMessageX962SHA256, (__bridge CFDataRef) message, &error); From c34ef751b0daf635f97a3981a6e7810242a72d3b Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:39:10 -0400 Subject: [PATCH 107/159] RVC opstate TC 2.1 - use PICs to test OperationalState and OperationalError (#28348) * check for new pixit values * add steps * change pixit arg to int * use pics instead of pixit * address comments * address comments * clean up --- src/python_testing/TC_RVCOPSTATE_2_1.py | 133 +++++++++++++++++++++--- src/python_testing/TC_RVCOPSTATE_2_3.py | 28 ++--- 2 files changed, 131 insertions(+), 30 deletions(-) diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index acd0ba35b6a4f4..29d2757363a726 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -33,6 +33,22 @@ async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcOperationalState return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + async def read_and_validate_opstate(self, step, expected_state): + self.print_step(step, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.RvcOperationalState.Attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, expected_state, + "OperationalState(%s) should equal %s" % (operational_state, expected_state)) + + async def read_and_validate_operror(self, step, expected_error): + self.print_step(step, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.RvcOperationalState.Attributes.OperationalError) + logging.info("OperationalError: %s" % (operational_error)) + asserts.assert_equal(operational_error.errorStateID, expected_error, + "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + @async_test_body async def test_TC_RVCOPSTATE_2_1(self): @@ -57,7 +73,7 @@ async def test_TC_RVCOPSTATE_2_1(self): phase_list_len = len(phase_list) - asserts.assert_less_equal(phase_list_len, 32, "PhaseList must have no more than 32 entries!") + asserts.assert_less_equal(phase_list_len, 32, "PhaseList length(%d) must be less than 32!" % phase_list_len) if self.check_pics("RVCOPSTATE.S.A0001"): self.print_step(3, "Read CurrentPhase attribute") @@ -65,10 +81,10 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("CurrentPhase: %s" % (current_phase)) if phase_list == NullValue: - asserts.assert_true(current_phase == NullValue, "CurrentPhase should be null") + asserts.assert_true(current_phase == NullValue, "CurrentPhase(%s) should be null" % current_phase) else: - asserts.assert_true(0 <= current_phase and current_phase <= (phase_list_len - 1), - "CurrentPhase must be between 0 and (phase-list-size - 1)") + asserts.assert_true(0 <= current_phase < phase_list_len, + "CurrentPhase(%s) must be between 0 and %d" % (current_phase, (phase_list_len - 1))) if self.check_pics("RVCOPSTATE.S.A0002"): self.print_step(4, "Read CountdownTime attribute") @@ -77,7 +93,8 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("CountdownTime: %s" % (countdown_time)) if countdown_time is not NullValue: - asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, "CountdownTime must be between 0 and 259200") + asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, + "CountdownTime(%s) must be between 0 and 259200" % countdown_time) if self.check_pics("RVCOPSTATE.S.A0003"): self.print_step(5, "Read OperationalStateList attribute") @@ -86,20 +103,22 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("OperationalStateList: %s" % (operational_state_list)) - state_ids = [s.operationalStateID for s in operational_state_list] - defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] defined_states.extend(state.value for state in Clusters.RvcOperationalState.Enums.OperationalStateEnum if state is not Clusters.RvcOperationalState.Enums.OperationalStateEnum.kUnknownEnumValue) - for state_id in state_ids: - in_range = (0x8000 <= state_id and state_id <= 0xBFFF) - asserts.assert_true(state_id in defined_states or in_range, - "Found a OperationalStateList entry with invalid ID value!") - if state_id == Clusters.OperationalState.Enums.OperationalStateEnum.kError: - error_present_in_list = True - asserts.assert_true(error_present_in_list, "The OperationalStateList does not have an ID entry of Error(0x03)") + for state in operational_state_list: + in_range = (0x80 <= state.operationalStateID <= 0xBF) + asserts.assert_true(state.operationalStateID in defined_states or in_range, + "Found an OperationalStateList entry with an invalid ID value: %s" % state.operationalStateID) + if in_range: + asserts.assert_true(state.operationalStateLabel is not None, + "The OperationalStateLabel should be populated") + if state.operationalStateID == Clusters.OperationalState.Enums.OperationalStateEnum.kError: + error_state_present = True + + asserts.assert_true(error_state_present, "The OperationalStateList does not have an ID entry of Error(0x03)") if self.check_pics("RVCOPSTATE.S.A0004"): self.print_step(6, "Read OperationalState attribute") @@ -108,9 +127,38 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("OperationalState: %s" % (operational_state)) - in_range = (0x8000 <= operational_state and operational_state <= 0xBFFF) + in_range = (0x80 <= operational_state and operational_state <= 0xBF) asserts.assert_true(operational_state in defined_states or in_range, "OperationalState has an invalid ID value!") + if self.check_pics("RVCOPSTATE.S.M.ST_STOPPED"): + self.print_step("6a", "Manually put the device in the stopped state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6b", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kStopped) + if self.check_pics("RVCOPSTATE.S.M.ST_RUNNING"): + self.print_step("6c", "Manually put the device in the running state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6d", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kRunning) + if self.check_pics("RVCOPSTATE.S.M.ST_PAUSED"): + self.print_step("6e", "Manually put the device in the paused state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6f", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kPaused) + if self.check_pics("RVCOPSTATE.S.M.ST_ERROR"): + self.print_step("6g", "Manually put the device in the error state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError) + if self.check_pics("RVCOPSTATE.S.M.ST_SEEKING_CHARGER"): + self.print_step("6i", "Manually put the device in the seeking charger state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6j", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kSeekingCharger) + if self.check_pics("RVCOPSTATE.S.M.ST_CHARGING"): + self.print_step("6k", "Manually put the device in the charging state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6l", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kCharging) + if self.check_pics("RVCOPSTATE.S.M.ST_DOCKED"): + self.print_step("6m", "Manually put the device in the docked state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6n", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kDocked) + if self.check_pics("RVCOPSTATE.S.A0005"): self.print_step(7, "Read OperationalError attribute") operational_error = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, @@ -124,9 +172,60 @@ async def test_TC_RVCOPSTATE_2_1(self): defined_errors.extend(error.value for error in Clusters.RvcOperationalState.Enums.ErrorStateEnum if error is not Clusters.RvcOperationalState.Enums.ErrorStateEnum.kUnknownEnumValue) - in_range = (0x8000 <= operational_error.errorStateID and operational_error.errorStateID <= 0xBFFF) + in_range = (0x80 <= operational_error.errorStateID <= 0xBF) asserts.assert_true(operational_error.errorStateID in defined_errors - or in_range, "OperationalError has an invalid ID value!") + or in_range, "OperationalError(%s) has an invalid ID value!" % operational_error.errorStateID) + if in_range: + asserts.assert_true(operational_error.errorStateLabel is not None, "ErrorStateLabel should be populated") + + if self.check_pics("RVCOPSTATE.S.M.ERR_NO_ERROR"): + self.print_step("7a", "Manually put the device in the no error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7b", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kNoError) + if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME"): + self.print_step("7c", "Manually put the device in the unable to start or resume error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume) + if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION"): + self.print_step("7e", "Manually put the device in the unable to complete operation error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation) + if self.check_pics("RVCOPSTATE.S.M.ERR_COMMAND_INVALID_STATE"): + self.print_step("7g", "Manually put the device in the command invalid error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState) + if self.check_pics("RVCOPSTATE.S.M.ERR_FAILED_FIND_DOCK"): + self.print_step("7i", "Manually put the device in the failed to find dock error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7j", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kFailedToFindChargingDock) + if self.check_pics("RVCOPSTATE.S.M.ERR_STUCK"): + self.print_step("7k", "Manually put the device in the stuck error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7l", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kStuck) + if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING"): + self.print_step("7m", "Manually put the device in the dust bin missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7n", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinMissing) + if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_FULL"): + self.print_step("7o", "Manually put the device in the dust bin full error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7p", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinFull) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY"): + self.print_step("7q", "Manually put the device in the water tank empty error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7r", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankEmpty) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING"): + self.print_step("7s", "Manually put the device in the water tank missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7t", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankMissing) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN"): + self.print_step("7u", "Manually put the device in the water tank lid open error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7v", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankLidOpen) + if self.check_pics("RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING"): + self.print_step("7w", "Manually put the device in the mop cleaning pad missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7x", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kMopCleaningPadMissing) if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index 288e40f7099ba3..405523cb4a4f25 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -77,29 +77,30 @@ async def test_TC_RVCOPSTATE_2_3(self): defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] - state_ids = [s.operationalStateID for s in op_state_list] + state_ids = set([s.operationalStateID for s in op_state_list]) asserts.assert_true(all(id in state_ids for id in defined_states), "OperationalStateList is missing a required entry") self.print_step(4, "Send Pause command") ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(5, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) logging.info("OperationalState: %s" % (operational_state)) asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, - "OperationalState ID should be Paused(0x02)") + "OperationalState(%s) should be Paused(0x02)" % operational_state) self.print_step(6, "Read CountdownTime attribute") initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (initial_countdown_time)) if initial_countdown_time is not NullValue: - in_range = (1 <= initial_countdown_time and initial_countdown_time <= 259200) - asserts.assert_true(initial_countdown_time is NullValue or in_range, "invalid CountdownTime") + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null" % initial_countdown_time) self.print_step(7, "Waiting for 5 seconds") time.sleep(5) @@ -107,31 +108,32 @@ async def test_TC_RVCOPSTATE_2_3(self): self.print_step(8, "Read CountdownTime attribute") countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (countdown_time)) - asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, "invalid CountdownTime") + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) asserts.assert_equal(countdown_time, initial_countdown_time, - "CountdownTime does not equal to the intial CountdownTime %s" % initial_countdown_time) + "CountdownTime(%s) does not equal to the intial CountdownTime (%s)" % (countdown_time, initial_countdown_time)) self.print_step(9, "Send Pause command") ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(10, "Send Resume command") ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(11, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) logging.info("OperationalState: %s" % (operational_state)) asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, - "OperationalState ID should be Running(0x01)") + "OperationalState(%s) should be Running(0x01)" % operational_state) self.print_step(12, "Send Resume command") ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") input("Press Enter when done.\n") @@ -140,7 +142,7 @@ async def test_TC_RVCOPSTATE_2_3(self): ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID should be CommandInvalidInState(0x03)") + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") input("Press Enter when done.\n") @@ -149,7 +151,7 @@ async def test_TC_RVCOPSTATE_2_3(self): ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID should be CommandInvalidInState(0x03)") + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) if __name__ == "__main__": From 058817a737bed1097e587cb0c31229e421cd7630 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Wed, 2 Aug 2023 05:46:40 +0900 Subject: [PATCH 108/159] Decouple Generated API (#28425) --- build/chip/java/config.gni | 4 + src/controller/java/AndroidCallbacks.cpp | 31 ++++--- .../java/AndroidDeviceControllerWrapper.cpp | 20 ++--- src/controller/java/BUILD.gn | 65 +++++++++------ .../ChipDeviceController.java | 12 +-- .../devicecontroller/ThreadScanResult.java | 82 +++++++++++++++++++ .../chip/devicecontroller/WiFiScanResult.java | 70 ++++++++++++++++ 7 files changed, 230 insertions(+), 54 deletions(-) create mode 100644 src/controller/java/src/chip/devicecontroller/ThreadScanResult.java create mode 100644 src/controller/java/src/chip/devicecontroller/WiFiScanResult.java diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index ca18c9231fef1d..fbc1d95755863f 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -15,6 +15,9 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] + + # The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters) + matter_enable_java_generated_api = true matter_enable_java_compilation = false if (java_path != "" && current_os == "linux") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] @@ -27,6 +30,7 @@ declare_args() { [ "${java_path}/include/linux/" ] } + matter_enable_java_generated_api = false matter_enable_java_compilation = true } } diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index e236aef95fc41a..d55dfdf953c91c 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -17,8 +17,10 @@ #include "AndroidCallbacks.h" #include #include +#if USE_JAVA_TLV_ENCODE_DECODE #include #include +#endif #include #include #include @@ -243,14 +245,17 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jobject value = DecodeAttributeValue(aPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + + value = DecodeAttributeValue(aPath, readerForJavaObject, &err); // If we don't know this attribute, suppress it. if (err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB) { @@ -260,7 +265,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(attributePathObj, nullptr, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(attributePathObj, nullptr, CHIP_JNI_ERROR_EXCEPTION_THROWN)); - +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); @@ -354,10 +359,8 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -365,7 +368,11 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. if (err == CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB) { @@ -374,6 +381,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(nullptr, eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(nullptr, eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); @@ -699,10 +707,8 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -710,11 +716,16 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. VerifyOrReturn(err != CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB); VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 974cb882cd2a9e..110121d6e2e41c 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -653,12 +653,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); jclass wiFiInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", - wiFiInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/WiFiScanResult", + wiFiInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class WiFiScanResult"); return; } jmethodID wiFiInterfaceScanResultStructCtor = @@ -666,8 +665,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); if (wiFiInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find WiFiScanResult constructor"); return; } @@ -717,12 +715,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); jclass threadInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", - threadInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ThreadScanResult", + threadInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class ThreadScanResult"); return; } jmethodID threadInterfaceScanResultStructCtor = @@ -731,8 +728,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "Integer;[BLjava/lang/Integer;Ljava/lang/Integer;)V"); if (threadInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find ThreadScanResult constructor"); return; } diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index d6c78191e37fe0..39a8ab889d48ba 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -29,6 +29,8 @@ shared_library("jni") { output_extension = "dylib" } + defines = [] + # Temporary while we have circular dependencies between codegen.py and zap # generated files check_includes = false @@ -53,23 +55,13 @@ shared_library("jni") { "AttestationTrustStoreBridge.h", "BaseCHIPCluster-JNI.cpp", "CHIPAttributeTLVValueDecoder.h", - "CHIPDefaultCallbacks.cpp", - "CHIPDefaultCallbacks.h", "CHIPDeviceController-JNI.cpp", - "CHIPTLVValueDecoder-JNI.cpp", "DeviceAttestationDelegateBridge.cpp", "DeviceAttestationDelegateBridge.h", - "zap-generated/CHIPAttributeTLVValueDecoder.cpp", - "zap-generated/CHIPClustersWrite-JNI.cpp", - "zap-generated/CHIPEventTLVValueDecoder.cpp", - "zap-generated/CHIPInvokeCallbacks.cpp", - "zap-generated/CHIPInvokeCallbacks.h", - "zap-generated/CHIPReadCallbacks.cpp", ] deps = [ "${chip_root}/src/controller/data_model", - "${chip_root}/src/controller/data_model:java-jni-sources", "${chip_root}/src/credentials:default_attestation_verifier", "${chip_root}/src/inet", "${chip_root}/src/lib", @@ -77,8 +69,26 @@ shared_library("jni") { "${chip_root}/src/platform", ] + if (matter_enable_java_generated_api) { + defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ] + + sources += [ + "CHIPDefaultCallbacks.cpp", + "CHIPDefaultCallbacks.h", + "CHIPTLVValueDecoder-JNI.cpp", + "zap-generated/CHIPAttributeTLVValueDecoder.cpp", + "zap-generated/CHIPClustersWrite-JNI.cpp", + "zap-generated/CHIPEventTLVValueDecoder.cpp", + "zap-generated/CHIPInvokeCallbacks.cpp", + "zap-generated/CHIPInvokeCallbacks.h", + "zap-generated/CHIPReadCallbacks.cpp", + ] + + deps += [ "${chip_root}/src/controller/data_model:java-jni-sources" ] + } + if (matter_enable_java_compilation) { - defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] + defines += [ "JAVA_MATTER_CONTROLLER_TEST" ] sources += [ "${chip_root}/src/controller/ExamplePersistentStorage.cpp", @@ -313,14 +323,6 @@ android_library("java") { sources = [ "generated/java/chip/devicecontroller/ClusterIDMapping.java", - "generated/java/chip/devicecontroller/ClusterReadMapping.java", - "generated/java/chip/devicecontroller/ClusterWriteMapping.java", - "src/chip/clusterinfo/ClusterCommandCallback.java", - "src/chip/clusterinfo/ClusterInfo.java", - "src/chip/clusterinfo/CommandParameterInfo.java", - "src/chip/clusterinfo/CommandResponseInfo.java", - "src/chip/clusterinfo/DelegatedClusterCallback.java", - "src/chip/clusterinfo/InteractionInfo.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -329,7 +331,6 @@ android_library("java") { "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", "src/chip/devicecontroller/ChipIdLookup.java", - "src/chip/devicecontroller/ChipTLVValueDecoder.java", "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DeviceAttestationDelegate.java", "src/chip/devicecontroller/DiscoveredDevice.java", @@ -348,7 +349,9 @@ android_library("java") { "src/chip/devicecontroller/ReportEventCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", + "src/chip/devicecontroller/ThreadScanResult.java", "src/chip/devicecontroller/UnpairDeviceCallback.java", + "src/chip/devicecontroller/WiFiScanResult.java", "src/chip/devicecontroller/WriteAttributesCallback.java", "src/chip/devicecontroller/WriteAttributesCallbackJni.java", "src/chip/devicecontroller/model/AttributeState.java", @@ -361,12 +364,26 @@ android_library("java") { "src/chip/devicecontroller/model/EventState.java", "src/chip/devicecontroller/model/InvokeElement.java", "src/chip/devicecontroller/model/NodeState.java", - "zap-generated/chip/devicecontroller/ChipClusters.java", - "zap-generated/chip/devicecontroller/ChipEventStructs.java", - "zap-generated/chip/devicecontroller/ChipStructs.java", - "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", ] + if (matter_enable_java_generated_api) { + sources += [ + "generated/java/chip/devicecontroller/ClusterReadMapping.java", + "generated/java/chip/devicecontroller/ClusterWriteMapping.java", + "src/chip/clusterinfo/ClusterCommandCallback.java", + "src/chip/clusterinfo/ClusterInfo.java", + "src/chip/clusterinfo/CommandParameterInfo.java", + "src/chip/clusterinfo/CommandResponseInfo.java", + "src/chip/clusterinfo/DelegatedClusterCallback.java", + "src/chip/clusterinfo/InteractionInfo.java", + "src/chip/devicecontroller/ChipTLVValueDecoder.java", + "zap-generated/chip/devicecontroller/ChipClusters.java", + "zap-generated/chip/devicecontroller/ChipEventStructs.java", + "zap-generated/chip/devicecontroller/ChipStructs.java", + "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", + ] + } + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 916f65fb270819..33cb7a9ff3ae6e 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -389,10 +389,8 @@ public void onScanNetworksFailure(int errorCode) { public void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults) { + Optional> wiFiScanResults, + Optional> threadScanResults) { if (scanNetworksListener != null) { scanNetworksListener.onScanNetworksSuccess( networkingStatus, debugText, wiFiScanResults, threadScanResults); @@ -1268,10 +1266,8 @@ public interface ScanNetworksListener { void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults); + Optional> wiFiScanResults, + Optional> threadScanResults); } /** Interface to listen for callbacks from CHIPDeviceController. */ diff --git a/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java new file mode 100644 index 00000000000000..64c837bdca411d --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020-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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class ThreadScanResult { + public Integer panId; + public Long extendedPanId; + public String networkName; + public Integer channel; + public Integer version; + public byte[] extendedAddress; + public Integer rssi; + public Integer lqi; + + public ThreadScanResult( + Integer panId, + Long extendedPanId, + String networkName, + Integer channel, + Integer version, + byte[] extendedAddress, + Integer rssi, + Integer lqi) { + this.panId = panId; + this.extendedPanId = extendedPanId; + this.networkName = networkName; + this.channel = channel; + this.version = version; + this.extendedAddress = extendedAddress; + this.rssi = rssi; + this.lqi = lqi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadScanResult {\n"); + output.append("\tpanId: "); + output.append(panId); + output.append("\n"); + output.append("\textendedPanId: "); + output.append(extendedPanId); + output.append("\n"); + output.append("\tnetworkName: "); + output.append(networkName); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tversion: "); + output.append(version); + output.append("\n"); + output.append("\textendedAddress: "); + output.append(Arrays.toString(extendedAddress)); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} diff --git a/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java new file mode 100644 index 00000000000000..bcc01e0af26874 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020-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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class WiFiScanResult { + public Integer security; + public byte[] ssid; + public byte[] bssid; + public Integer channel; + public Integer wiFiBand; + public Integer rssi; + + public WiFiScanResult( + Integer security, + byte[] ssid, + byte[] bssid, + Integer channel, + Integer wiFiBand, + Integer rssi) { + this.security = security; + this.ssid = ssid; + this.bssid = bssid; + this.channel = channel; + this.wiFiBand = wiFiBand; + this.rssi = rssi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("WiFiScanResult {\n"); + output.append("\tsecurity: "); + output.append(security); + output.append("\n"); + output.append("\tssid: "); + output.append(Arrays.toString(ssid)); + output.append("\n"); + output.append("\tbssid: "); + output.append(Arrays.toString(bssid)); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\twiFiBand: "); + output.append(wiFiBand); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} From 1440dd04dad16d5d88d2059f9ec9d7036319fe97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 20:56:46 +0000 Subject: [PATCH 109/159] Bump natiginfo/action-detekt-all from 1.23.0 to 1.23.1 (#28406) Bumps [natiginfo/action-detekt-all](https://github.com/natiginfo/action-detekt-all) from 1.23.0 to 1.23.1. - [Release notes](https://github.com/natiginfo/action-detekt-all/releases) - [Commits](https://github.com/natiginfo/action-detekt-all/compare/1.23.0...1.23.1) --- updated-dependencies: - dependency-name: natiginfo/action-detekt-all dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/kotlin-style.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml index 921e89528d7ee5..8ea7eb2fe8d388 100644 --- a/.github/workflows/kotlin-style.yaml +++ b/.github/workflows/kotlin-style.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.0 + uses: natiginfo/action-detekt-all@1.23.1 # Detekt seems not to like circular symlinks, so we set up # explicit paths below with: From b2b89d0de274afdec007de90c06bb4f8f1595e6c Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Tue, 1 Aug 2023 17:59:07 -0400 Subject: [PATCH 110/159] use pics instead of pixit (#28415) --- src/python_testing/TC_RVCCLEANM_2_1.py | 6 +----- src/python_testing/TC_RVCRUNM_2_1.py | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 8a2683c2317472..e0b699d8373498 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -50,14 +50,10 @@ async def test_TC_RVCCLEANM_2_1(self): asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, "PIXIT_MODEFAIL must be included on the command line in " "the --int-arg flag as PIXIT_MODEFAIL:") - asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, - "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " - "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] - self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] asserts.assert_true(self.check_pics("RVCCLEANM.S.A0000"), "RVCCLEANM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.A0001"), "RVCCLEANM.S.A0001 must be supported") @@ -101,7 +97,7 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - if self.can_test_mode_failure is True: + if self.check_pics("RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE"): self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) input("Press Enter when done.\n") diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index f9bd8937ae59bb..1ef5cefe6525e6 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -50,14 +50,10 @@ async def test_TC_RVCRUNM_2_1(self): asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, "PIXIT_MODEFAIL must be included on the command line in " "the --int-arg flag as PIXIT_MODEFAIL:") - asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, - "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " - "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] - self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") @@ -101,7 +97,7 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - if self.can_test_mode_failure is True: + if self.check_pics("RVCRUNM.S.M.CAN_TEST_MODE_FAILURE"): self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) input("Press Enter when done.\n") From f7a32131c2fa3060def0c6f2ab8a49c28a7d1373 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 1 Aug 2023 19:51:27 -0400 Subject: [PATCH 111/159] Re-run zap_convert_all.py (#28459) --- .../all-clusters-common/all-clusters-app.zap | 790 ++---- .../all-clusters-minimal-app.zap | 20 +- .../bridge-app/bridge-common/bridge-app.zap | 5 +- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 5 +- ...r_humiditysensor_thermostat_56de3d5f45.zap | 18 +- ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 2 +- .../rootnode_contactsensor_lFAGG1bfRO.zap | 5 +- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 5 +- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 5 +- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 5 +- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 2 +- .../rootnode_flowsensor_1zVxHedlaV.zap | 5 +- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 2 +- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 5 +- .../rootnode_lightsensor_lZQycTFcJK.zap | 5 +- .../rootnode_occupancysensor_iHyVgifZuo.zap | 5 +- .../rootnode_onofflight_bbs1b7IaOV.zap | 5 +- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 5 +- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 5 +- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 5 +- .../chef/devices/rootnode_pump_a811bb33a0.zap | 5 +- ...otnode_roboticvacuumcleaner_1807ff0c49.zap | 54 +- .../devices/rootnode_speaker_RpzeXdimqA.zap | 5 +- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 5 +- .../rootnode_thermostat_bm3fb8dhYi.zap | 5 +- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 5 +- examples/chef/devices/template.zap | 184 +- .../contact-sensor-app.zap | 5 +- .../dishwasher-common/dishwasher-app.zap | 18 +- .../light-switch-common/light-switch-app.zap | 6 +- .../data_model/lighting-app-thread.zap | 2 +- .../data_model/lighting-app-wifi.zap | 2 +- .../lighting-common/lighting-app.zap | 5 +- .../lighting-app/nxp/zap/lighting-on-off.zap | 5 +- examples/lighting-app/qpg/zap/light.zap | 2 +- .../silabs/data_model/lighting-thread-app.zap | 14 +- .../silabs/data_model/lighting-wifi-app.zap | 4 +- examples/lock-app/lock-common/lock-app.zap | 2 +- examples/lock-app/nxp/zap/lock-app.zap | 5 +- examples/lock-app/qpg/zap/lock.zap | 2 +- .../log-source-common/log-source-app.zap | 5 +- .../ota-provider-common/ota-provider-app.zap | 5 +- .../ota-requestor-app.zap | 5 +- .../placeholder/linux/apps/app1/config.zap | 6 +- .../placeholder/linux/apps/app2/config.zap | 4 +- examples/pump-app/pump-common/pump-app.zap | 5 +- .../silabs/data_model/pump-thread-app.zap | 2 +- .../silabs/data_model/pump-wifi-app.zap | 2 +- .../pump-controller-app.zap | 5 +- .../resource-monitoring-app.zap | 2394 +---------------- .../smoke-co-alarm-app.zap | 14 +- .../temperature-measurement.zap | 5 +- .../thermostat-common/thermostat.zap | 5 +- examples/tv-app/tv-common/tv-app.zap | 5 +- .../tv-casting-common/tv-casting-app.zap | 5 +- .../virtual-device-app.zap | 6 +- examples/window-app/common/window-app.zap | 2 +- .../zap/tests/inputs/all-clusters-app.zap | 20 +- .../tools/zap/tests/inputs/lighting-app.zap | 5 +- .../data_model/controller-clusters.zap | 304 +-- 60 files changed, 570 insertions(+), 3473 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 8dd918c4cfcbbd..f7983bd036f737 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -13554,15 +13554,15 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "SetTemperature", + "name": "ChangeToMode", "code": 0, "mfgCode": null, "source": "client", @@ -13606,21 +13606,31 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "TemperatureSetpoint", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13630,13 +13640,13 @@ "reportableChange": 0 }, { - "name": "MinTemperature", + "name": "CurrentMode", "code": 1, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13646,13 +13656,13 @@ "reportableChange": 0 }, { - "name": "MaxTemperature", + "name": "StartUpMode", "code": 2, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13662,13 +13672,13 @@ "reportableChange": 0 }, { - "name": "Step", + "name": "OnMode", "code": 3, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13678,24 +13688,24 @@ "reportableChange": 0 }, { - "name": "SelectedTemperatureLevel", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedTemperatureLevels", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -13710,12 +13720,12 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13726,8 +13736,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -13742,48 +13752,68 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13793,7 +13823,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -13808,56 +13838,82 @@ ] }, { - "name": "Refrigerator Alarm", - "code": 87, + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, "mfgCode": null, - "define": "REFRIGERATOR_ALARM_CLUSTER", + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "Mask", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "State", + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", "code": 2, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Supported", + "name": "OnMode", "code": 3, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13959,22 +14015,13 @@ "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "Notify", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "Laundry Washer Mode", - "code": 81, + "name": "RVC Run Mode", + "code": 84, "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "define": "RVC_RUN_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -14023,10 +14070,10 @@ ] }, { - "name": "Laundry Washer Mode", - "code": 81, + "name": "RVC Run Mode", + "code": 84, "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "define": "RVC_RUN_MODE_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -14047,7 +14094,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14063,7 +14110,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14079,7 +14126,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14095,7 +14142,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14111,7 +14158,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14127,7 +14174,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14143,7 +14190,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14159,7 +14206,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14203,10 +14250,10 @@ ] }, { - "name": "Refrigerator And Temperature Controlled Cabinet Mode", - "code": 82, + "name": "RVC Clean Mode", + "code": 85, "mfgCode": null, - "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "define": "RVC_CLEAN_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -14255,10 +14302,10 @@ ] }, { - "name": "Refrigerator And Temperature Controlled Cabinet Mode", - "code": 82, + "name": "RVC Clean Mode", + "code": 85, "mfgCode": null, - "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "define": "RVC_CLEAN_MODE_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -14279,7 +14326,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14295,7 +14342,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14311,7 +14358,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14327,7 +14374,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14343,7 +14390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14359,7 +14406,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14375,7 +14422,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14391,7 +14438,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14435,15 +14482,15 @@ ] }, { - "name": "RVC Run Mode", - "code": 84, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "RVC_RUN_MODE_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "ChangeToMode", + "name": "SetTemperature", "code": 0, "mfgCode": null, "source": "client", @@ -14487,31 +14534,21 @@ ] }, { - "name": "RVC Run Mode", - "code": 84, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "RVC_RUN_MODE_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "SupportedModes", + "name": "TemperatureSetpoint", "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14521,13 +14558,13 @@ "reportableChange": 0 }, { - "name": "CurrentMode", + "name": "MinTemperature", "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14537,13 +14574,13 @@ "reportableChange": 0 }, { - "name": "StartUpMode", + "name": "MaxTemperature", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14553,13 +14590,13 @@ "reportableChange": 0 }, { - "name": "OnMode", + "name": "Step", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14569,24 +14606,24 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "SelectedTemperatureLevel", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "SupportedTemperatureLevels", + "code": 5, "mfgCode": null, "side": "server", "type": "array", @@ -14601,12 +14638,12 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14617,8 +14654,8 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -14633,68 +14670,48 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "RVC Clean Mode", - "code": 85, - "mfgCode": null, - "define": "RVC_CLEAN_MODE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ + }, { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "client", + "side": "server", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14704,7 +14721,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -14719,82 +14736,56 @@ ] }, { - "name": "RVC Clean Mode", - "code": 85, + "name": "Refrigerator Alarm", + "code": 87, "mfgCode": null, - "define": "RVC_CLEAN_MODE_CLUSTER", + "define": "REFRIGERATOR_ALARM_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "SupportedModes", + "name": "Mask", "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpMode", + "name": "State", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnMode", + "name": "Supported", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14896,6 +14887,15 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "Notify", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -14975,7 +14975,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14991,7 +14991,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15007,7 +15007,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15023,7 +15023,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15039,7 +15039,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15055,7 +15055,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15071,7 +15071,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15087,7 +15087,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15531,7 +15531,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", @@ -22854,330 +22854,6 @@ } ] }, - { - "name": "Nitric Oxide Concentration Measurement", - "code": 1042, - "mfgCode": null, - "define": "NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Nitric Oxide Concentration Measurement", - "code": 1042, - "mfgCode": null, - "define": "NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PeakMeasuredValue", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PeakMeasuredValueWindow", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "elapsed_s", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AverageMeasuredValue", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AverageMeasuredValueWindow", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "elapsed_s", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Uncertainty", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MeasurementUnit", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "MeasurementUnitEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MeasurementMedium", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "MeasurementMediumEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LevelValue", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "LevelValueEnum", - "included": 0, - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "1", - "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 - } - ] - }, { "name": "Nitrogen Dioxide Concentration Measurement", "code": 1043, diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 1d03d27c0e24e0..2c6f2767baab80 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "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": [ @@ -2732,7 +2732,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11390,7 +11390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23137,7 +23137,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 4fd1ae893aaada..51a214d8750447 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7625,5 +7625,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 05a923ced5d212..9ab03f1604e7fe 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7514,5 +7514,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 2e1b66115e61f7..0647999f636f36 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -11136,7 +11136,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11152,7 +11152,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11168,7 +11168,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11184,7 +11184,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11200,7 +11200,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11216,7 +11216,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11232,7 +11232,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11248,7 +11248,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11264,7 +11264,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 5cfbf082e43abd..6287c65ac3867c 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index e89aecd12781ae..8642b2a170521d 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6319,5 +6319,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 7fba5c4134daf5..0ab727ecd5abc2 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7539,5 +7539,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 5a46308f437617..da96d4569de5ef 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -9312,5 +9312,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 79e9cc632850e1..c38514edfb40ae 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8609,5 +8609,6 @@ "endpointVersion": 1, "deviceIdentifier": 269 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 321bbb3b20bf07..1975bfaf97c3e3 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 886a475473db1f..37a010401215f4 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 774 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 945ddd6d1e5ce8..b95ce7015634cb 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index b978f4ec63924f..e7267012c6188a 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 775 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index f9afc87acb29fe..57b5f0a2cb1180 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6383,5 +6383,6 @@ "endpointVersion": 1, "deviceIdentifier": 262 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 3afbcce18145ec..01c4eefa322d6c 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6495,5 +6495,6 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 936482b5b5f361..f134cca90449a2 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 0f1824d8ea2bea..5205af24b4419f 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index fbecf55ef040e4..e6984ffac25eae 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7167,5 +7167,6 @@ "endpointVersion": 1, "deviceIdentifier": 266 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index bc3b79d37dc51b..1145564264c61e 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6447,5 +6447,6 @@ "endpointVersion": 1, "deviceIdentifier": 773 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index 3306819f09d72d..a20540b631e664 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7538,5 +7538,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 237921c27cd1ca..746259df3636b6 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -7042,7 +7042,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7390,7 +7390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7406,7 +7406,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7422,7 +7422,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7438,7 +7438,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7454,7 +7454,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7470,7 +7470,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7486,7 +7486,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7502,7 +7502,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7622,7 +7622,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7638,7 +7638,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7654,7 +7654,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7670,7 +7670,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7686,7 +7686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7702,7 +7702,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7718,7 +7718,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7734,7 +7734,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7862,7 +7862,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7878,7 +7878,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7894,7 +7894,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7910,7 +7910,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7926,7 +7926,7 @@ "side": "server", "type": "enum8", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7942,7 +7942,7 @@ "side": "server", "type": "ErrorStateStruct", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7958,7 +7958,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7974,7 +7974,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7990,7 +7990,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8006,7 +8006,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 2a6dbf5b9ce81d..3e9137e4de49c1 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6599,5 +6599,6 @@ "endpointVersion": 1, "deviceIdentifier": 34 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index f1dbfdd711a930..ec498c5a4cb846 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 4ab16c9f1ee7b1..e71fbc336eceaf 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7847,5 +7847,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index df025f16b7344f..2ed25d1db597e8 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7049,5 +7049,6 @@ "endpointVersion": 1, "deviceIdentifier": 514 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 4112ca37d54124..3df60484a7fb27 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5478,7 +5478,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5494,7 +5494,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5538,7 +5538,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5742,7 +5742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5786,7 +5786,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6010,11 +6010,11 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6030,7 +6030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6046,7 +6046,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6062,7 +6062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6078,7 +6078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6122,7 +6122,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6138,7 +6138,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6154,7 +6154,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6170,7 +6170,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6186,7 +6186,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6392,7 +6392,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6408,7 +6408,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6424,7 +6424,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6440,7 +6440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6610,7 +6610,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6830,7 +6830,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6846,7 +6846,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6862,7 +6862,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6878,7 +6878,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6998,7 +6998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7014,7 +7014,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7030,7 +7030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7074,7 +7074,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7238,7 +7238,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8006,7 +8006,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8022,7 +8022,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8038,7 +8038,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8054,7 +8054,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8332,7 +8332,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8348,7 +8348,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8364,7 +8364,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8380,7 +8380,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8630,7 +8630,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8678,7 +8678,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8694,7 +8694,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8726,7 +8726,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8742,7 +8742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8758,7 +8758,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8774,7 +8774,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8790,7 +8790,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8806,7 +8806,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8822,7 +8822,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8838,7 +8838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8854,7 +8854,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8870,7 +8870,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8886,7 +8886,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8902,7 +8902,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8918,7 +8918,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8934,7 +8934,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8950,7 +8950,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8966,7 +8966,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8982,7 +8982,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8998,7 +8998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9014,7 +9014,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9030,7 +9030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9046,7 +9046,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9062,7 +9062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9078,7 +9078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9094,7 +9094,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9110,7 +9110,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9126,7 +9126,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9142,7 +9142,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9158,7 +9158,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9174,7 +9174,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9190,7 +9190,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9206,7 +9206,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9222,7 +9222,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9238,7 +9238,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9254,7 +9254,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9270,7 +9270,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9286,7 +9286,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9302,7 +9302,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0019", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9350,7 +9350,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9366,7 +9366,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9382,7 +9382,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFEFF", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9398,7 +9398,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9414,7 +9414,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9426,7 +9426,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9442,7 +9442,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9458,7 +9458,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9474,7 +9474,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9638,7 +9638,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9654,7 +9654,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9670,7 +9670,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9686,7 +9686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index fc310d97ca9bdd..cbc839b2f547a2 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8785,5 +8785,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index bcf0f6675a4cad..ecf62fc64b33d5 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "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": [ @@ -8900,7 +8900,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8932,7 +8932,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 21e9efcf621d77..fd8e23449ecf4e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4879,7 +4879,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -4895,7 +4895,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 55e2476e6c87ad..f70ddb258429ec 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index f5c6ce65b0d768..181fd612155a8a 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index c3bb8210d8447e..b972b176452241 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7758,5 +7758,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index c21d9c92bbd394..80af441b327af0 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -9113,5 +9113,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 856776883b1037..d1924fe594705d 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 233178fe4f6ced..978b68609f1e6d 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5574,7 +5574,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5590,7 +5590,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5606,7 +5606,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5638,7 +5638,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5654,7 +5654,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7760,7 +7760,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index b300942fd346eb..048d6ef499fe67 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7854,7 +7854,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 12eaaaa40f4a66..3537aa2fb387b7 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 3503d6e3b35e36..e570feec238688 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6720,5 +6720,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 56923296c6210a..b51392cfaf1cc6 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index 81fc0a96b3a020..471aecc6982341 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -3527,5 +3527,6 @@ "endpointVersion": 1, "deviceIdentifier": null } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index f8dd677884022c..ecce96b7a0caab 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4991,5 +4991,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 5fbd879ead4619..5a2b1f80a99eef 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7468,5 +7468,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 3ad0e22790dde0..a13f3c1ac90309 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -1708,7 +1708,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14553,7 +14553,7 @@ ], "endpoints": [ { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 40723d94cd9583..28aee033676628 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -14579,7 +14579,7 @@ ], "endpoints": [ { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 2ba4c43e611618..40391d5bb8d29a 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7985,5 +7985,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index 2fabb6f0cc219e..3adcc3fa7ff8e9 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index 2fabb6f0cc219e..3adcc3fa7ff8e9 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 83b5113b422d07..6523e9ff34941f 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6813,5 +6813,6 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap index 6a841dec856d2a..edf84a1839d9fe 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "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": [ @@ -6609,2386 +6609,6 @@ } ] }, - { - "name": "Ceramic Filter Monitoring", - "code": 115, - "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ceramic Filter Monitoring", - "code": 115, - "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Electrostatic Filter Monitoring", - "code": 116, - "mfgCode": null, - "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Electrostatic Filter Monitoring", - "code": 116, - "mfgCode": null, - "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "UV Filter Monitoring", - "code": 117, - "mfgCode": null, - "define": "UV_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "UV Filter Monitoring", - "code": 117, - "mfgCode": null, - "define": "UV_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Ionizing Filter Monitoring", - "code": 118, - "mfgCode": null, - "define": "IONIZING_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ionizing Filter Monitoring", - "code": 118, - "mfgCode": null, - "define": "IONIZING_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Zeolite Filter Monitoring", - "code": 119, - "mfgCode": null, - "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Zeolite Filter Monitoring", - "code": 119, - "mfgCode": null, - "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Ozone Filter Monitoring", - "code": 120, - "mfgCode": null, - "define": "OZONE_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ozone Filter Monitoring", - "code": 120, - "mfgCode": null, - "define": "OZONE_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Water Tank Monitoring", - "code": 121, - "mfgCode": null, - "define": "WATER_TANK_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Water Tank Monitoring", - "code": 121, - "mfgCode": null, - "define": "WATER_TANK_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Fuel Tank Monitoring", - "code": 122, - "mfgCode": null, - "define": "FUEL_TANK_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fuel Tank Monitoring", - "code": 122, - "mfgCode": null, - "define": "FUEL_TANK_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Ink Cartridge Monitoring", - "code": 123, - "mfgCode": null, - "define": "INK_CARTRIDGE_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ink Cartridge Monitoring", - "code": 123, - "mfgCode": null, - "define": "INK_CARTRIDGE_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, - { - "name": "Toner Cartridge Monitoring", - "code": 124, - "mfgCode": null, - "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Toner Cartridge Monitoring", - "code": 124, - "mfgCode": null, - "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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 - } - ] - }, { "name": "Fan Control", "code": 514, diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 6cc1ffff0a93fa..542005ce91a4c8 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5355,7 +5355,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5371,7 +5371,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5387,7 +5387,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5419,7 +5419,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5435,7 +5435,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6902,7 +6902,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index d0a7ed84d45d63..d854c4a8e0b201 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4207,5 +4207,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 49567e9fc56f5a..8931cd7a4d07c9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -14782,5 +14782,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 4db12ffd11259e..3474a5f8be8f29 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -12460,5 +12460,6 @@ "endpointVersion": 1, "deviceIdentifier": 36 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 1a5e07badae611..8d2b798ea7abbf 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -15429,5 +15429,6 @@ "endpointVersion": 1, "deviceIdentifier": 41 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 939b94dae34954..8b7302ca6b3172 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7699,7 +7699,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8627,7 +8627,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index ca5e685bad2d7e..8c4fcc8066c736 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index df044418b41a33..de1df2565556fc 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -2753,7 +2753,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11575,7 +11575,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22802,7 +22802,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 1793810e60e7aa..8f6ab7a34f2132 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8309,5 +8309,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 7975fdcdb1b180..bc52b5ffeb934d 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -10280,7 +10280,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -10296,7 +10296,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -10312,7 +10312,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -10344,7 +10344,7 @@ "side": "server", "type": "int32u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10360,7 +10360,7 @@ "side": "server", "type": "int16u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -10814,7 +10814,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10830,7 +10830,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10846,7 +10846,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11046,7 +11046,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11062,7 +11062,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11078,7 +11078,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11490,7 +11490,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11506,7 +11506,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11522,7 +11522,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11722,7 +11722,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11738,7 +11738,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11754,7 +11754,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12388,7 +12388,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12404,7 +12404,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12420,7 +12420,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12928,7 +12928,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", @@ -13852,7 +13852,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13868,7 +13868,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13884,7 +13884,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13900,7 +13900,7 @@ "side": "server", "type": "boolean", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14064,7 +14064,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14080,7 +14080,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14096,7 +14096,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14112,7 +14112,7 @@ "side": "server", "type": "boolean", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -26937,238 +26937,6 @@ } ] }, - { - "name": "Mode Base", - "code": 61731, - "mfgCode": null, - "define": "MODE_BASE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "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": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Mode Base", - "code": 61731, - "mfgCode": null, - "define": "MODE_BASE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "SupportedModes", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, From 0d81aa596ec6d547ebba205fd96e7444d60a0fc7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 20:13:04 -0400 Subject: [PATCH 112/159] Add an API to get the list of running controllers from a controller factory. (#28461) --- .../CHIP/MTRDeviceControllerFactory.mm | 20 ++++++++++--------- .../MTRDeviceControllerFactory_Internal.h | 6 ++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 72cf8737f8aa7c..d7fb8e7b119cf0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -641,9 +641,7 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo return nil; } - os_unfair_lock_lock(&self->_controllersLock); - NSArray * controllersCopy = [self->_controllers copy]; - os_unfair_lock_unlock(&self->_controllersLock); + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * existing in controllersCopy) { BOOL isRunning = YES; // assume the worst @@ -880,13 +878,19 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [controller deinitFromFactory]; } -- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +- (NSArray *)getRunningControllers { - assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&_controllersLock); NSArray * controllersCopy = [_controllers copy]; os_unfair_lock_unlock(&_controllersLock); + return controllersCopy; +} + +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +{ + assertChipStackLockedByCurrentThread(); + + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * existing in controllersCopy) { if ([existing fabricIndex] == fabricIndex) { @@ -901,9 +905,7 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID { assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&_controllersLock); - NSArray * controllersCopy = [_controllers copy]; - os_unfair_lock_unlock(&_controllersLock); + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * controller in controllersCopy) { auto * compressedFabricId = controller.compressedFabricID; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 9903eaa77e2cd2..dc0b968b427782 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -42,6 +42,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)controllerShuttingDown:(MTRDeviceController *)controller; +/** + * Get the list of running controllers. This will include controllers that are + * in the middle of starting up or shutting down. + */ +- (NSArray *)getRunningControllers; + /** * Find a running controller, if any, for the given fabric index. */ From c4d95d0bef9295daf8652348b72eec9778cac944 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 1 Aug 2023 23:03:46 -0400 Subject: [PATCH 113/159] Add utilities for converting CATValues to/from NSSet. (#28453) * Add utilities for converting CATValues to/from NSSet. * Address review comments. * Address more review comments. --- src/darwin/Framework/CHIP/MTRConversion.h | 8 +++ src/darwin/Framework/CHIP/MTRConversion.mm | 61 +++++++++++++++++++ .../Framework/CHIP/MTRDeviceController.mm | 23 ++----- .../CHIP/MTRDeviceControllerStartupParams.mm | 9 +-- .../CHIP/MTROperationalCredentialsDelegate.mm | 6 +- .../Matter.xcodeproj/project.pbxproj | 4 ++ 6 files changed, 81 insertions(+), 30 deletions(-) create mode 100644 src/darwin/Framework/CHIP/MTRConversion.mm diff --git a/src/darwin/Framework/CHIP/MTRConversion.h b/src/darwin/Framework/CHIP/MTRConversion.h index 53225a690e2070..5932ff88bf597b 100644 --- a/src/darwin/Framework/CHIP/MTRConversion.h +++ b/src/darwin/Framework/CHIP/MTRConversion.h @@ -19,6 +19,8 @@ #import +#include +#include #include #include #include @@ -38,4 +40,10 @@ inline NSDate * ChipEpochSecondsAsDate(uint32_t chipEpochSeconds) return [NSDate dateWithTimeIntervalSince1970:(chip::kChipEpochSecondsSinceUnixEpoch + (NSTimeInterval) chipEpochSeconds)]; } +/** + * Utilities for converting between NSSet and chip::CATValues. + */ +CHIP_ERROR SetToCATValues(NSSet * catSet, chip::CATValues & values); +NSSet * CATValuesToSet(const chip::CATValues & values); + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRConversion.mm b/src/darwin/Framework/CHIP/MTRConversion.mm new file mode 100644 index 00000000000000..77882742dea3e7 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRConversion.mm @@ -0,0 +1,61 @@ +/** + * 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. + */ + +#import "MTRConversion.h" +#import "MTRLogging_Internal.h" + +#include + +CHIP_ERROR SetToCATValues(NSSet * catSet, chip::CATValues & values) +{ + values = chip::kUndefinedCATs; + + unsigned long long tagCount = catSet.count; + if (tagCount > chip::kMaxSubjectCATAttributeCount) { + MTR_LOG_ERROR("%llu CASE Authenticated Tags cannot be represented in a certificate.", tagCount); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + size_t tagIndex = 0; + for (NSNumber * boxedTag in [catSet.allObjects sortedArrayUsingSelector:@selector(compare:)]) { + auto unboxedTag = boxedTag.unsignedLongLongValue; + if (!chip::CanCastTo(unboxedTag)) { + MTR_LOG_ERROR("0x%llx is not a valid CASE Authenticated Tag value.", unboxedTag); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto tag = static_cast(unboxedTag); + if (!chip::IsValidCASEAuthTag(tag)) { + MTR_LOG_ERROR("0x%" PRIx32 " is not a valid CASE Authenticated Tag value.", tag); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + values.values[tagIndex++] = tag; + } + + return CHIP_NO_ERROR; +} + +NSSet * CATValuesToSet(const chip::CATValues & values) +{ + auto * catSet = [[NSMutableSet alloc] initWithCapacity:values.GetNumTagsPresent()]; + for (auto & value : values.values) { + if (value != chip::kUndefinedCAT) { + [catSet addObject:@(value)]; + } + } + return [NSSet setWithSet:catSet]; +} diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 8b34769b09ecea..cf4ab4c068d465 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -22,6 +22,7 @@ #import "MTRCommissionableBrowser.h" #import "MTRCommissionableBrowserResult_Internal.h" #import "MTRCommissioningParameters.h" +#import "MTRConversion.h" #import "MTRDeviceControllerDelegateBridge.h" #import "MTRDeviceControllerFactory_Internal.h" #import "MTRDeviceControllerStartupParams.h" @@ -312,27 +313,11 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams chip::CATValues cats = chip::kUndefinedCATs; if (startupParams.caseAuthenticatedTags != nil) { - unsigned long long tagCount = startupParams.caseAuthenticatedTags.count; - if (tagCount > chip::kMaxSubjectCATAttributeCount) { - MTR_LOG_ERROR("%llu CASE Authenticated Tags cannot be represented in a certificate.", tagCount); + errorCode = SetToCATValues(startupParams.caseAuthenticatedTags, cats); + if (errorCode != CHIP_NO_ERROR) { + // SetToCATValues already handles logging. return; } - - size_t tagIndex = 0; - for (NSNumber * boxedTag in startupParams.caseAuthenticatedTags) { - if (!chip::CanCastTo(boxedTag.unsignedLongLongValue)) { - MTR_LOG_ERROR("0x%llx is not a valid CASE Authenticated Tag value.", boxedTag.unsignedLongLongValue); - return; - } - - auto tag = static_cast(boxedTag.unsignedLongLongValue); - if (!chip::IsValidCASEAuthTag(tag)) { - MTR_LOG_ERROR("0x%" PRIx32 " is not a valid CASE Authenticated Tag value.", tag); - return; - } - - cats.values[tagIndex++] = tag; - } } if (commissionerParams.operationalKeypair != nullptr) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 771995bf01bc66..ca92c63bf2171b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -16,6 +16,7 @@ #import "MTRDeviceControllerStartupParams.h" #import "MTRCertificates.h" +#import "MTRConversion.h" #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRLogging_Internal.h" #import "MTRP256KeypairBridge.h" @@ -302,13 +303,7 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable auto tagCount = cats.GetNumTagsPresent(); if (tagCount > 0) { - auto * catSet = [[NSMutableSet alloc] initWithCapacity:tagCount]; - for (auto & value : cats.values) { - if (value != kUndefinedCAT) { - [catSet addObject:@(value)]; - } - } - self.caseAuthenticatedTags = [NSSet setWithSet:catSet]; + self.caseAuthenticatedTags = CATValuesToSet(cats); } else { self.caseAuthenticatedTags = nil; } diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 7e5282eca51a52..159e772838258c 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -22,6 +22,7 @@ #import #import "MTRCertificates.h" +#import "MTRConversion.h" #import "MTRDeviceController_Internal.h" #import "MTRLogging_Internal.h" #import "NSDataSpanConversion.h" @@ -469,10 +470,7 @@ uint64_t GetIssuerId(NSNumber * _Nullable providedIssuerId) CATValues cats; if (caseAuthenticatedTags != nil) { - size_t idx = 0; - for (NSNumber * cat in [caseAuthenticatedTags.allObjects sortedArrayUsingSelector:@selector(compare:)]) { - cats.values[idx++] = [cat unsignedIntValue]; - } + ReturnErrorOnFailure(SetToCATValues(caseAuthenticatedTags, cats)); } uint8_t nocBuffer[Controller::kMaxCHIPDERCertLength]; diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index fea8bd9966ac2a..93d491bf23ac1f 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -154,6 +154,7 @@ 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */; }; 51431AFB27D29CA4008A7943 /* ota-provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51431AFA27D29CA4008A7943 /* ota-provider.cpp */; }; 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */; }; + 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CAD2A79D42100469F18 /* MTRConversion.mm */; }; 515C1C6F284F9FFB00A48F0C /* MTRFramework.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */; }; 515C1C70284F9FFB00A48F0C /* MTRFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */; }; 51669AF02913204400F4AA36 /* MTRBackwardsCompatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */; }; @@ -458,6 +459,7 @@ 51431AFA27D29CA4008A7943 /* ota-provider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ota-provider.cpp"; path = "clusters/ota-provider/ota-provider.cpp"; sourceTree = ""; }; 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MatterTests-Bridging-Header.h"; sourceTree = ""; }; 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MTRSwiftPairingTests.swift; sourceTree = ""; }; + 51565CAD2A79D42100469F18 /* MTRConversion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRConversion.mm; sourceTree = ""; }; 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRFramework.mm; sourceTree = ""; }; 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFramework.h; sourceTree = ""; }; 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRBackwardsCompatTests.m; sourceTree = ""; }; @@ -1025,6 +1027,7 @@ 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */, 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */, 3DFCB32B29678C9500332B35 /* MTRConversion.h */, + 51565CAD2A79D42100469F18 /* MTRConversion.mm */, 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */, 3CF134A8289D8D800017A19E /* MTRCSRInfo.mm */, 3DECCB732934C21B00585AEC /* MTRDefines.h */, @@ -1500,6 +1503,7 @@ 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, B2E0D7B3245B0B5C003C5B48 /* MTRError.mm in Sources */, 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */, + 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */, 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */, 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */, 5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm in Sources */, From e22e3df98ad9d88f4fef7c693ddb56652e396e99 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 2 Aug 2023 08:02:37 -0400 Subject: [PATCH 114/159] [esp32 m5-stack light] move freertos functions to flash instead of iram (#28455) * Move freertos functions out if iram. This is because linkage fails with out of IRAM. Following https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/performance/ram-usage.html#optimizing-iram-usage * Add newline at the end of the file --------- Co-authored-by: Andrei Litvin --- examples/lighting-app/esp32/sdkconfig_m5stack.defaults | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/lighting-app/esp32/sdkconfig_m5stack.defaults b/examples/lighting-app/esp32/sdkconfig_m5stack.defaults index 95d805aa75b55e..be4c85a9c4bb14 100644 --- a/examples/lighting-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/lighting-app/esp32/sdkconfig_m5stack.defaults @@ -65,3 +65,7 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Optimize IRAM +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + From a28b0078169f80f8788a6dac9f43ee7a3a1ea23e Mon Sep 17 00:00:00 2001 From: Jaehoon-You <55170115+Jaehoon-You@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:05:39 +0900 Subject: [PATCH 115/159] virtual-device-app: Add LoadingFragment for commissioning establish started event (#28428) Signed-off-by: Jaehoon You --- .../device/app/core/common/DeepLink.kt | 8 ++ .../app/feature/main/LoadingFragment.kt | 95 +++++++++++++ .../src/main/res/layout/fragment_loading.xml | 130 ++++++++++++++++++ .../main/res/navigation/main_nav_graph.xml | 11 ++ .../main/src/main/res/values/strings.xml | 2 + 5 files changed, 246 insertions(+) create mode 100644 examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt create mode 100644 examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt index 1a84f4a6840cd2..78e6649de44b43 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt @@ -18,4 +18,12 @@ object DeepLink { ) .build() } + + fun getDeepLinkRequestForLoadingFragment(setting: String): NavDeepLinkRequest { + return NavDeepLinkRequest.Builder.fromUri( + "android-app://com.matter.virtual.device.app.feature.main/loadingFragment/${setting}" + .toUri() + ) + .build() + } } diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt new file mode 100644 index 00000000000000..8c81bd26429433 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt @@ -0,0 +1,95 @@ +package com.matter.virtual.device.app.feature.main + +import android.content.Context +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.activity.OnBackPressedCallback +import androidx.appcompat.app.AppCompatActivity +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.Fragment +import androidx.navigation.fragment.findNavController +import androidx.navigation.fragment.navArgs +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.feature.main.databinding.FragmentLoadingBinding +import dagger.hilt.android.AndroidEntryPoint +import kotlin.math.abs +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json +import timber.log.Timber + +@AndroidEntryPoint +class LoadingFragment : Fragment() { + + private lateinit var binding: FragmentLoadingBinding + + private lateinit var matterSettings: MatterSettings + private lateinit var onBackPressedCallback: OnBackPressedCallback + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + Timber.d("Hit") + binding = DataBindingUtil.inflate(inflater, R.layout.fragment_loading, container, false) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + @OptIn(ExperimentalSerializationApi::class) + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + Timber.d("Hit") + super.onViewCreated(view, savedInstanceState) + + (activity as AppCompatActivity).setSupportActionBar(binding.toolbar) + (activity as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true) + + binding.appBarLayout.addOnOffsetChangedListener { appBarLayout, verticalOffset -> + var ratio = 0F + if (abs(verticalOffset) != 0) { + ratio = abs(verticalOffset).toFloat() / appBarLayout.totalScrollRange.toFloat() + } + + binding.collapseTitle.alpha = 1f - ratio * 2f + 0.1f + binding.toolbarTitle.alpha = (ratio - 0.5f) * 2f + 0.1f + } + + val args: LoadingFragmentArgs by navArgs() + this.matterSettings = Json.decodeFromString(args.setting) + } + + override fun onResume() { + Timber.d("Hit") + super.onResume() + } + + override fun onAttach(context: Context) { + Timber.d("Hit") + super.onAttach(context) + + onBackPressedCallback = + object : OnBackPressedCallback(true) { + override fun handleOnBackPressed() { + Timber.d("handleOnBackPressed()") + findNavController().popBackStack() + } + } + + requireActivity().onBackPressedDispatcher.addCallback(this, onBackPressedCallback) + } + + override fun onDetach() { + Timber.d("Hit") + super.onDetach() + onBackPressedCallback.remove() + } + + override fun onDestroy() { + Timber.d("Hit") + super.onDestroy() + } +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml new file mode 100644 index 00000000000000..852207c49e1b6f --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml index c3f66c3f7c5bbe..81cbc65fbec062 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml @@ -10,4 +10,15 @@ android:name="com.matter.virtual.device.app.feature.main.MainFragment" android:label="MainFragment" tools:layout="@layout/fragment_main" /> + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml index 22caae70477e41..23e5916e74f482 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml @@ -1,4 +1,6 @@ Matter Virtual Device + Loading + Commissioning in process. \ No newline at end of file From 9bcc2c5dd99f35ee65d8e589c12c72601e45c6e5 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 2 Aug 2023 13:05:04 -0400 Subject: [PATCH 116/159] Add openiot clean steps (#28473) Co-authored-by: Andrei Litvin --- .github/workflows/examples-openiotsdk.yaml | 67 ++++++++++++---------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 86ff03e6754071..7c2b76b1b8841d 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -72,6 +72,15 @@ jobs: examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \ /tmp/bloat_reports/ + - name: "Test: shell example" + if: steps.build_shell.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' + + - name: Clean shell output + run: rm -rf examples/shell/openiotsdk/build + - name: Build lock-app example (mbedtls) # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 if: false @@ -93,6 +102,18 @@ jobs: examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \ /tmp/bloat_reports/ + - name: "Test: tv-app example" + if: steps.build_tv_app.outcome == 'success' + timeout-minutes: 10 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean tv-app output + run: rm -rf examples/tv-app/openiotsdk/build + - name: Build all-clusters-app example id: build_all_clusters_app timeout-minutes: 10 @@ -103,6 +124,18 @@ jobs: examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \ /tmp/bloat_reports/ + - name: "Test: all-clusters-app example" + if: steps.build_all_clusters_app.outcome == 'success' + timeout-minutes: 5 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean all-clusters-app output + run: rm -rf examples/all-clusters-app/openiotsdk/build + - name: Build ota-requestor-app example id: build_ota_requestor_app timeout-minutes: 10 @@ -127,12 +160,6 @@ jobs: run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux/ out/ota-provider chip_config_network_layer_ble=false - - name: "Test: shell example" - if: steps.build_shell.outcome == 'success' - run: | - scripts/run_in_python_env.sh out/venv \ - 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' - - name: "Test: lock-app example (mbedtls)" if: steps.build_lock_app_mbedtls.outcome == 'success' run: | @@ -141,24 +168,6 @@ jobs: 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: tv-app example" - if: steps.build_tv_app.outcome == 'success' - timeout-minutes: 10 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: "Test: all-clusters-app example" - if: steps.build_all_clusters_app.outcome == 'success' - timeout-minutes: 5 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: ota-requestor-app example" if: steps.build_ota_requestor_app.outcome == 'success' && steps.build_ota_provider_app.outcome == 'success' timeout-minutes: 30 @@ -189,11 +198,6 @@ jobs: examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ /tmp/bloat_reports/ - - name: Build unit tests (psa) - id: build_unit_tests_psa - run: | - scripts/examples/openiotsdk_example.sh -b psa unit-tests - - name: "Test: lock-app example (psa)" if: steps.build_lock_app_psa.outcome == 'success' run: | @@ -202,6 +206,11 @@ jobs: 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + - name: Build unit tests (psa) + id: build_unit_tests_psa + run: | + scripts/examples/openiotsdk_example.sh -b psa unit-tests + - name: "Test: unit-tests (psa)" if: steps.build_unit_tests_psa.outcome == 'success' run: | From 0bb654317e6445313c9e366c7e6edef24a8f4de2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 2 Aug 2023 13:28:03 -0400 Subject: [PATCH 117/159] [cloudbuild] switch to v2 of our build images. (#28476) Co-authored-by: Andrei Litvin --- integrations/cloudbuild/build-all.yaml | 6 +++--- integrations/cloudbuild/chef.yaml | 6 +++--- integrations/cloudbuild/smoke-test.yaml | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 82031d7d8ca77c..a1a8a1832d8726 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -85,7 +85,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index d725de837b0fb2..eeb87bd3821b17 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -27,7 +27,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index a745ee172004cc..9d5a85f5f4acab 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -43,7 +43,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -64,7 +64,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -86,7 +86,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -139,7 +139,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv From 7f0e566dcc47be2fd4a255693df64bc6ec21169f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 2 Aug 2023 15:10:38 -0400 Subject: [PATCH 118/159] Update ZAP to pick up UI for multiple device types on an endpoint. (#28423) --- .../log-source-app/log-source-common/log-source-app.matter | 1 + scripts/setup/zap.json | 4 ++-- scripts/setup/zap.version | 2 +- scripts/tools/zap/zap_execution.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index ee666599859620..7308cbab74cd68 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -498,6 +498,7 @@ server cluster OperationalCredentials = 62 { } endpoint 0 { + device type anonymousEndpointType = 0, version 1; binding cluster DiagnosticLogs; server cluster AccessControl { diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 74901d88faf06b..95b8b0a56c4495 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.07.21-nightly.1"] + "tags": ["version:2@v2023.08.01-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2023.07.21-nightly.1"] + "tags": ["version:2@v2023.08.01-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index 543bb412a09ac6..ea7688be7708a5 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.07.21-nightly +v2023.08.01-nightly diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 6a07e8eb08a320..9db6537dc32e8d 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.7.20' +MIN_ZAP_VERSION = '2023.8.1' class ZapTool: From 7f99c441a88a7fa29b11833618b09553cb61dc20 Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Wed, 2 Aug 2023 13:35:11 -0700 Subject: [PATCH 119/159] tv-casting-app: Implementing PASE related callbacks (#28342) * Linux tv-casting-app: Implementing AppDelegate * Android tv-casting-app: Implementing AppDelegate * iOS tv-casting-app: Implementing AppDelegate --- .../chip/casting/app/ConnectionFragment.java | 57 ++++++++- .../chip/casting/CommissioningCallbacks.java | 113 ++++++++++++++++++ .../jni/com/chip/casting/TvCastingApp.java | 2 +- .../main/jni/cpp/MatterCallbackHandler-JNI.h | 24 ++++ .../app/src/main/jni/cpp/TvCastingApp-JNI.cpp | 77 +++++++++++- .../app/src/main/jni/cpp/TvCastingApp-JNI.h | 14 +++ examples/tv-casting-app/android/BUILD.gn | 1 + .../project.pbxproj | 14 ++- .../CastingServerBridge.h | 15 +-- .../CastingServerBridge.mm | 105 +++++++++++++--- .../CommissioningCallbackHandlers.h | 70 +++++++++++ .../CommissioningCallbackHandlers.m | 42 +++++++ .../TvCasting/CommissioningViewModel.swift | 37 ++++-- .../tv-casting-app/linux/CastingUtils.cpp | 8 +- .../tv-casting-common/include/CastingServer.h | 17 ++- .../include/CommissioningCallbacks.h | 53 ++++++++ .../include/TargetVideoPlayerInfo.h | 1 - .../tv-casting-common/src/CastingServer.cpp | 59 ++++++++- 18 files changed, 644 insertions(+), 65 deletions(-) create mode 100644 examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m create mode 100644 examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java index 2dfa712b7753c2..d2a0f7952b6485 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java @@ -8,6 +8,7 @@ import android.widget.TextView; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; +import com.chip.casting.CommissioningCallbacks; import com.chip.casting.ContentApp; import com.chip.casting.DiscoveredNodeData; import com.chip.casting.FailureCallback; @@ -120,15 +121,59 @@ private void beginCommissioning( FailureCallback onConnectionFailure, SuccessCallback onNewOrUpdatedEndpoints) { Log.d(TAG, "Running commissioning"); + MatterCallbackHandler commissioningCompleteCallback = + new MatterCallbackHandler() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on CommissioningComplete event with " + error); + } + }; + + SuccessCallback sessionEstablishmentStartedCallback = + new SuccessCallback() { + @Override + public void handle(Void response) { + Log.d(TAG, "handle() called on SessionEstablishmentStartedCallback"); + } + }; + + SuccessCallback sessionEstablishedCallback = + new SuccessCallback() { + @Override + public void handle(Void response) { + Log.d(TAG, "handle() called on SessionEstablishedCallback"); + } + }; + + FailureCallback sessionEstablishmentErrorCallback = + new FailureCallback() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on SessionEstablishmentError event with " + error); + } + }; + + FailureCallback sessionEstablishmentStoppedCallback = + new FailureCallback() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on SessionEstablishmentStopped event with " + error); + } + }; + + CommissioningCallbacks commissioningCallbacks = + new CommissioningCallbacks.Builder() + .commissioningComplete(commissioningCompleteCallback) + .sessionEstablishmentStarted(sessionEstablishmentStartedCallback) + .sessionEstablished(sessionEstablishedCallback) + .sessionEstablishmentError(sessionEstablishmentErrorCallback) + .sessionEstablishmentStopped(sessionEstablishmentStoppedCallback) + .build(); + this.openCommissioningWindowSuccess = tvCastingApp.openBasicCommissioningWindow( GlobalCastingConstants.CommissioningWindowDurationSecs, - new MatterCallbackHandler() { - @Override - public void handle(MatterError error) { - Log.d(TAG, "handle() called on CommissioningComplete event with " + error); - } - }, + commissioningCallbacks, onConnectionSuccess, onConnectionFailure, onNewOrUpdatedEndpoints); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java new file mode 100644 index 00000000000000..9a44aba792f18b --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java @@ -0,0 +1,113 @@ +/* + * 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. + * 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. + * + */ +package com.chip.casting; + +public class CommissioningCallbacks { + /** + * This is called when the PBKDFParamRequest is received and indicates the start of the session + * establishment process + */ + private SuccessCallback sessionEstablishmentStarted; + + /** This is called when the commissioning session has been established */ + private SuccessCallback sessionEstablished; + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is + * provided) or PASE was established fine but then the fail-safe expired (including being expired + * by the commissioner). The error param indicates the error that occurred during session + * establishment or the error accompanying the fail-safe timeout. + */ + private FailureCallback sessionEstablishmentError; + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the + * fail-safe expired (including being expired by the commissioner) AND the commissioning window is + * closed. The window may be closed because the commissioning attempts limit was reached or + * advertising/listening for PASE failed. + */ + private FailureCallback sessionEstablishmentStopped; + + /** This is called when the commissioning has been completed */ + private Object commissioningComplete; + + private CommissioningCallbacks(Builder builder) { + this.sessionEstablishmentStarted = builder.sessionEstablishmentStarted; + this.sessionEstablished = builder.sessionEstablished; + this.sessionEstablishmentError = builder.sessionEstablishmentError; + this.sessionEstablishmentStopped = builder.sessionEstablishmentStopped; + this.commissioningComplete = builder.commissioningComplete; + } + + public SuccessCallback getSessionEstablishmentStarted() { + return sessionEstablishmentStarted; + } + + public SuccessCallback getSessionEstablished() { + return sessionEstablished; + } + + public FailureCallback getSessionEstablishmentError() { + return sessionEstablishmentError; + } + + public FailureCallback getSessionEstablishmentStopped() { + return sessionEstablishmentStopped; + } + + public Object getCommissioningComplete() { + return commissioningComplete; + } + + public static class Builder { + private SuccessCallback sessionEstablishmentStarted; + private SuccessCallback sessionEstablished; + private FailureCallback sessionEstablishmentError; + private FailureCallback sessionEstablishmentStopped; + private Object commissioningComplete; + + public Builder sessionEstablishmentStarted(SuccessCallback sessionEstablishmentStarted) { + this.sessionEstablishmentStarted = sessionEstablishmentStarted; + return this; + } + + public Builder sessionEstablished(SuccessCallback sessionEstablished) { + this.sessionEstablished = sessionEstablished; + return this; + } + + public Builder sessionEstablishmentError(FailureCallback sessionEstablishmentError) { + this.sessionEstablishmentError = sessionEstablishmentError; + return this; + } + + public Builder sessionEstablishmentStopped(FailureCallback sessionEstablishmentStopped) { + this.sessionEstablishmentStopped = sessionEstablishmentStopped; + return this; + } + + public Builder commissioningComplete(Object commissioningComplete) { + this.commissioningComplete = commissioningComplete; + return this; + } + + public CommissioningCallbacks build() { + return new CommissioningCallbacks(this); + } + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java index 7fc9d44da14186..f30132ffc9a6ea 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java @@ -180,7 +180,7 @@ public void stopVideoPlayerDiscovery() { public native boolean openBasicCommissioningWindow( int duration, - Object commissioningCompleteHandler, + CommissioningCallbacks commissioningCallbacks, SuccessCallback onConnectionSuccess, FailureCallback onConnectionFailure, SuccessCallback onNewOrUpdatedEndpointCallback); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h index 749f5e873ee074..c05eef016f32b3 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h @@ -104,6 +104,30 @@ template SuccessHandlerJNI::~SuccessHandlerJNI(){}; // COMMISSIONING AND CONNECTION +class SessionEstablishmentStartedHandlerJNI : public SuccessHandlerJNI +{ +public: + SessionEstablishmentStartedHandlerJNI() : SuccessHandlerJNI("(Ljava/lang/Object;)V") {} + jobject ConvertToJObject(void * responseData) + { + // return nullptr because the Java callback extends SuccessCallback and its handle() expects a Void param. + // It expects a Void becauase no value is passed as part of this callback. + return nullptr; + } +}; + +class SessionEstablishedHandlerJNI : public SuccessHandlerJNI +{ +public: + SessionEstablishedHandlerJNI() : SuccessHandlerJNI("(Ljava/lang/Object;)V") {} + jobject ConvertToJObject(void * responseData) + { + // return nullptr because the Java callback extends SuccessCallback and its handle() expects a Void param. + // It expects a Void becauase no value is passed as part of this callback. + return nullptr; + } +}; + class OnConnectionSuccessHandlerJNI : public SuccessHandlerJNI { public: diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index c4af2c37add85c..5293cc31305fd5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -113,15 +113,82 @@ JNI_METHOD(void, setDACProvider)(JNIEnv *, jobject, jobject provider) } JNI_METHOD(jboolean, openBasicCommissioningWindow) -(JNIEnv * env, jobject, jint duration, jobject jCommissioningCompleteHandler, jobject jOnConnectionSuccessHandler, +(JNIEnv * env, jobject, jint duration, jobject jCommissioningCallbacks, jobject jOnConnectionSuccessHandler, jobject jOnConnectionFailureHandler, jobject jOnNewOrUpdatedEndpointHandler) { chip::DeviceLayer::StackLock lock; ChipLogProgress(AppServer, "JNI_METHOD openBasicCommissioningWindow called with duration %d", duration); - CHIP_ERROR err = TvCastingAppJNIMgr().getCommissioningCompleteHandler().SetUp(env, jCommissioningCompleteHandler); - VerifyOrExit(CHIP_NO_ERROR == err, - ChipLogError(AppServer, "MatterCallbackHandlerJNI::SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + CHIP_ERROR err = CHIP_NO_ERROR; + + CommissioningCallbacks commissioningCallbacks; + jclass jCommissioningCallbacksClass; + chip::JniReferences::GetInstance().GetClassRef(env, "com/chip/casting/CommissioningCallbacks", jCommissioningCallbacksClass); + + jfieldID jCommissioningCompleteField = + env->GetFieldID(jCommissioningCallbacksClass, "commissioningComplete", "Ljava/lang/Object;"); + jobject jCommissioningComplete = env->GetObjectField(jCommissioningCallbacks, jCommissioningCompleteField); + if (jCommissioningComplete != nullptr) + { + err = TvCastingAppJNIMgr().getCommissioningCompleteHandler().SetUp(env, jCommissioningComplete); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "MatterCallbackHandlerJNI::SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.commissioningComplete = [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getCommissioningCompleteHandler().Handle(err); + }; + } + + jfieldID jSessionEstablishmentStartedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentStarted", "Lcom/chip/casting/SuccessCallback;"); + jobject jSessionEstablishmentStarted = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentStartedField); + if (jSessionEstablishmentStarted != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentStartedHandler().SetUp(env, jSessionEstablishmentStarted); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishmentStartedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablishmentStarted = []() { + TvCastingAppJNIMgr().getSessionEstablishmentStartedHandler().Handle(nullptr); + }; + } + + jfieldID jSessionEstablishedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablished", "Lcom/chip/casting/SuccessCallback;"); + jobject jSessionEstablished = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishedField); + if (jSessionEstablished != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishedHandler().SetUp(env, jSessionEstablished); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablished = []() { TvCastingAppJNIMgr().getSessionEstablishedHandler().Handle(nullptr); }; + } + + jfieldID jSessionEstablishmentErrorField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentError", "Lcom/chip/casting/FailureCallback;"); + jobject jSessionEstablishmentError = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentErrorField); + if (jSessionEstablishmentError != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentErrorHandler().SetUp(env, jSessionEstablishmentError); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false); + commissioningCallbacks.sessionEstablishmentError = [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getSessionEstablishmentErrorHandler().Handle(err); + }; + } + + jfieldID jSessionEstablishmentStoppedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentStopped", "Lcom/chip/casting/FailureCallback;"); + jobject jSessionEstablishmentStopped = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentStoppedField); + if (jSessionEstablishmentStopped != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentStoppedHandler().SetUp(env, jSessionEstablishmentStopped); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishmentStoppedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablishmentStopped = []() { + TvCastingAppJNIMgr().getSessionEstablishmentStoppedHandler().Handle(CHIP_NO_ERROR); + }; + } err = TvCastingAppJNIMgr().getOnConnectionSuccessHandler(false).SetUp(env, jOnConnectionSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, @@ -136,7 +203,7 @@ JNI_METHOD(jboolean, openBasicCommissioningWindow) ChipLogError(AppServer, "OnNewOrUpdatedEndpointHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = CastingServer::GetInstance()->OpenBasicCommissioningWindow( - [](CHIP_ERROR err) { TvCastingAppJNIMgr().getCommissioningCompleteHandler().Handle(err); }, + commissioningCallbacks, [](TargetVideoPlayerInfo * videoPlayer) { TvCastingAppJNIMgr().getOnConnectionSuccessHandler(false).Handle(videoPlayer); }, [](CHIP_ERROR err) { TvCastingAppJNIMgr().getOnConnectionFailureHandler(false).Handle(err); }, [](TargetEndpointInfo * endpoint) { TvCastingAppJNIMgr().getOnNewOrUpdatedEndpointHandler(false).Handle(endpoint); }); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h index d77f3a7eac8cce..863e2691c44a52 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h @@ -27,10 +27,20 @@ class TvCastingAppJNI { public: MatterCallbackHandlerJNI & getCommissioningCompleteHandler() { return mCommissioningCompleteHandler; } + + SessionEstablishmentStartedHandlerJNI & getSessionEstablishmentStartedHandler() { return mSessionEstablishmentStartedHandler; } + + SessionEstablishedHandlerJNI & getSessionEstablishedHandler() { return mSessionEstablishedHandler; } + + FailureHandlerJNI & getSessionEstablishmentErrorHandler() { return mSessionEstablishmentErrorHandler; } + + FailureHandlerJNI & getSessionEstablishmentStoppedHandler() { return mSessionEstablishmentStoppedHandler; } + OnConnectionSuccessHandlerJNI & getOnConnectionSuccessHandler(bool preCommissioned) { return preCommissioned ? mPreCommissionedOnConnectionSuccessHandler : mCommissioningOnConnectionSuccessHandler; } + FailureHandlerJNI & getOnConnectionFailureHandler(bool preCommissioned) { return preCommissioned ? mPreCommissionedOnConnectionFailureHandler : mCommissioningOnConnectionFailureHandler; @@ -100,6 +110,10 @@ class TvCastingAppJNI static TvCastingAppJNI sInstance; MatterCallbackHandlerJNI mCommissioningCompleteHandler; + SessionEstablishmentStartedHandlerJNI mSessionEstablishmentStartedHandler; + SessionEstablishedHandlerJNI mSessionEstablishedHandler; + FailureHandlerJNI mSessionEstablishmentErrorHandler; + FailureHandlerJNI mSessionEstablishmentStoppedHandler; OnConnectionSuccessHandlerJNI mCommissioningOnConnectionSuccessHandler; FailureHandlerJNI mCommissioningOnConnectionFailureHandler; OnNewOrUpdatedEndpointHandlerJNI mCommissioningOnNewOrUpdatedEndpointHandler; diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn index 7a12b9a9a3efa3..d072dd4c088e95 100644 --- a/examples/tv-casting-app/android/BUILD.gn +++ b/examples/tv-casting-app/android/BUILD.gn @@ -65,6 +65,7 @@ android_library("java") { sources = [ "App/app/src/main/jni/com/chip/casting/AppParameters.java", + "App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java", "App/app/src/main/jni/com/chip/casting/ContentApp.java", "App/app/src/main/jni/com/chip/casting/ContentLauncherTypes.java", "App/app/src/main/jni/com/chip/casting/DACProvider.java", diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index 1591df3729aa04..cbc52e427053d4 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873D286A593700771BAD /* CastingServerBridge.mm */; }; 3CCB8744286A593700771BAD /* ConversionUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873E286A593700771BAD /* ConversionUtils.mm */; }; 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */; }; + 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */; }; + 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */; }; 3CE868F42946D76200FCB92B /* CommissionableDataProviderImpl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */; }; 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8532628E37F1000F07B9F /* MatterError.mm */; }; /* End PBXBuildFile section */ @@ -62,6 +64,8 @@ 3CCB873D286A593700771BAD /* CastingServerBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CastingServerBridge.mm; sourceTree = ""; }; 3CCB873E286A593700771BAD /* ConversionUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConversionUtils.mm; sourceTree = ""; }; 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommissionerDiscoveryDelegateImpl.h; sourceTree = ""; }; + 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommissioningCallbackHandlers.h; sourceTree = ""; }; + 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommissioningCallbackHandlers.m; sourceTree = ""; }; 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CommissionableDataProviderImpl.mm; sourceTree = ""; }; 3CF8532528E37ED800F07B9F /* MatterError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MatterError.h; sourceTree = ""; }; 3CF8532628E37F1000F07B9F /* MatterError.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MatterError.mm; sourceTree = ""; }; @@ -131,6 +135,8 @@ 3C0D9CDF2920A30C00D3332B /* CommissionableDataProviderImpl.hpp */, 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */, 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */, + 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */, + 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */, ); path = MatterTvCastingBridge; sourceTree = ""; @@ -145,6 +151,7 @@ 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */, 3C26AC8C2926FE0C00BA6881 /* DeviceAttestationCredentialsProviderImpl.hpp in Headers */, 3CCB8740286A593700771BAD /* CastingServerBridge.h in Headers */, + 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */, 3CCB8742286A593700771BAD /* ConversionUtils.hpp in Headers */, 3CCB8741286A593700771BAD /* DiscoveredNodeData.h in Headers */, 3CCB87212869085400771BAD /* MatterTvCastingBridge.h in Headers */, @@ -249,6 +256,7 @@ files = ( 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */, 3C4E53B228E5184C00F293E8 /* TargetNavigatorTypes.mm in Sources */, + 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */, 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */, 3C4E53B628E5595A00F293E8 /* ContentLauncherTypes.mm in Sources */, 3C81C75028F7A7D3001CB9D1 /* VideoPlayer.m in Sources */, @@ -419,9 +427,6 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", - /* Compile time codegen would need this: - "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", - */ "$(CHIP_ROOT)/zzz_generated/app-common", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; @@ -502,9 +507,6 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", - /* Compile time codegen would need this: - "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", - */ "$(CHIP_ROOT)/zzz_generated/app-common", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h index d90e4db486156b..2489f982fb0645 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h @@ -16,6 +16,7 @@ */ #import "AppParameters.h" +#import "CommissioningCallbackHandlers.h" #import "ContentApp.h" #import "ContentLauncherTypes.h" #import "DiscoveredNodeData.h" @@ -109,8 +110,7 @@ @param clientQueue Queue to dispatch the call to the commissioningWindowRequestedHandler on - @param commissioningCompleteCallback Callback for when commissioning of this app has been completed via a call to the general - commissioning cluster (by usually an on-network TV/Media device acting as a Matter commissioner) + @param commissioningCallbackHandlers Optional parameter to specific handlers for callbacks during commissioning @param onConnectionSuccessCallback Handles a VideoPlayer * once connection is successfully established @@ -118,15 +118,12 @@ @param onNewOrUpdatedEndpointCallback Handles a ContentApp * for each new ContentApp is found. May be called multiple times based on the number of ContentApp - - @param commissioningWindowRequestedHandler Handler to call on requesting the opening of a commissioning window */ - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler - commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback - onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback - onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback - onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback; + commissioningCallbackHandlers:(CommissioningCallbackHandlers * _Nullable)commissioningCallbackHandlers + onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback + onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback + onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback; /*! @brief Gets the list of VideoPlayers currently connected diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index 50c2467b85be3f..3f4dbce0700bb7 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -565,24 +565,89 @@ - (OnboardingPayload *)getOnboardingPayload } - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler - commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback - onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback - onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback - onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback + commissioningCallbackHandlers:(CommissioningCallbackHandlers * _Nullable)commissioningCallbackHandlers + onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback + onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback + onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback { [self dispatchOnMatterSDKQueue:@"openBasicCommissioningWindow(...)" block:^{ + CommissioningCallbacks commissioningCallbacks; + if (commissioningCallbackHandlers != nil) { + if (commissioningCallbackHandlers.commissioningCompleteCallback != nil) { + commissioningCallbacks.commissioningComplete = [clientQueue, commissioningCallbackHandlers]( + CHIP_ERROR err) { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description: + @"openBasicCommissioningWindow(...) commissioningCompleteCallback" + block:^{ + commissioningCallbackHandlers.commissioningCompleteCallback( + CHIP_NO_ERROR == err); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentStartedCallback != nil) { + commissioningCallbacks.sessionEstablishmentStarted + = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentStartedCallback" + block:^{ + commissioningCallbackHandlers + .sessionEstablishmentStartedCallback(); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishedCallback != nil) { + commissioningCallbacks.sessionEstablished = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) sessionEstablishedCallback" + block:^{ + commissioningCallbackHandlers.sessionEstablishedCallback(); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentErrorCallback != nil) { + commissioningCallbacks.sessionEstablishmentError = [clientQueue, + commissioningCallbackHandlers]( + CHIP_ERROR err) { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentErrorCallback" + block:^{ + commissioningCallbackHandlers.sessionEstablishmentErrorCallback( + [[MatterError alloc] + initWithCode:err.AsInteger() + message:[NSString + stringWithUTF8String:err.AsString()]]); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentStoppedCallback != nil) { + commissioningCallbacks.sessionEstablishmentStopped + = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentStoppedCallback" + block:^{ + commissioningCallbackHandlers + .sessionEstablishmentStoppedCallback(); + }]; + }; + } + } CHIP_ERROR err = CastingServer::GetInstance()->OpenBasicCommissioningWindow( - [clientQueue, commissioningCompleteCallback](CHIP_ERROR err) { - [[CastingServerBridge getSharedInstance] - dispatchOnClientQueue:clientQueue - description:@"openBasicCommissioningWindow(...) commissioningCompleteCallback" - block:^{ - commissioningCompleteCallback(CHIP_NO_ERROR == err); - }]; - }, + commissioningCallbacks, [clientQueue, onConnectionSuccessCallback](TargetVideoPlayerInfo * cppTargetVideoPlayerInfo) { VideoPlayer * videoPlayer = [ConversionUtils convertToObjCVideoPlayerFrom:cppTargetVideoPlayerInfo]; @@ -614,10 +679,13 @@ - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue }]; }); - dispatch_async(clientQueue, ^{ - ChipLogProgress(AppServer, "[async] Dispatching commissioningWindowRequestedHandler"); - commissioningWindowRequestedHandler(CHIP_NO_ERROR == err); - }); + if (commissioningCallbackHandlers != nil + && commissioningCallbackHandlers.commissioningWindowRequestedHandler != nil) { + dispatch_async(clientQueue, ^{ + ChipLogProgress(AppServer, "[async] Dispatching commissioningWindowRequestedHandler"); + commissioningCallbackHandlers.commissioningWindowRequestedHandler(CHIP_NO_ERROR == err); + }); + } }]; } @@ -750,6 +818,9 @@ - (void)startMatterServer:(dispatch_queue_t _Nonnull)clientQueue return; } + // Initialize AppDelegation + CastingServer::GetInstance()->InitAppDelegation(); + // Initialize binding handlers err = CastingServer::GetInstance()->InitBindingHandlers(); if (err != CHIP_NO_ERROR) { diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h new file mode 100644 index 00000000000000..14288d7ffd6234 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h @@ -0,0 +1,70 @@ +/** + * + * 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. + */ + +#import "MatterError.h" +#import + +#ifndef CommissioningCallbacksHandlers_h +#define CommissioningCallbacksHandlers_h + +@interface CommissioningCallbackHandlers : NSObject + +- (CommissioningCallbackHandlers * _Nonnull) + initWithCommissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler + commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback + sessionEstablishmentStartedCallback:(void (^_Nullable)(void))sessionEstablishmentStartedCallback + sessionEstablishedCallback:(void (^_Nullable)(void))sessionEstablishedCallback + sessionEstablishmentErrorCallback:(void (^_Nullable)(MatterError * _Nonnull))sessionEstablishmentErrorCallback + sessionEstablishmentStoppedCallback:(void (^_Nullable)(void))sessionEstablishmentStoppedCallback; + +/** + * This is called when request to open the commissioning window has been made. + */ +@property void (^_Nullable commissioningWindowRequestedHandler)(bool); + +/** + * This is called when the commissioning has been completed + */ +@property void (^_Nullable commissioningCompleteCallback)(bool); + +/** + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process + */ +@property void (^_Nullable sessionEstablishmentStartedCallback)(void); + +/** + * This is called when the commissioning session has been established + */ +@property void (^_Nullable sessionEstablishedCallback)(void); + +/** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner). The error param indicates the error that + * occurred during session establishment or the error accompanying the fail-safe timeout. + */ +@property void (^_Nullable sessionEstablishmentErrorCallback)(MatterError * _Nonnull); + +/** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ +@property void (^_Nullable sessionEstablishmentStoppedCallback)(void); + +@end + +#endif /* CommissioningCallbacksHandlers_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m new file mode 100644 index 00000000000000..be79d40793c4c2 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m @@ -0,0 +1,42 @@ +/** + * + * 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. + */ + +#import "CommissioningCallbackHandlers.h" + +@implementation CommissioningCallbackHandlers + +- (CommissioningCallbackHandlers * _Nonnull) + initWithCommissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler + commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback + sessionEstablishmentStartedCallback:(void (^_Nullable)(void))sessionEstablishmentStartedCallback + sessionEstablishedCallback:(void (^_Nullable)(void))sessionEstablishedCallback + sessionEstablishmentErrorCallback:(void (^_Nullable)(MatterError * _Nonnull))sessionEstablishmentErrorCallback + sessionEstablishmentStoppedCallback:(void (^_Nullable)(void))sessionEstablishmentStoppedCallback +{ + self = [super init]; + if (self) { + _commissioningWindowRequestedHandler = commissioningWindowRequestedHandler; + _commissioningCompleteCallback = commissioningCompleteCallback; + _sessionEstablishmentStartedCallback = sessionEstablishmentStartedCallback; + _sessionEstablishedCallback = sessionEstablishedCallback; + _sessionEstablishmentErrorCallback = sessionEstablishmentErrorCallback; + _sessionEstablishmentStoppedCallback = sessionEstablishmentStoppedCallback; + } + return self; +} + +@end diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift index a0d41633a750fa..ec0c542d942e38 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift @@ -58,17 +58,32 @@ class CommissioningViewModel: ObservableObject { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.openBasicCommissioningWindow(DispatchQueue.main, - commissioningWindowRequestedHandler: { (result: Bool) -> () in - DispatchQueue.main.async { - self.commisisoningWindowOpened = result + commissioningCallbackHandlers: CommissioningCallbackHandlers( + commissioningWindowRequestedHandler: { (result: Bool) -> () in + DispatchQueue.main.async { + self.Log.info("Commissioning Window opening status: \(result)") + self.commisisoningWindowOpened = result + } + }, + commissioningCompleteCallback: { (result: Bool) -> () in + self.Log.info("Commissioning status: \(result)") + DispatchQueue.main.async { + self.commisisoningComplete = result + } + }, + sessionEstablishmentStartedCallback: { + self.Log.info("PASE session establishment started") + }, + sessionEstablishedCallback: { + self.Log.info("PASE session established") + }, + sessionEstablishmentErrorCallback: { (err: MatterError) -> () in + self.Log.info("PASE session establishment error : \(err)") + }, + sessionEstablishmentStoppedCallback: { + self.Log.info("PASE session establishment stopped") } - }, - commissioningCompleteCallback: { (result: Bool) -> () in - self.Log.info("Commissioning status: \(result)") - DispatchQueue.main.async { - self.commisisoningComplete = result - } - }, + ), onConnectionSuccessCallback: { (videoPlayer: VideoPlayer) -> () in DispatchQueue.main.async { self.connectionSuccess = true @@ -92,7 +107,7 @@ class CommissioningViewModel: ObservableObject { } - private func sendUserDirectedCommissioningRequest(selectedCommissioner: DiscoveredNodeData?) { + private func sendUserDirectedCommissioningRequest(selectedCommissioner: DiscoveredNodeData?) { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.sendUserDirectedCommissioningRequest(selectedCommissioner!, clientQueue: DispatchQueue.main, udcRequestSentHandler: { (result: Bool) -> () in diff --git a/examples/tv-casting-app/linux/CastingUtils.cpp b/examples/tv-casting-app/linux/CastingUtils.cpp index 5e15a2e30e3e17..dca65f54d741b3 100644 --- a/examples/tv-casting-app/linux/CastingUtils.cpp +++ b/examples/tv-casting-app/linux/CastingUtils.cpp @@ -18,6 +18,8 @@ #include "CastingUtils.h" +#include "CommissioningCallbacks.h" + using namespace chip; using namespace chip::System; using namespace chip::DeviceLayer; @@ -62,8 +64,10 @@ void PrepareForCommissioning(const Dnssd::DiscoveredNodeData * selectedCommissio { CastingServer::GetInstance()->Init(); - CastingServer::GetInstance()->OpenBasicCommissioningWindow(HandleCommissioningCompleteCallback, OnConnectionSuccess, - OnConnectionFailure, OnNewOrUpdatedEndpoint); + CommissioningCallbacks commissioningCallbacks; + commissioningCallbacks.commissioningComplete = HandleCommissioningCompleteCallback; + CastingServer::GetInstance()->OpenBasicCommissioningWindow(commissioningCallbacks, OnConnectionSuccess, OnConnectionFailure, + OnNewOrUpdatedEndpoint); // Display onboarding payload chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index b24fe0fa0ec1c8..fd427afc712639 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -22,6 +22,7 @@ #include "ApplicationBasic.h" #include "ApplicationLauncher.h" #include "Channel.h" +#include "CommissioningCallbacks.h" #include "ContentLauncher.h" #include "KeypadInput.h" #include "LevelControl.h" @@ -33,6 +34,7 @@ #include "TargetVideoPlayerInfo.h" #include +#include #include #include #include @@ -45,7 +47,7 @@ constexpr chip::System::Clock::Seconds16 kCommissioningWindowTimeout = chip::Sys * and then have it send TV Casting/Media related commands. This is to be instantiated * as a singleton and is to be used across Linux, Android and iOS. */ -class CastingServer +class CastingServer : public AppDelegate { public: CastingServer(CastingServer & other) = delete; @@ -55,11 +57,12 @@ class CastingServer CHIP_ERROR PreInit(AppParams * AppParams = nullptr); CHIP_ERROR Init(AppParams * AppParams = nullptr); CHIP_ERROR InitBindingHandlers(); + void InitAppDelegation(); CHIP_ERROR DiscoverCommissioners(chip::Controller::DeviceDiscoveryDelegate * deviceDiscoveryDelegate = nullptr); const chip::Dnssd::DiscoveredNodeData * GetDiscoveredCommissioner(int index, chip::Optional & outAssociatedConnectableVideoPlayer); - CHIP_ERROR OpenBasicCommissioningWindow(std::function commissioningCompleteCallback, + CHIP_ERROR OpenBasicCommissioningWindow(CommissioningCallbacks commissioningCallbacks, std::function onConnectionSuccess, std::function onConnectionFailure, std::function onNewOrUpdatedEndpoint); @@ -429,6 +432,13 @@ class CastingServer static void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); void ReadServerClusters(chip::EndpointId endpointId); + void OnCommissioningSessionEstablishmentStarted() override; + void OnCommissioningSessionStarted() override; + void OnCommissioningSessionEstablishmentError(CHIP_ERROR err) override; + void OnCommissioningSessionStopped() override; + void OnCommissioningWindowOpened() override {} + void OnCommissioningWindowClosed() override {} + /** * @brief Retrieve the IP Address to use for the UDC request. * This function will look for an IPv4 address in the list of IPAddresses passed in if available and return @@ -456,7 +466,8 @@ class CastingServer chip::Inet::IPAddress mTargetVideoPlayerIpAddress[chip::Dnssd::CommonResolutionData::kMaxIPAddresses]; chip::Controller::CommissionableNodeController mCommissionableNodeController; - std::function mCommissioningCompleteCallback; + + CommissioningCallbacks mCommissioningCallbacks; std::function mOnNewOrUpdatedEndpoint; std::function mOnConnectionSuccessClientCallback; diff --git a/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h b/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h new file mode 100644 index 00000000000000..06d31eb2b50253 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h @@ -0,0 +1,53 @@ +/* + * + * 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. + * 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 + +struct CommissioningCallbacks +{ + /** + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process + */ + std::function sessionEstablishmentStarted = {}; + + /** + * This is called when the commissioning session has been established + */ + std::function sessionEstablished = {}; + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner) + * + * The CHIP_ERROR param indicates the error that occurred during session establishment or the error accompanying the fail-safe + * timeout. + */ + std::function sessionEstablishmentError = {}; + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ + std::function sessionEstablishmentStopped = {}; + + /** + * This is called when the commissioning has been completed + */ + std::function commissioningComplete = {}; +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h index 076149f786ed52..bbc086ae64a52d 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h @@ -110,7 +110,6 @@ class TargetVideoPlayerInfo static void HandleDeviceConnected(void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { - ChipLogProgress(AppServer, "tmplog: HandleDeviceConnected called"); VideoPlayerConnectionContext * connectionContext = static_cast(context); if (connectionContext == nullptr || connectionContext->mTargetVideoPlayerInfo == nullptr) { diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 313a6dc2e6a6d0..1d40cb500c287e 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -54,6 +54,9 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } + // Set CastingServer as AppDelegate + InitAppDelegation(); + // Initialize binding handlers ReturnErrorOnFailure(InitBindingHandlers()); @@ -67,6 +70,11 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } +void CastingServer::InitAppDelegation() +{ + chip::Server::Server::GetInstance().GetCommissioningWindowManager().SetAppDelegate(this); +} + CHIP_ERROR CastingServer::SetRotatingDeviceIdUniqueId(chip::Optional rotatingDeviceIdUniqueIdOptional) { #if CHIP_ENABLE_ROTATING_DEVICE_ID @@ -130,18 +138,55 @@ CHIP_ERROR CastingServer::DiscoverCommissioners(DeviceDiscoveryDelegate * device Dnssd::DiscoveryFilter(Dnssd::DiscoveryFilterType::kDeviceType, static_cast(35))); } -CHIP_ERROR CastingServer::OpenBasicCommissioningWindow(std::function commissioningCompleteCallback, +CHIP_ERROR CastingServer::OpenBasicCommissioningWindow(CommissioningCallbacks commissioningCallbacks, std::function onConnectionSuccess, std::function onConnectionFailure, std::function onNewOrUpdatedEndpoint) { - mCommissioningCompleteCallback = commissioningCompleteCallback; + mCommissioningCallbacks = commissioningCallbacks; mOnConnectionSuccessClientCallback = onConnectionSuccess; mOnConnectionFailureClientCallback = onConnectionFailure; mOnNewOrUpdatedEndpoint = onNewOrUpdatedEndpoint; return Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(kCommissioningWindowTimeout); } +void CastingServer::OnCommissioningSessionStarted() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionStarted"); + if (mCommissioningCallbacks.sessionEstablished) + { + + mCommissioningCallbacks.sessionEstablished(); + } +} + +void CastingServer::OnCommissioningSessionEstablishmentError(CHIP_ERROR err) +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionEstablishmentError"); + if (mCommissioningCallbacks.sessionEstablishmentError) + { + mCommissioningCallbacks.sessionEstablishmentError(err); + } +} + +void CastingServer::OnCommissioningSessionStopped() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionStopped"); + if (mCommissioningCallbacks.sessionEstablishmentStopped) + { + mCommissioningCallbacks.sessionEstablishmentStopped(); + } +} + +void CastingServer::OnCommissioningSessionEstablishmentStarted() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionEstablishmentStarted"); + if (mCommissioningCallbacks.sessionEstablishmentStarted) + { + mCommissioningCallbacks.sessionEstablishmentStarted(); + } +} + #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT CHIP_ERROR CastingServer::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner) { @@ -433,7 +478,10 @@ void CastingServer::DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * eve { ChipLogError(AppServer, "CastingServer::DeviceEventCallback accessingFabricIndex: %d did not match bindings", event->BindingsChanged.fabricIndex); - CastingServer::GetInstance()->mCommissioningCompleteCallback(CHIP_ERROR_INCORRECT_STATE); + if (CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete) + { + CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete(CHIP_ERROR_INCORRECT_STATE); + } return; } } @@ -472,7 +520,10 @@ void CastingServer::DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * eve ChipLogError(AppServer, "AddVideoPlayer(ToCache) error: %" CHIP_ERROR_FORMAT, err.Format()); } - CastingServer::GetInstance()->mCommissioningCompleteCallback(err); + if (CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete) + { + CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete(err); + } } } From 912339d7b78998dcc46f86cf1a2b938f7a4f357f Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Wed, 2 Aug 2023 18:15:34 -0400 Subject: [PATCH 120/159] [TC-RVC-2.1] Fix PIXIT codes to match the test plan (#28481) * fix PIXIT codes to match tp * fix PIXIT --- src/python_testing/TC_RVCCLEANM_2_1.py | 18 +++++++++--------- src/python_testing/TC_RVCRUNM_2_1.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index e0b699d8373498..e082b83bb67a20 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -23,7 +23,7 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: +# --int-arg PIXIT_ENDPOINT: PIXIT.RVCCLEANM.MODE_CHANGE_OK: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: class TC_RVCCLEANM_2_1(MatterBaseTest): @@ -44,16 +44,16 @@ async def test_TC_RVCCLEANM_2_1(self): asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, "PIXIT_ENDPOINT must be included on the command line in " "the --int-arg flag as PIXIT_ENDPOINT:") - asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, - "PIXIT_MODEOK must be included on the command line in " - "the --int-arg flag as PIXIT_MODEOK:") - asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, - "PIXIT_MODEFAIL must be included on the command line in " - "the --int-arg flag as PIXIT_MODEFAIL:") + asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, + "PIXIT.RVCCLEANM.MODE_CHANGE_OK must be included on the command line in " + "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_OK:") + asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_FAIL' in self.matter_test_config.global_test_params, + "PIXIT.RVCCLEANM.MODE_CHANGE_FAIL must be included on the command line in " + "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] + self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_OK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCCLEANM.S.A0000"), "RVCCLEANM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.A0001"), "RVCCLEANM.S.A0001 must be supported") diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index 1ef5cefe6525e6..f6be1d2287f371 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -23,7 +23,7 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: +# --int-arg PIXIT_ENDPOINT: PIXIT.RVCRUNM.MODE_CHANGE_OK: PIXIT.RVCRUNM.MODE_CHANGE_FAIL: class TC_RVCRUNM_2_1(MatterBaseTest): @@ -44,16 +44,16 @@ async def test_TC_RVCRUNM_2_1(self): asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, "PIXIT_ENDPOINT must be included on the command line in " "the --int-arg flag as PIXIT_ENDPOINT:") - asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, - "PIXIT_MODEOK must be included on the command line in " - "the --int-arg flag as PIXIT_MODEOK:") - asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, - "PIXIT_MODEFAIL must be included on the command line in " - "the --int-arg flag as PIXIT_MODEFAIL:") + asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, + "PIXIT.RVCRUNM.MODE_CHANGE_OK must be included on the command line in " + "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_OK:") + asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_FAIL' in self.matter_test_config.global_test_params, + "PIXIT.RVCRUNM.MODE_CHANGE_FAIL must be included on the command line in " + "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_FAIL:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] + self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_OK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") From cfa8212524abc934c5b5e6cea35ea400e24dc3f1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 2 Aug 2023 19:27:21 -0400 Subject: [PATCH 121/159] Stop using controllerID for internal XPC bookkeeping. (#28480) We want to use controllerID for client-assigned controller IDs. --- .../Framework/CHIP/MTRDeviceControllerOverXPC.mm | 10 +++++----- .../CHIP/MTRDeviceControllerOverXPC_Internal.h | 2 +- src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm index 844c7d26e7c63a..674618a5eb9987 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm @@ -179,7 +179,7 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); - if (!self.controllerID) { + if (!self.controllerXPCID) { dispatch_group_enter(group); [self.xpcConnection getProxyHandleWithCompletion:^( dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { @@ -188,7 +188,7 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC if (error) { MTR_LOG_ERROR("Failed to fetch any shared remote controller"); } else { - self.controllerID = controller; + self.controllerXPCID = controller; handleRetainer = handle; } dispatch_group_leave(group); @@ -200,8 +200,8 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC }]; } dispatch_group_notify(group, queue, ^{ - if (self.controllerID) { - completion(self.controllerID, handleRetainer, nil); + if (self.controllerXPCID) { + completion(self.controllerXPCID, handleRetainer, nil); } else { completion(nil, nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } @@ -234,7 +234,7 @@ - (instancetype)initWithControllerID:(id)controllerID workQueue:(dispatch_queue_t)queue xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerID; + _controllerXPCID = controllerID; _workQueue = queue; _xpcConnection = xpcConnection; return self; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h index ccbc2f29168450..b4d498b29295c0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h @@ -25,7 +25,7 @@ typedef void (^MTRFetchControllerIDCompletion)( @interface MTRDeviceControllerOverXPC () -@property (nonatomic, readwrite, strong) id _Nullable controllerID; +@property (nonatomic, readwrite, strong) id _Nullable controllerXPCID; @property (nonatomic, readonly, strong) dispatch_queue_t workQueue; @property (nonatomic, readonly, strong) MTRDeviceControllerXPCConnection * xpcConnection; diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm index cdc2dacb20c37c..98a217eb77e2d8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm @@ -46,7 +46,7 @@ - (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controll deviceID:(NSNumber *)deviceID xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerOverXPC.controllerID; + _controllerID = controllerOverXPC.controllerXPCID; _controller = controllerOverXPC; _nodeID = deviceID; _xpcConnection = xpcConnection; From 5067c4a7d8e4785683b60c67e85f58fa4310506a Mon Sep 17 00:00:00 2001 From: Matt Hazley Date: Thu, 3 Aug 2023 06:10:52 +0100 Subject: [PATCH 122/159] Add functions to set Parent Endpoint and Composition Type for an Endpoint (#28410) * Added endpointCompositionType to the EmberAfDefinedEndpoint structure to be used to hold whether an endpoint is flat or tree composed - defaults to Flat to assume previous behaviour as default * Added functions to support setting and getting composition type and also to set an endpoints parent endpoint * updated Read handler for parts list to make its else branch for Flat composition and then added a further branch to handle Tree composition * Restyled by clang-format * Fixed mistake in return type of emberAfEndpointCompositionTypeForEndpoint * Removing debug logs * Restyled by clang-format * Moved new API funciotns to chip::app namespace and removed ember naming. Made endpoint struct use a proper bitmask as it was basically using an enum in a weird way * Moved Read for Parts List to use new function naming * Restyled by clang-format * Replaced EmberAfStatus with CHIP_ERROR * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/app/clusters/descriptor/descriptor.cpp | 20 +++++- src/app/util/af-types.h | 15 ++--- src/app/util/af.h | 27 +++++++- src/app/util/attribute-storage.cpp | 74 ++++++++++++++++++++-- 4 files changed, 118 insertions(+), 18 deletions(-) diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 95f290a0afd732..8d8b318639722e 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -76,7 +76,7 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu return CHIP_NO_ERROR; }); } - else + else if (IsFlatCompositionForEndpoint(endpoint)) { err = aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR { for (uint16_t index = 0; index < emberAfEndpointCount(); index++) @@ -104,6 +104,24 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu return CHIP_NO_ERROR; }); } + else if (IsTreeCompositionForEndpoint(endpoint)) + { + err = aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR { + for (uint16_t index = 0; index < emberAfEndpointCount(); index++) + { + if (!emberAfEndpointIndexIsEnabled(index)) + continue; + + EndpointId parentEndpointId = emberAfParentEndpointFromIndex(index); + if (parentEndpointId == endpoint) + { + ReturnErrorOnFailure(encoder.Encode(emberAfEndpointFromIndex(index))); + } + } + + return CHIP_NO_ERROR; + }); + } return err; } diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 9c4a7ca6a5f069..20ab5fcfc0b508 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -181,14 +181,11 @@ typedef struct uint16_t endpointSize; } EmberAfEndpointType; -#ifdef DOXYGEN_SHOULD_SKIP_THIS -enum EmberAfEndpointBitmask; -#else -typedef uint8_t EmberAfEndpointBitmask; -enum -#endif -{ EMBER_AF_ENDPOINT_DISABLED = 0x00, - EMBER_AF_ENDPOINT_ENABLED = 0x01, +enum class EmberAfEndpointOptions : uint8_t +{ + isEnabled = 0x1, + isFlatComposition = 0x2, + isTreeComposition = 0x3, }; /** @@ -209,7 +206,7 @@ struct EmberAfDefinedEndpoint /** * Meta-data about the endpoint */ - EmberAfEndpointBitmask bitmask = EMBER_AF_ENDPOINT_DISABLED; + chip::BitMask bitmask; /** * Endpoint type for this endpoint. */ diff --git a/src/app/util/af.h b/src/app/util/af.h index 1ea0fa64872698..0875c09478c8d8 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -130,7 +130,7 @@ extern EmberAfDefinedEndpoint emAfEndpoints[]; #endif /** - * @brief Returns root endpoint of a composed bridged device + * @brief Returns parent endpoint for a given endpoint index */ chip::EndpointId emberAfParentEndpointFromIndex(uint16_t index); @@ -303,5 +303,30 @@ class EnabledEndpointsWithServerCluster ClusterId mClusterId; }; +/** + * @brief Sets the parent endpoint for a given endpoint + */ +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint); + +/** + * @brief Sets an Endpoint to use Flat Composition + */ +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Sets an Endpoint to use Tree Composition + */ +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has flat composition + */ +bool IsFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has tree composition + */ +bool IsTreeCompositionForEndpoint(EndpointId endpoint); + } // namespace app } // namespace chip diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 788723a2162bf5..118e38f78961f2 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -192,7 +192,9 @@ void emberAfEndpointConfigure() emAfEndpoints[ep].deviceTypeList = endpointDeviceTypeList(ep); emAfEndpoints[ep].endpointType = endpointTypeMacro(ep); emAfEndpoints[ep].dataVersions = currentDataVersions; - emAfEndpoints[ep].bitmask = EMBER_AF_ENDPOINT_ENABLED; + + emAfEndpoints[ep].bitmask.Set(EmberAfEndpointOptions::isEnabled); + emAfEndpoints[ep].bitmask.Set(EmberAfEndpointOptions::isFlatComposition); // Increment currentDataVersions by 1 (slot) for every server cluster // this endpoint has. @@ -271,7 +273,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb emAfEndpoints[index].endpointType = ep; emAfEndpoints[index].dataVersions = dataVersionStorage.data(); // Start the endpoint off as disabled. - emAfEndpoints[index].bitmask = EMBER_AF_ENDPOINT_DISABLED; + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled); emAfEndpoints[index].parentEndpointId = parentEndpointId; emberAfSetDynamicEndpointCount(MAX_ENDPOINT_COUNT - FIXED_ENDPOINT_COUNT); @@ -322,7 +324,7 @@ uint16_t emberAfEndpointCount() bool emberAfEndpointIndexIsEnabled(uint16_t index) { - return (emAfEndpoints[index].bitmask & EMBER_AF_ENDPOINT_ENABLED); + return (emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled)); } bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType) @@ -838,7 +840,7 @@ static uint16_t findIndexFromEndpoint(EndpointId endpoint, bool ignoreDisabledEn for (epi = 0; epi < emberAfEndpointCount(); epi++) { if (emAfEndpoints[epi].endpoint == endpoint && - (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask & EMBER_AF_ENDPOINT_ENABLED)) + (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask.Has(EmberAfEndpointOptions::isEnabled))) { return epi; } @@ -919,11 +921,11 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) return false; } - currentlyEnabled = emAfEndpoints[index].bitmask & EMBER_AF_ENDPOINT_ENABLED; + currentlyEnabled = emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled); if (enable) { - emAfEndpoints[index].bitmask |= EMBER_AF_ENDPOINT_ENABLED; + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isEnabled); } #if defined(EZSP_HOST) @@ -962,7 +964,7 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) if (!enable) { - emAfEndpoints[index].bitmask &= EMBER_AF_ENDPOINT_DISABLED; + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled); } return true; @@ -1421,6 +1423,64 @@ app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId return nullptr; } + +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint) +{ + uint16_t childIndex = emberAfIndexFromEndpoint(childEndpoint); + uint16_t parentIndex = emberAfIndexFromEndpoint(parentEndpoint); + + if (childIndex == kEmberInvalidEndpointIndex || parentIndex == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[childIndex].parentEndpointId = parentEndpoint; + return CHIP_NO_ERROR; +} + +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isTreeComposition); + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isFlatComposition); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isFlatComposition); + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isTreeComposition); + return CHIP_NO_ERROR; +} + +bool IsFlatCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + return emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isFlatComposition); +} + +bool IsTreeCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + return emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isTreeComposition); +} + } // namespace app } // namespace chip From c3c479537eb06cf2e0e7b5b48558800d1d002edf Mon Sep 17 00:00:00 2001 From: wyhong <30567533+wy-hh@users.noreply.github.com> Date: Thu, 3 Aug 2023 13:17:55 +0800 Subject: [PATCH 123/159] Add macro to set alignment of sha256 context (#28426) --- src/crypto/CHIPCryptoPAL.h | 2 +- src/lib/core/CHIPConfig.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index 88abc189b5b06f..65511668b1d5fd 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -803,7 +803,7 @@ CHIP_ERROR Hash_SHA1(const uint8_t * data, size_t data_length, uint8_t * out_buf * All implementations must check for std::is_trivially_copyable. **/ -struct alignas(size_t) HashSHA256OpaqueContext +struct alignas(CHIP_CONFIG_SHA256_CONTEXT_ALIGN) HashSHA256OpaqueContext { uint8_t mOpaque[kMAX_Hash_SHA256_Context_Size]; }; diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 80b3d18cfe410f..2aba0915a2d52d 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -185,6 +185,15 @@ #define CHIP_CONFIG_SHA256_CONTEXT_SIZE ((sizeof(unsigned int) * (8 + 2 + 16 + 2)) + sizeof(uint64_t)) #endif // CHIP_CONFIG_SHA256_CONTEXT_SIZE +/** + * @def CHIP_CONFIG_SHA256_CONTEXT_ALIGN + * + * @brief The alignment of SHA256 context buffer. + */ +#ifndef CHIP_CONFIG_SHA256_CONTEXT_ALIGN +#define CHIP_CONFIG_SHA256_CONTEXT_ALIGN size_t +#endif // CHIP_CONFIG_SHA256_CONTEXT_ALIGN + /** * @def CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS * From 7df6d0af5bde1044f44623b445404362fbe06348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Michalak-Szmaci=C5=84ski?= Date: Thu, 3 Aug 2023 07:30:54 +0200 Subject: [PATCH 124/159] Fix uninitialised values in KeySet and AttributePathExpandIterator (#28356) * Fix uninitialised value in KeySet * Fix uninitilised mGlobalAttributeEndIndex * Restyled by clang-format * Review proposed change initilize mGlobalAttributeEndIndex * Change initialize values in KeySet to initilize only start_time in EpochKey * Restyled by clang-format * Review proposed change initilize IPK keyset start_time --------- Co-authored-by: Restyled.io --- src/app/AttributePathExpandIterator.cpp | 5 +++++ .../operational-credentials-server.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 6c45055c3933b0..5c1bb50c179f47 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -141,6 +141,11 @@ void AttributePathExpandIterator::PrepareAttributeIndexRange(const AttributePath } mGlobalAttributeEndIndex = static_cast(mGlobalAttributeIndex + 1); } + else + { + mGlobalAttributeIndex = UINT8_MAX; + mGlobalAttributeEndIndex = 0; + } } } diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 5a6c645a510670..4340f683b0d666 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -654,9 +654,10 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co // Set the Identity Protection Key (IPK) // The IPK SHALL be the operational group key under GroupKeySetID of 0 - keyset.keyset_id = Credentials::GroupDataProvider::kIdentityProtectionKeySetId; - keyset.policy = GroupKeyManagement::GroupKeySecurityPolicyEnum::kTrustFirst; - keyset.num_keys_used = 1; + keyset.keyset_id = Credentials::GroupDataProvider::kIdentityProtectionKeySetId; + keyset.policy = GroupKeyManagement::GroupKeySecurityPolicyEnum::kTrustFirst; + keyset.num_keys_used = 1; + keyset.epoch_keys[0].start_time = 0; memcpy(keyset.epoch_keys[0].key, ipkValue.data(), Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES); err = newFabricInfo->GetCompressedFabricIdBytes(compressed_fabric_id); From a21755bdb3a1830d1122cc83851c7760b53e823f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 3 Aug 2023 03:09:32 -0400 Subject: [PATCH 125/159] Add a controller argument to the storage checker function. (#28488) Most of the changes are just reindenting. --- .../CHIP/MTRDeviceControllerFactory.mm | 160 +++++++++--------- 1 file changed, 82 insertions(+), 78 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index d7fb8e7b119cf0..64e4af1ba29fc9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -560,8 +560,9 @@ - (void)stopControllerFactory * the right error value in that situation. */ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerStartupParams *)startupParams - fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)( - FabricTable * fabricTable, CHIP_ERROR & fabricError))fabricChecker + fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)(FabricTable * fabricTable, + MTRDeviceController * controller, + CHIP_ERROR & fabricError))fabricChecker error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; @@ -590,7 +591,7 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt FabricTable * fabricTable = &fabricTableInstance; dispatch_sync(_chipWorkQueue, ^{ - params = fabricChecker(fabricTable, fabricError); + params = fabricChecker(fabricTable, controller, fabricError); }); if (params == nil) { @@ -624,54 +625,56 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo { [self _assertCurrentQueueIsNotMatterQueue]; - return [self - _startDeviceController:startupParams - fabricChecker:^MTRDeviceControllerStartupParamsInternal *(FabricTable * fabricTable, CHIP_ERROR & fabricError) { - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return nil; - } - - if (fabric == nullptr) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); - fabricError = CHIP_ERROR_NOT_FOUND; - return nil; - } - - auto * controllersCopy = [self getRunningControllers]; - - for (MTRDeviceController * existing in controllersCopy) { - BOOL isRunning = YES; // assume the worst - if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] - != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); - fabricError = CHIP_ERROR_INTERNAL; - return nil; - } - - if (isRunning) { - MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return nil; - } - } - - auto * params = - [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable - fabricIndex:fabric->GetFabricIndex() - keystore:self->_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } - - return params; - } - error:error]; + return [self _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric == nullptr) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); + fabricError = CHIP_ERROR_NOT_FOUND; + return nil; + } + + auto * controllersCopy = [self getRunningControllers]; + + for (MTRDeviceController * existing in controllersCopy) { + BOOL isRunning = YES; // assume the worst + if ([existing isRunningOnFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + isRunning:&isRunning] + != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (isRunning) { + MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + + return params; + } + error:error]; } - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams @@ -695,33 +698,34 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl return nil; } - return [self - _startDeviceController:startupParams - fabricChecker:^MTRDeviceControllerStartupParamsInternal *(FabricTable * fabricTable, CHIP_ERROR & fabricError) { - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return nil; - } - - if (fabric != nullptr) { - MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return nil; - } - - auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable - keystore:self->_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } - return params; - } - error:error]; + return [self _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric != nullptr) { + MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + return params; + } + error:error]; } - (MTRDeviceController * _Nullable)createController From 59a0b2f67e0827f41bae97ef9eec78c4dc171a7a Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Thu, 3 Aug 2023 12:48:31 +0530 Subject: [PATCH 126/159] CASE: Send busy status report if we receive a sigma1 and we are in the middle of handshake (#28153) * CASE: Send busy status report if we receive a sigma1 and we are in the middle of handshake * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Addressing review comments * few more review comments * Addressed reviews and added the unit tests * Restyled by clang-format * Few more review comments * Apply suggestions from code review Co-authored-by: Tennessee Carmel-Veilleux * Moved todo to better place --------- Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io Co-authored-by: Tennessee Carmel-Veilleux --- src/protocols/secure_channel/CASEServer.cpp | 27 ++++++++++++++--- src/protocols/secure_channel/CASEServer.h | 8 +++++ src/protocols/secure_channel/CASESession.cpp | 4 +++ src/protocols/secure_channel/PairingSession.h | 23 +++++++++++++++ src/protocols/secure_channel/StatusReport.cpp | 28 ++++++++++++++++++ src/protocols/secure_channel/StatusReport.h | 10 +++++++ .../secure_channel/tests/TestStatusReport.cpp | 29 +++++++++++++++++++ 7 files changed, 125 insertions(+), 4 deletions(-) diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index b78f5f40630680..f8d580fdd9957b 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -84,10 +84,17 @@ CHIP_ERROR CASEServer::OnMessageReceived(Messaging::ExchangeContext * ec, const bool watchdogFired = GetSession().InvokeBackgroundWorkWatchdog(); if (!watchdogFired) { - // Handshake wasn't stuck, let it continue its work - // TODO: Send Busy response, #27473 - ChipLogError(Inet, "CASE session is in establishing state, returning without responding"); - return CHIP_NO_ERROR; + // Handshake wasn't stuck, send the busy status report and let the existing handshake continue. + + // A successful CASE handshake can take several seconds and some may time out (30 seconds or more). + // TODO: Come up with better estimate: https://github.com/project-chip/connectedhomeip/issues/28288 + // For now, setting minimum wait time to 5000 milliseconds. + CHIP_ERROR err = SendBusyStatusReport(ec, System::Clock::Milliseconds16(5000)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Inet, "Failed to send the busy status report, err:%" CHIP_ERROR_FORMAT, err.Format()); + } + return err; } } @@ -181,4 +188,16 @@ void CASEServer::OnSessionEstablished(const SessionHandle & session) ChipLogValueScopedNodeId(session->GetPeer())); PrepareForSessionEstablishment(session->GetPeer()); } + +CHIP_ERROR CASEServer::SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime) +{ + ChipLogProgress(Inet, "Already in the middle of CASE handshake, sending busy status report"); + + System::PacketBufferHandle handle = Protocols::SecureChannel::StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); + VerifyOrReturnError(!handle.IsNull(), CHIP_ERROR_NO_MEMORY); + + ChipLogProgress(Inet, "Sending status report, exchange " ChipLogFormatExchange, ChipLogValueExchange(ec)); + return ec->SendMessage(Protocols::SecureChannel::MsgType::StatusReport, std::move(handle)); +} + } // namespace chip diff --git a/src/protocols/secure_channel/CASEServer.h b/src/protocols/secure_channel/CASEServer.h index 894d496c93bfac..0c1f1d26dcb963 100644 --- a/src/protocols/secure_channel/CASEServer.h +++ b/src/protocols/secure_channel/CASEServer.h @@ -22,6 +22,7 @@ #include #include #include +#include namespace chip { @@ -107,6 +108,13 @@ class CASEServer : public SessionEstablishmentDelegate, * */ void PrepareForSessionEstablishment(const ScopedNodeId & previouslyEstablishedPeer = ScopedNodeId()); + + // If we are in the middle of handshake and receive a Sigma1 then respond with Busy status code. + // @param[in] ec Exchange Context + // @param[in] minimumWaitTime Minimum wait time reported to client before it can attempt to resend sigma1 + // + // @return CHIP_NO_ERROR on success, error code otherwise + CHIP_ERROR SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime); }; } // namespace chip diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 07a75cf5fcbb2a..2afc40feacaf02 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1977,6 +1977,10 @@ CHIP_ERROR CASESession::OnFailureStatusReport(Protocols::SecureChannel::GeneralS err = CHIP_ERROR_NO_SHARED_TRUSTED_ROOT; break; + case kProtocolCodeBusy: + err = CHIP_ERROR_BUSY; + break; + default: err = CHIP_ERROR_INTERNAL; break; diff --git a/src/protocols/secure_channel/PairingSession.h b/src/protocols/secure_channel/PairingSession.h index 6e59f06dcaa660..ccbbd4a452ae64 100644 --- a/src/protocols/secure_channel/PairingSession.h +++ b/src/protocols/secure_channel/PairingSession.h @@ -174,6 +174,29 @@ class DLL_EXPORT PairingSession : public SessionDelegate else { err = OnFailureStatusReport(report.GetGeneralCode(), report.GetProtocolCode()); + + if (report.GetGeneralCode() == Protocols::SecureChannel::GeneralStatusCode::kBusy && + report.GetProtocolCode() == Protocols::SecureChannel::kProtocolCodeBusy) + { + if (!report.GetProtocolData().IsNull()) + { + Encoding::LittleEndian::Reader reader(report.GetProtocolData()->Start(), + report.GetProtocolData()->DataLength()); + + uint16_t minimumWaitTime = 0; + err = reader.Read16(&minimumWaitTime).StatusCode(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SecureChannel, "Failed to read the minimum wait time: %" CHIP_ERROR_FORMAT, err.Format()); + } + else + { + // TODO: CASE: Notify minimum wait time to clients on receiving busy status report #28290 + ChipLogProgress(SecureChannel, "Received busy status report with minimum wait time: %u ms", + minimumWaitTime); + } + } + } } return err; diff --git a/src/protocols/secure_channel/StatusReport.cpp b/src/protocols/secure_channel/StatusReport.cpp index 18df6f7383e516..e31c832b469f51 100644 --- a/src/protocols/secure_channel/StatusReport.cpp +++ b/src/protocols/secure_channel/StatusReport.cpp @@ -95,6 +95,34 @@ size_t StatusReport::Size() const return WriteToBuffer(emptyBuf).Needed(); } +System::PacketBufferHandle StatusReport::MakeBusyStatusReportMessage(System::Clock::Milliseconds16 minimumWaitTime) +{ + using namespace Protocols::SecureChannel; + constexpr uint8_t kBusyStatusReportProtocolDataSize = sizeof(minimumWaitTime.count()); // 16-bits + + auto handle = System::PacketBufferHandle::New(kBusyStatusReportProtocolDataSize, 0); + VerifyOrReturnValue(!handle.IsNull(), handle, + ChipLogError(SecureChannel, "Failed to allocate protocol data for busy status report")); + + // Build the protocol data with minimum wait time + Encoding::LittleEndian::PacketBufferWriter protocolDataBufferWriter(std::move(handle)); + protocolDataBufferWriter.Put16(minimumWaitTime.count()); + handle = protocolDataBufferWriter.Finalize(); + VerifyOrReturnValue(!handle.IsNull(), handle, + ChipLogError(SecureChannel, "Failed to finalize protocol data for busy status report")); + + // Build a busy status report + StatusReport statusReport(GeneralStatusCode::kBusy, Protocols::SecureChannel::Id, kProtocolCodeBusy, std::move(handle)); + + // Build the status report message + handle = System::PacketBufferHandle::New(statusReport.Size()); + VerifyOrReturnValue(!handle.IsNull(), handle, ChipLogError(SecureChannel, "Failed to allocate status report message")); + Encoding::LittleEndian::PacketBufferWriter bbuf(std::move(handle)); + + statusReport.WriteToBuffer(bbuf); + return bbuf.Finalize(); +} + } // namespace SecureChannel } // namespace Protocols } // namespace chip diff --git a/src/protocols/secure_channel/StatusReport.h b/src/protocols/secure_channel/StatusReport.h index cd26b798eab1db..e25f2c6dc1a20b 100644 --- a/src/protocols/secure_channel/StatusReport.h +++ b/src/protocols/secure_channel/StatusReport.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace chip { @@ -94,6 +95,15 @@ class DLL_EXPORT StatusReport uint16_t GetProtocolCode() const { return mProtocolCode; } const System::PacketBufferHandle & GetProtocolData() const { return mProtocolData; } + /** + * Builds a busy status report with protocol data containing the minimum wait time. + * + * @param[in] minimumWaitTime Time in milliseconds before initiator retries the request + * + * @return Packet buffer handle which can be passed to SendMessage. + */ + static System::PacketBufferHandle MakeBusyStatusReportMessage(System::Clock::Milliseconds16 minimumWaitTime); + private: GeneralStatusCode mGeneralCode; Protocols::Id mProtocolId; diff --git a/src/protocols/secure_channel/tests/TestStatusReport.cpp b/src/protocols/secure_channel/tests/TestStatusReport.cpp index 35cbe1b5bca65e..093453029b156b 100644 --- a/src/protocols/secure_channel/tests/TestStatusReport.cpp +++ b/src/protocols/secure_channel/tests/TestStatusReport.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ +#include #include #include #include @@ -104,6 +105,33 @@ void TestBadStatusReport(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); } +void TestMakeBusyStatusReport(nlTestSuite * inSuite, void * inContext) +{ + GeneralStatusCode generalCode = GeneralStatusCode::kBusy; + auto protocolId = SecureChannel::Id; + uint16_t protocolCode = kProtocolCodeBusy; + System::Clock::Milliseconds16 minimumWaitTime = System::Clock::Milliseconds16(5000); + + System::PacketBufferHandle handle = StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); + NL_TEST_ASSERT(inSuite, !handle.IsNull()); + + StatusReport reportToParse; + CHIP_ERROR err = reportToParse.Parse(std::move(handle)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(inSuite, reportToParse.GetGeneralCode() == generalCode); + NL_TEST_ASSERT(inSuite, reportToParse.GetProtocolId() == protocolId); + NL_TEST_ASSERT(inSuite, reportToParse.GetProtocolCode() == protocolCode); + + const System::PacketBufferHandle & rcvData = reportToParse.GetProtocolData(); + NL_TEST_ASSERT(inSuite, !rcvData.IsNull()); + NL_TEST_ASSERT(inSuite, rcvData->DataLength() == sizeof(minimumWaitTime)); + + uint16_t readMinimumWaitTime = 0; + Encoding::LittleEndian::Reader reader(rcvData->Start(), rcvData->DataLength()); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == reader.Read16(&readMinimumWaitTime).StatusCode()); + NL_TEST_ASSERT(inSuite, System::Clock::Milliseconds16(readMinimumWaitTime) == minimumWaitTime); +} + // Test Suite /** @@ -115,6 +143,7 @@ static const nlTest sTests[] = NL_TEST_DEF("TestStatusReport_NoData", TestStatusReport_NoData), NL_TEST_DEF("TestStatusReport_WithData", TestStatusReport_WithData), NL_TEST_DEF("TestBadStatusReport", TestBadStatusReport), + NL_TEST_DEF("TestMakeBusyStatusReport", TestMakeBusyStatusReport), NL_TEST_SENTINEL() }; From ae4358788f59097286e52cf2e1ed57bb3719d613 Mon Sep 17 00:00:00 2001 From: Marcin Kajor <98948394+markaj-nordic@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:08:03 +0200 Subject: [PATCH 127/159] doc: chip_tool_guide: fix the order of arguments in (#28494) `pairing code` command chip-tool expects the node-id to be passed before payload. Signed-off-by: Marcin Kajor --- docs/guides/chip_tool_guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 2561a6cdd6c754..49fe4ad48a83da 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -980,15 +980,15 @@ Complete the following steps: fabric by using the following command pattern: ``` - $ ./chip-tool pairing code --commissioner-name + $ ./chip-tool pairing code --commissioner-name ``` In this command: - - __ is the the QR code payload or a manual pairing code generated - by the first commissioner instance when opened commissioning window - __ is the user-defined ID of the node being commissioned. It doesn't need to be the same ID, as for the first fabric. + - __ is the the QR code payload or a manual pairing code generated + by the first commissioner instance when opened commissioning window - __ is the name of the second fabric. Valid values are "alpha", "beta", "gamma", and integers greater than or equal to 4. The default if not specified is "alpha". @@ -996,7 +996,7 @@ Complete the following steps: **Example of command:** ``` - $ ./chip-tool pairing code 36281602573 1 --commissioner-name beta + $ ./chip-tool pairing code 1 36281602573 --commissioner-name beta ``` #### Step 5: Test reception of commands From 4b1fcb624b3b2c1b9ddd900b8ce29a250234a8f6 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Thu, 3 Aug 2023 08:52:14 -0400 Subject: [PATCH 128/159] add event For messages acks, Request ICD active mode when waiting on a ack (#28380) --- src/app/icd/ICDEventManager.cpp | 13 +++++++++++++ src/app/icd/ICDEventManager.h | 1 + src/app/icd/ICDManager.h | 1 + src/include/platform/CHIPDeviceEvent.h | 19 +++++++++++++++++++ src/messaging/ReliableMessageContext.cpp | 19 +++++++++++++++++++ src/messaging/ReliableMessageContext.h | 5 ----- 6 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/app/icd/ICDEventManager.cpp b/src/app/icd/ICDEventManager.cpp index a8e4e11de5fb1b..cbe3c5521a65d9 100644 --- a/src/app/icd/ICDEventManager.cpp +++ b/src/app/icd/ICDEventManager.cpp @@ -23,6 +23,7 @@ namespace chip { namespace app { uint8_t ICDEventManager::expectedMsgCount = 0; +uint8_t ICDEventManager::awaitingAckCount = 0; static_assert(UINT8_MAX >= CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS, "ICDEventManager::expectedMsgCount cannot hold count for the max exchange count"); @@ -97,7 +98,19 @@ void ICDEventManager::ICDEventHandler(const ChipDeviceEvent * event, intptr_t ar { icdManager->UpdateOperationState(ICDManager::OperationalState::ActiveMode); } + break; + case DeviceEventType::kICDMsgAckSyncEvent: + // When a Reliable Message Context is awaiting an ack, we keep the ICD in its active mode + if (event->AckSync.awaitingAck) + { + awaitingAckCount++; + } + else if (awaitingAckCount > 0) + { + awaitingAckCount--; + } + icdManager->SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kAwaitingMsgAck, (awaitingAckCount != 0)); break; case DeviceEventType::kAppWakeUpEvent: icdManager->UpdateOperationState(ICDManager::OperationalState::ActiveMode); diff --git a/src/app/icd/ICDEventManager.h b/src/app/icd/ICDEventManager.h index fffbbb8dc334fb..c86b356e408657 100644 --- a/src/app/icd/ICDEventManager.h +++ b/src/app/icd/ICDEventManager.h @@ -48,6 +48,7 @@ class ICDEventManager */ static void ICDEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); static uint8_t expectedMsgCount; + static uint8_t awaitingAckCount; ICDManager * mICDManager; }; diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index 10a1704a670cfa..e5406f14615837 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -49,6 +49,7 @@ class ICDManager kCommissioningWindowOpen = 0x01, kFailSafeArmed = 0x02, kExpectingMsgResponse = 0x03, + kAwaitingMsgAck = 0x04, }; ICDManager() {} diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 47f32fc1346d39..47573ba348fd78 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -274,6 +274,16 @@ enum PublicEventTypes */ kChipMsgRxEventHandled, + /** + * This event is used to sync the ICD with any Reliable Message exchange + * expecting an ack. The ICD shall stay in active Mode + * until the Reliable Message exchange post this event again + * informing the ICD that it is no longer awaiting the ack. + * + * This event contains an AckSync structure. + */ + kICDMsgAckSyncEvent, + /** * An application event occured that should wake up the system/device */ @@ -580,6 +590,15 @@ struct ChipDeviceEvent final bool wasReceived; bool clearsExpectedResponse; } RxEventContext; + + struct + { + /* + * Set to true when a Reliable Message Context is awaiting for a ack to a message sent + * Set to false when the Reliable Message Context is no longer awaiting for a ack + */ + bool awaitingAck; + } AckSync; }; void Clear() { memset(this, 0, sizeof(*this)); } diff --git a/src/messaging/ReliableMessageContext.cpp b/src/messaging/ReliableMessageContext.cpp index 06decfc320c41f..fcba107a734c5f 100644 --- a/src/messaging/ReliableMessageContext.cpp +++ b/src/messaging/ReliableMessageContext.cpp @@ -33,9 +33,12 @@ #include #include #include +#include #include #include +using namespace chip::DeviceLayer; + namespace chip { namespace Messaging { @@ -51,6 +54,22 @@ ReliableMessageMgr * ReliableMessageContext::GetReliableMessageMgr() return static_cast(this)->GetExchangeMgr()->GetReliableMessageMgr(); } +void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) +{ + mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); + +#if CONFIG_DEVICE_LAYER + DeviceLayer::ChipDeviceEvent event; + event.Type = DeviceLayer::DeviceEventType::kICDMsgAckSyncEvent; + event.AckSync.awaitingAck = messageNotAcked; + CHIP_ERROR status = DeviceLayer::PlatformMgr().PostEvent(&event); + if (status != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to post AckSync event %" CHIP_ERROR_FORMAT, status.Format()); + } +#endif +} + CHIP_ERROR ReliableMessageContext::FlushAcks() { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/messaging/ReliableMessageContext.h b/src/messaging/ReliableMessageContext.h index 57ec4561740376..2ee9fe50a2f763 100644 --- a/src/messaging/ReliableMessageContext.h +++ b/src/messaging/ReliableMessageContext.h @@ -241,11 +241,6 @@ inline void ReliableMessageContext::SetAckPending(bool inAckPending) mFlags.Set(Flags::kFlagAckPending, inAckPending); } -inline void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) -{ - mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); -} - inline void ReliableMessageContext::SetRequestingActiveMode(bool activeMode) { mFlags.Set(Flags::kFlagActiveMode, activeMode); From af37ac49aad02848bca21da98e19416e46c66234 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:26:21 -0400 Subject: [PATCH 129/159] [ReadHandler] Removal of test flags (#28421) * Removed reportScheduler test flags and made TestReadInteractin.cpp wait for min/max instead of setting flags. Modified subscription times in the test to minimise the impact of waiting. * Restyled by clang-format * Added a driveAndServiceIO after waiting for max in test where we should wait for max to expire to ensure the run gets scheduled reliably * Moved ctx.GetIOContext().DriveIO(); after each tests to garantee this will run after maxInterval is expired * Implemented a mock clock in TestReadInteraction to reduce wait loops * Removed more loops and added comment on loop left in the code --------- Co-authored-by: Restyled.io --- src/app/reporting/ReportScheduler.h | 49 +------ src/app/tests/TestReadInteraction.cpp | 203 +++++++++++--------------- 2 files changed, 89 insertions(+), 163 deletions(-) diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h index fc1858862bc4bd..068237780b86a0 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -63,17 +63,6 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver class ReadHandlerNode : public TimerContext { public: -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - /// Test flags to allow TestReadInteraction to simulate expiration of the minimal and maximal intervals without - /// waiting - enum class TestFlags : uint8_t{ - MinIntervalElapsed = (1 << 0), - MaxIntervalElapsed = (1 << 1), - }; - void SetTestFlags(TestFlags aFlag, bool aValue) { mFlags.Set(aFlag, aValue); } - bool GetTestFlags(TestFlags aFlag) const { return mFlags.Has(aFlag); } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST - ReadHandlerNode(ReadHandler * aReadHandler, TimerDelegate * aTimerDelegate, ReportScheduler * aScheduler) : mTimerDelegate(aTimerDelegate), mScheduler(aScheduler) { @@ -93,29 +82,12 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver { Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp || mFlags.Has(TestFlags::MinIntervalElapsed)) && - (mReadHandler->IsDirty() || (now >= mMaxTimestamp || mFlags.Has(TestFlags::MaxIntervalElapsed)) || - now >= mSyncTimestamp)); -#else return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || now >= mSyncTimestamp))); -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } bool IsEngineRunScheduled() const { return mEngineRunScheduled; } - void SetEngineRunScheduled(bool aEngineRunScheduled) - { - mEngineRunScheduled = aEngineRunScheduled; -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - // If the engine becomes unscheduled, this means a run just took place so we reset the test flags - if (!mEngineRunScheduled) - { - mFlags.Set(TestFlags::MinIntervalElapsed, false); - mFlags.Set(TestFlags::MaxIntervalElapsed, false); - } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST - } + void SetEngineRunScheduled(bool aEngineRunScheduled) { mEngineRunScheduled = aEngineRunScheduled; } void SetIntervalTimeStamps(ReadHandler * aReadHandler) { @@ -146,9 +118,6 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver System::Clock::Timestamp GetSyncTimestamp() const { return mSyncTimestamp; } private: -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - BitFlags mFlags; -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST TimerDelegate * mTimerDelegate; ReadHandler * mReadHandler; ReportScheduler * mScheduler; @@ -180,22 +149,6 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); } #ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - void RunNodeCallbackForHandler(const ReadHandler * aReadHandler) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - node->TimerFired(); - } - void SetFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag, bool aValue) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - node->SetTestFlags(aFlag, aValue); - } - - bool CheckFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - return node->GetTestFlags(aFlag); - } Timestamp GetMinTimestampForHandler(const ReadHandler * aReadHandler) { ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 88571b040e866d..0c490f86002f73 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -67,11 +67,17 @@ chip::EndpointId kInvalidTestEndpointId = 3; chip::DataVersion kTestDataVersion1 = 3; chip::DataVersion kTestDataVersion2 = 5; +static chip::System::Clock::Internal::MockClock gMockClock; +static chip::System::Clock::ClockBase * gRealClock; + class TestContext : public chip::Test::AppContext { public: static int Initialize(void * context) { + gRealClock = &chip::System::SystemClock(); + chip::System::Clock::Internal::SetSystemClockForTesting(&gMockClock); + if (AppContext::Initialize(context) != SUCCESS) return FAILURE; @@ -97,6 +103,7 @@ class TestContext : public chip::Test::AppContext static int Finalize(void * context) { chip::app::EventManagement::DestroyEventManagement(); + chip::System::Clock::Internal::SetSystemClockForTesting(gRealClock); if (AppContext::Finalize(context) != SUCCESS) return FAILURE; @@ -1918,8 +1925,8 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 1; + readPrepareParams.mMaxIntervalCeilingSeconds = 2; printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); { @@ -1983,7 +1990,11 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a dirtyPath5.mAttributeId = 4; // Test report with 2 different path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mGotEventResponse = false; delegate.mNumAttributeResponse = 0; @@ -1995,15 +2006,15 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse == true); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 2 different path, and 1 same path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -2015,14 +2026,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, and one path is overlapped with another - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -2034,14 +2045,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, all are not overlapped, one path is not interested for current subscription - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -2053,18 +2064,13 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test empty report - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); - // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had - // elapsed as simulated above - reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); delegate.mGotReport = false; @@ -2117,7 +2123,7 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite readPrepareParams.mpAttributePathParamsList = nullptr; readPrepareParams.mAttributePathParamsListSize = 0; - readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 3600; printf("\nSend first subscribe request message with wildcard urgent event to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); @@ -2138,8 +2144,7 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - - System::Clock::Timestamp startTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers() == 2); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); @@ -2163,40 +2168,39 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite nonUrgentDelegate.mGotEventResponse = false; nonUrgentDelegate.mGotReport = false; - // wait for min interval 2 seconds (in test, we use 1.6 seconds considering the time variation), expect no event is + // wait for min interval 1 seconds (in test, we use 0.6 seconds considering the time variation), expect no event is // received, then wait for 0.8 seconds, then the urgent event would be sent out // currently DriveIOUntil will call `DriveIO` at least once, which means that if there is any CPU scheduling issues, // there's a chance 1.9s will already have elapsed by the time we get there, which will result in DriveIO being called when // it shouldn't. Better fix could happen inside DriveIOUntil, not sure the sideeffect there. - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(1600)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + + // Advance monotonic looping to allow events to trigger + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(600)); + ctx.GetIOContext().DriveIO(); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); - startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(800)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + // Advance monotonic timestamp for min interval to elapse + startTime = gMockClock.GetMonotonicTimestamp(); + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(800)); + + // Service Timer expired event + ctx.GetIOContext().DriveIO(); + + // Service Engine Run + ctx.GetIOContext().DriveIO(); + + // Service EventManagement event + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); // Since we just sent a report for our urgent subscription, the min interval of the urgent subcription should have been // updated NL_TEST_ASSERT(apSuite, - reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > - System::SystemClock().GetMonotonicTimestamp()); + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > gMockClock.GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); delegate.mGotEventResponse = false; @@ -2204,19 +2208,12 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite // should be in the past NL_TEST_ASSERT(apSuite, reportScheduler->GetMinTimestampForHandler(nonUrgentDelegate.mpReadHandler) < - System::SystemClock().GetMonotonicTimestamp()); + gMockClock.GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); - // Wait for the min interval timer to fire. - startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(2100)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(2100)); + ctx.GetIOContext().DriveIO(); // No reporting should have happened. NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -2377,7 +2374,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a concrete path dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2391,9 +2387,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); // We subscribed wildcard path twice, so we will receive two reports here. NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); @@ -2401,7 +2394,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a endpoint dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; @@ -2423,10 +2415,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); } while (last != delegate.mNumAttributeResponse); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); - NL_TEST_ASSERT(apSuite, delegate.mGotReport); // Mock endpoint3 has 13 attributes in total, and we subscribed twice. // And attribute 3/2/4 is a list with 6 elements and list chunking // is applied to it, but the way the packet boundaries fall we get two of @@ -2497,7 +2485,6 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi // Set a partial overlapped path dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2510,9 +2497,6 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2578,7 +2562,6 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit // Set a full overlapped path dirty and expect to receive one E2C3A1 { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2588,9 +2571,6 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2705,11 +2685,11 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); delegate.mpReadHandler = engine->ActiveHandlerAt(0); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); - // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had - // elapsed as simulated above - reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + + NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); ctx.DrainAndServiceIO(); @@ -2848,8 +2828,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2885,7 +2865,6 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu dirtyPath2.mAttributeId = 2; // Test report with 2 different path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2896,14 +2875,13 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + // Wait for max interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; ctx.ExpireSessionBobToAlice(); @@ -3221,8 +3199,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -3251,8 +3229,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -3324,8 +3303,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -3354,8 +3333,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -3425,7 +3405,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 5; delegate.mNumAttributeResponse = 0; @@ -3460,28 +3440,25 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; - // wait for min interval 2 seconds(in test, we use 1.9second considering the time variation), expect no event is received, + // wait for min interval 1 seconds(in test, we use 0.9second considering the time variation), expect no event is received, // then wait for 0.5 seconds, then all chunked dirty reports are sent out, which would not honor minInterval - System::Clock::Timestamp startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(1900)) - { - break; - } - ctx.GetIOContext().DriveIO(); - } + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(900)); + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 0); - startTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); + + // Increment in time is done by steps here to allow for multiple IO processing at the right time and allow the timer to be + // rescheduled accordingly while (true) { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(500)) + ctx.GetIOContext().DriveIO(); + if ((gMockClock.GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(500)) { break; } - ctx.GetIOContext().DriveIO(); + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(10)); } - ctx.DrainAndServiceIO(); } // Two chunked reports carry 4 attributeDataIB: 1 with a list of 3 items, // and then one per remaining item. @@ -4736,14 +4713,11 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * NL_TEST_ASSERT(apSuite, SessionHandle(*readHandler->GetSession()) == ctx.GetSessionAliceToBob()); // Test that we send reports as needed. - reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); - ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, - !reportScheduler->CheckFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); + NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); @@ -4753,7 +4727,6 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * // Test that if the session is defunct we don't send reports and clean // up properly. readHandler->GetSession()->MarkAsDefunct(); - reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); From e149350742d4cf0bba62d5d9706530718a22de1d Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:43:24 -0400 Subject: [PATCH 130/159] [Silabs] Add SIT ICD configurations to silabs lock example (#28474) * rename SED for ICD * Delete ICD subscription callback since default behavior is merged * Enable ICD default configuration for DL Update configs to support ICDs * Add ICDM attributes for SIT ICD config * generated files * update wordlist * update readme * update default config comments * add define block for ICD configs * fix esp * try to fix esp again * try to fix esp again --- .github/.wordlist.txt | 3 +- examples/light-switch-app/silabs/README.md | 4 +- examples/lighting-app/silabs/README.md | 4 +- examples/lock-app/esp32/main/CMakeLists.txt | 6 +- examples/lock-app/lock-common/lock-app.matter | 32 +++ examples/lock-app/lock-common/lock-app.zap | 254 ++++++++++++++++++ examples/lock-app/silabs/README.md | 4 +- examples/lock-app/silabs/openthread.gn | 2 +- examples/lock-app/silabs/openthread.gni | 14 + .../silabs/ICDSubscriptionCallback.cpp | 65 ----- .../platform/silabs/ICDSubscriptionCallback.h | 35 --- examples/platform/silabs/MatterConfig.cpp | 9 - examples/platform/silabs/MatterConfig.h | 8 - examples/platform/silabs/efr32/BUILD.gn | 22 -- .../efr32/project_include/OpenThreadConfig.h | 5 +- examples/pump-app/silabs/README.md | 4 +- examples/smoke-co-alarm-app/silabs/README.md | 4 +- examples/thermostat/silabs/README.md | 4 +- examples/window-app/silabs/README.md | 4 +- scripts/examples/gn_silabs_example.sh | 8 +- .../silabs/CHIPDevicePlatformConfig.h | 24 +- src/platform/silabs/CHIPPlatformConfig.h | 20 ++ third_party/silabs/efr32_sdk.gni | 36 ++- 23 files changed, 389 insertions(+), 182 deletions(-) delete mode 100644 examples/platform/silabs/ICDSubscriptionCallback.cpp delete mode 100644 examples/platform/silabs/ICDSubscriptionCallback.h diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2a1ead454e3ac4..0b195ba9a244e5 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -632,6 +632,7 @@ hci hciattach hciconfig hdlc +HEPA HKDF HMAC hoc @@ -641,7 +642,6 @@ HomePods hostapd hostname href -HEPA HTTPS HW hwadr @@ -652,6 +652,7 @@ IasWd iaszone ibb ICA +ICD iCloud ICMP IDF diff --git a/examples/light-switch-app/silabs/README.md b/examples/light-switch-app/silabs/README.md index 9ca79a80e2bd41..197a2ae7ea424c 100644 --- a/examples/light-switch-app/silabs/README.md +++ b/examples/light-switch-app/silabs/README.md @@ -131,9 +131,9 @@ Silicon Labs platform. ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lighting-app/silabs/README.md b/examples/lighting-app/silabs/README.md index 4d7c873aeff09a..4834ef56a9ac1c 100644 --- a/examples/lighting-app/silabs/README.md +++ b/examples/lighting-app/silabs/README.md @@ -123,9 +123,9 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index dc5fa500b03434..a6aded6af0065c 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -50,6 +50,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -74,6 +75,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" PRIV_REQUIRES bt chip QRCode nvs_flash driver) add_dependencies(${COMPONENT_LIB} app-codegen) @@ -162,6 +164,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -189,7 +192,8 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" PRIV_REQUIRES chip QRCode bt nvs_flash driver) add_dependencies(${COMPONENT_LIB} app-codegen) diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 1fda0929962ee8..61dbeb11e226af 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1662,6 +1662,30 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +server cluster IcdManagement = 70 { + bitmap Feature : BITMAP32 { + kCheckInProtocolSupport = 0x1; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive octet_string<16> key = 3; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeInterval = 0; + readonly attribute int32u activeModeInterval = 1; + readonly attribute int16u activeModeThreshold = 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; +} + /** An interface to a generic way to secure a door */ server cluster DoorLock = 257 { enum AlarmCodeEnum : ENUM8 { @@ -2541,6 +2565,14 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } + + server cluster IcdManagement { + callback attribute idleModeInterval default = 500; + callback attribute activeModeInterval default = 300; + callback attribute activeModeThreshold default = 300; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type doorlock = 10, version 1; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 3537aa2fb387b7..c097b1b20df20b 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -5322,6 +5322,260 @@ } ] }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "IdleModeInterval", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeInterval", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "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": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "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": "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 + } + ] + }, { "name": "Occupancy Sensing", "code": 1030, diff --git a/examples/lock-app/silabs/README.md b/examples/lock-app/silabs/README.md index 2d6cb8722a8dce..67fb889b41eb7e 100644 --- a/examples/lock-app/silabs/README.md +++ b/examples/lock-app/silabs/README.md @@ -130,10 +130,10 @@ Mac OS X $ rm -rf out/ ``` -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lock-app/silabs/openthread.gn b/examples/lock-app/silabs/openthread.gn index b05216fc9d7eae..27aa6c766a17e6 100644 --- a/examples/lock-app/silabs/openthread.gn +++ b/examples/lock-app/silabs/openthread.gn @@ -23,7 +23,7 @@ check_system_includes = true default_args = { target_cpu = "arm" target_os = "freertos" - chip_openthread_ftd = true + chip_openthread_ftd = false import("//openthread.gni") } diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 9d7fbf28634308..570d5e804f6c4d 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -24,3 +24,17 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 5000 # 5s Idle Intervals +sl_ot_active_interval_ms = 500 # 500ms Active Intervals + +# ICD Matter Configuration flags +sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval +sl_active_mode_interval_ms = 10000 # 10s Active Mode Interval +sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold diff --git a/examples/platform/silabs/ICDSubscriptionCallback.cpp b/examples/platform/silabs/ICDSubscriptionCallback.cpp deleted file mode 100644 index eba28968085d60..00000000000000 --- a/examples/platform/silabs/ICDSubscriptionCallback.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * 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. - * 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. - */ - -#include "ICDSubscriptionCallback.h" -#include - -CHIP_ERROR ICDSubscriptionCallback::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) -{ - using namespace chip::System::Clock; - - Seconds32 interval_s32 = std::chrono::duration_cast(CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL); - - if (interval_s32 > Seconds16::max()) - { - interval_s32 = Seconds16::max(); - } - uint32_t decidedMaxInterval = interval_s32.count(); - - uint16_t requestedMinInterval = 0; - uint16_t requestedMaxInterval = 0; - aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); - - // If requestedMinInterval is greater than IdleTimeInterval, select next wake up time as max interval - if (requestedMinInterval > decidedMaxInterval) - { - uint16_t ratio = requestedMinInterval / decidedMaxInterval; - if (requestedMinInterval % decidedMaxInterval) - { - ratio++; - } - - decidedMaxInterval *= ratio; - } - - // Verify that decidedMaxInterval is an acceptable value - if (decidedMaxInterval > Seconds16::max().count()) - { - decidedMaxInterval = Seconds16::max().count(); - } - - // Verify that the decidedMaxInterval respects MAX(SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, MaxIntervalCeiling) - uint16_t maximumMaxInterval = std::max(kSubscriptionMaxIntervalPublisherLimit, requestedMaxInterval); - if (decidedMaxInterval > maximumMaxInterval) - { - decidedMaxInterval = maximumMaxInterval; - } - - return aReadHandler.SetMaxReportingInterval(decidedMaxInterval); -} diff --git a/examples/platform/silabs/ICDSubscriptionCallback.h b/examples/platform/silabs/ICDSubscriptionCallback.h deleted file mode 100644 index c9f77e6df2a3c6..00000000000000 --- a/examples/platform/silabs/ICDSubscriptionCallback.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * 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. - * 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 - -/** - * @brief The goal of the ICDSubscriptionCallback class is to negotiate the max interval subscription to match the idle interval of - * the IC device. When a subscription is requested, the device will change the requested max interval to match its idle time - * interval through the OnSubscriptionRequested function. - */ -class ICDSubscriptionCallback : public chip::app::ReadHandler::ApplicationCallback -{ - /** - * @brief Function called when a subscription is requested. - * An ICD will use this function to negotiate the subscription max interval to match its idle time interval - */ - CHIP_ERROR OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) override; -}; diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 9c2253233f79e7..836e2a777c3699 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -58,10 +58,6 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include #include -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS -ICDSubscriptionCallback SilabsMatterConfig::mICDSubscriptionHandler; -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - #if CHIP_ENABLE_OPENTHREAD #include #include @@ -222,11 +218,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) // Init Matter Server and Start Event Loop err = chip::Server::GetInstance().Init(initParams); -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - // Register ICD subscription callback to match subscription max intervals to its idle time interval - chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&mICDSubscriptionHandler); -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); ReturnErrorOnFailure(err); diff --git a/examples/platform/silabs/MatterConfig.h b/examples/platform/silabs/MatterConfig.h index 4983abac4189b1..2c565f7caa7321 100644 --- a/examples/platform/silabs/MatterConfig.h +++ b/examples/platform/silabs/MatterConfig.h @@ -22,10 +22,6 @@ #include #include -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS -#include "ICDSubscriptionCallback.h" -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - class SilabsMatterConfig { public: @@ -36,8 +32,4 @@ class SilabsMatterConfig static void InitWiFi(void); static void ConnectivityEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); static void InitOTARequestorHandler(chip::System::Layer * systemLayer, void * appState); - -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - static ICDSubscriptionCallback mICDSubscriptionHandler; -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS }; diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 3a965cb01185b1..5bb628ad4f99e6 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -40,9 +40,6 @@ declare_args() { #default Wifi Password chip_default_wifi_psk = "" - # Use default handler to negotiate subscription max interval - chip_config_use_icd_subscription_callbacks = chip_enable_icd_server - # Enable TestEventTrigger in GeneralDiagnostics cluster silabs_test_event_trigger_enabled = false @@ -197,21 +194,6 @@ source_set("silabs-factory-data-provider") { ] } -config("ICD-subscription-callback-config") { - defines = [ "CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS=1" ] -} - -source_set("efr32-ICD-subscription-callback") { - sources = [ - "${silabs_common_plat_dir}/ICDSubscriptionCallback.cpp", - "${silabs_common_plat_dir}/ICDSubscriptionCallback.h", - ] - - public_deps = [ "${chip_root}/src/app:app" ] - - public_configs = [ ":ICD-subscription-callback-config" ] -} - config("efr32-common-config") { defines = [ "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_sec}" ] @@ -356,10 +338,6 @@ source_set("efr32-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (chip_config_use_icd_subscription_callbacks) { - public_deps += [ ":efr32-ICD-subscription-callback" ] - } - if (silabs_test_event_trigger_enabled) { sources += [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] diff --git a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h index 90ecfcbf712718..339142894f5e61 100644 --- a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h @@ -36,8 +36,7 @@ // Enable use of external heap allocator (calloc/free) for OpenThread. #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 -#if CHIP_CONFIG_ENABLE_ICD_SERVER - +#ifdef SL_ICD_ENABLED #define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 0 // In seconds @@ -46,7 +45,7 @@ // Timeout after 2 missed checkin or 4 mins if sleep interval is too short. #define OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT ((SL_MLE_TIMEOUT_s < 120) ? 240 : ((SL_MLE_TIMEOUT_s * 2) + 1)) -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER +#endif // SL_ICD_ENABLED /****Uncomment below section for OpenThread Debug logs*/ // #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG diff --git a/examples/pump-app/silabs/README.md b/examples/pump-app/silabs/README.md index 51306b7dd24ea4..f2fc51840965a8 100644 --- a/examples/pump-app/silabs/README.md +++ b/examples/pump-app/silabs/README.md @@ -122,9 +122,9 @@ Labs platform. $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index 2aec36eb0cb6c9..fc858977604897 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -126,10 +126,10 @@ Silicon Labs platform. $ rm -rf out/ ``` -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: diff --git a/examples/thermostat/silabs/README.md b/examples/thermostat/silabs/README.md index 6dc53dc6b2ca2d..cc76d71c1fc083 100644 --- a/examples/thermostat/silabs/README.md +++ b/examples/thermostat/silabs/README.md @@ -131,9 +131,9 @@ Silicon Labs platform. ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/efr32/ out/thermostat-app BRD4187C chip_build_libshell=true -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/window-app/silabs/README.md b/examples/window-app/silabs/README.md index 6152acb87a5503..a7555003b8dc93 100644 --- a/examples/window-app/silabs/README.md +++ b/examples/window-app/silabs/README.md @@ -120,9 +120,9 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index f966cebed9dd62..90adc9f9b9ed25 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -114,12 +114,12 @@ if [ "$#" == "0" ]; then siwx917_commissionable_data Build with the commissionable data given in DeviceConfig.h (only for SiWx917) Presets - --sed - enable sleepy end device, set thread mtd + --icd + enable ICD features, set thread mtd For minimum consumption, add --low-power --low-power disables all power consuming features for the most power efficient build - This flag is to be used with --sed + This flag is to be used with --icd --wifi build wifi example variant for given exansion board --additional_data_advertising @@ -181,7 +181,7 @@ else shift shift ;; - --sed) + --icd) optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " shift ;; diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index 7ea977bf54aa88..c51a923367ffaf 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -138,18 +138,6 @@ #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6 * 1024) #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE -#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL -#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_IDLE_INTERVAL) -#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL - -#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL -#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_ACTIVE_INTERVAL) -#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL - -#ifndef CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD -#define CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD chip::System::Clock::Milliseconds32(SL_ACTIVE_MODE_THRESHOLD) -#endif // CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD - #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE #if defined(EFR32MG21) #define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE (2 * 1024) @@ -167,3 +155,15 @@ #endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25 + +/* + ICD Configuration Defines +*/ + +#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_IDLE_INTERVAL) +#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL + +#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_ACTIVE_INTERVAL) +#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index ec36bc8f46eae2..710cb7c08d72c7 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -84,6 +84,26 @@ #define CHIP_CONFIG_MAX_FABRICS 5 // 4 fabrics + 1 for rotation slack #endif +#if CHIP_CONFIG_ENABLE_ICD_SERVER + +#ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL SL_IDLE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL SL_ACTIVE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD +#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD SL_ACTIVE_MODE_THRESHOLD +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD + +#ifndef CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC +#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC + +#endif + // ==================== FreeRTOS Configuration Overrides ==================== #ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK #define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 579cc1df7ede98..9c64cd951cd5d9 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -46,10 +46,16 @@ declare_args() { # Enable Segger System View use_system_view = false - # ICD Configuration flags - sl_ot_idle_interval_ms = 30000 # 30s Idle Intervals - sl_ot_active_interval_ms = 200 # 500ms Active Intervals - sl_active_mode_threshold = 1000 # 1s Active mode threshold + # ICD Openthread Configuration flags + sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals + sl_ot_active_interval_ms = 200 # 200ms Active Intervals + + # ICD Matter Configuration flags + sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval + sl_active_mode_interval_ms = 1000 # 1s Active Mode Interval + sl_active_mode_threshold_ms = 500 # 500ms Active Mode Threshold + sl_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric + sl_use_subscription_synching = false silabs_log_enabled = true @@ -329,11 +335,21 @@ template("efr32_sdk") { if (chip_enable_icd_server) { defines += [ - "SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}", - "SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}", - "SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold}", + "SL_ICD_ENABLED=1", + "SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold_ms}", + "SL_ACTIVE_MODE_INTERVAL=${sl_active_mode_interval_ms}", + "SL_IDLE_MODE_INTERVAL=${sl_idle_mode_interval_ms}", + "SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC=${sl_icd_supported_clients_per_fabric}", ] + if (defined(invoker.chip_enable_openthread) && + invoker.chip_enable_openthread) { + defines += [ + "SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}", + "SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}", + ] + } + if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) { defines += [ # Used for wifi devices to get packet details @@ -374,9 +390,15 @@ template("efr32_sdk") { "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", ] } + if (invoker.enable_dic) { _include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ] } + + if (sl_use_subscription_synching) { + defines += [ "CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED=1" ] + } + if (silabs_family == "efr32mg12") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Include", From 5b1a4a6fd674cb072f3d6ea1021ad3a4942b6bed Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:38:00 +0800 Subject: [PATCH 131/159] Add an example room air conditioner configuration to chef devices (#28485) * Add an example room air conditioner configuration to chef devices * Remove unuseful cluster in ep 0 * fix ci bug * Revert "fix ci bug" This reverts commit e31432e656aa76e25caefdccc2718362f42ffe7d. --- ...tnode_roomairconditioner_9cf3607804.matter | 1335 ++ ...rootnode_roomairconditioner_9cf3607804.zap | 11622 ++++++++++++++++ .../sample_app_util/matter_device_types.json | 3 +- 3 files changed, 12959 insertions(+), 1 deletion(-) create mode 100644 examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter create mode 100644 examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter new file mode 100644 index 00000000000000..4d2c91b819da14 --- /dev/null +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -0,0 +1,1335 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + 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 access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 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; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : ENUM8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : ENUM8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + + bitmap Feature : BITMAP32 { + kLighting = 0x1; + kDeadFront = 0x2; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly nosubscribe attribute boolean onOff = 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; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + 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 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. */ +server cluster AccessControl = 31 { + 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) 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. */ +server cluster BasicInformation = 40 { + 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 char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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 is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + 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; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + 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; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + 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 int8u scanMaxTimeSeconds = 2; + readonly attribute 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 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; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 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 RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** 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. */ +server cluster GeneralDiagnostics = 51 { + 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; + } + + 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 int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute 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; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u 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 salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + 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. */ +server cluster OperationalCredentials = 62 { + 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 attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + 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; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** An interface for configuring and controlling the functionality of a thermostat. */ +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum ThermostatControlSequence : ENUM8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum ThermostatRunningMode : ENUM8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + enum ThermostatSystemMode : ENUM8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeat = 5; + kPrecooling = 6; + kFanOnly = 7; + kDry = 8; + kSleep = 9; + } + + bitmap DayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap Feature : BITMAP32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap ModeForSequence : BITMAP8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + + readonly attribute nullable int16s localTemperature = 0; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute access(write: manage) int16s minCoolSetpointLimit = 23; + attribute access(write: manage) int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; + attribute access(write: manage) enum8 systemMode = 28; + 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 SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +/** An interface for controlling a fan in a heating/cooling system. */ +server cluster FanControl = 514 { + enum AirflowDirectionEnum : ENUM8 { + kForward = 0; + kReverse = 1; + } + + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; + } + + enum FanModeSequenceEnum : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; + } + + bitmap Feature : BITMAP32 { + kMultiSpeed = 0x1; + kAuto = 0x2; + kRocking = 0x4; + kWind = 0x8; + kStep = 0x10; + kAirflowDirection = 0x20; + } + + bitmap RockBitmap : BITMAP8 { + kRockLeftRight = 0x1; + kRockUpDown = 0x2; + kRockRound = 0x4; + } + + bitmap WindBitmap : BITMAP8 { + kSleepWind = 0x1; + kNaturalWind = 0x2; + } + + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 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; +} + +/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ +server cluster ThermostatUserInterfaceConfiguration = 516 { + attribute enum8 temperatureDisplayMode = 0; + attribute access(write: manage) enum8 keypadLockout = 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; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + 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 = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 114, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster Thermostat { + ram attribute localTemperature; + ram attribute absMinCoolSetpointLimit default = 1600; + ram attribute absMaxCoolSetpointLimit default = 3000; + ram attribute occupiedCoolingSetpoint default = 2600; + ram attribute minCoolSetpointLimit default = 1600; + ram attribute maxCoolSetpointLimit default = 3000; + ram attribute controlSequenceOfOperation default = 0x00; + ram attribute systemMode default = 0x03; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 6; + } + + server cluster FanControl { + ram attribute fanMode default = 0; + ram attribute fanModeSequence default = 2; + ram attribute percentSetting default = 0; + ram attribute percentCurrent default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster ThermostatUserInterfaceConfiguration { + ram attribute temperatureDisplayMode default = 0x01; + ram attribute keypadLockout default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } +} + + diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap new file mode 100644 index 00000000000000..e050bc914a2c61 --- /dev/null +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -0,0 +1,11622 @@ +{ + "featureLevel": 97, + "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": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "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": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "", + "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": "", + "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": "", + "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": "", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "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": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "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": "10", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "XX", + "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": "0", + "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": "", + "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": "0", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "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": "1", + "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": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "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": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "OTAUpdateStateEnum", + "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": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "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": "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": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "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": "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 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 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": "", + "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": "0", + "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": "0", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 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": "", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0001", + "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": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "0x0000000000000000", + "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": "1", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0", + "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": "0x0000", + "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": "0x0000000000000000", + "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": "", + "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": "0x0000000000000000", + "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": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0x0000", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "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": "3", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "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 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 43, + "code": 114, + "profileId": 259, + "label": "MA-room-airconditioner", + "name": "MA-room-airconditioner" + }, + "deviceTypes": [ + { + "id": 43, + "code": 114, + "profileId": 259, + "label": "MA-room-airconditioner", + "name": "MA-room-airconditioner" + } + ], + "deviceTypeRefs": [ + 43 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 114 + ], + "deviceTypeName": "MA-room-airconditioner", + "deviceTypeCode": 114, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "0", + "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": "0", + "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": "", + "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": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0", + "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": "0", + "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": "", + "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": "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "0x0001", + "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": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LocalTemperature", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OutdoorTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Occupancy", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinHeatSetpointLimit", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxHeatSetpointLimit", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinCoolSetpointLimit", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxCoolSetpointLimit", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PICoolingDemand", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIHeatingDemand", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HVACSystemTypeConfiguration", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalTemperatureCalibration", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedCoolingSetpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedHeatingSetpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedCoolingSetpoint", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedHeatingSetpoint", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinHeatSetpointLimit", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxHeatSetpointLimit", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCoolSetpointLimit", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCoolSetpointLimit", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinSetpointDeadBand", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "25", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemoteSensing", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ControlSequenceOfOperation", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "ThermostatControlSequence", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SystemMode", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningMode", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartOfWeek", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeeklyTransitions", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfDailyTransitions", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHold", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHoldDuration", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatProgrammingOperationMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningState", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSource", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeAmount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSourceTimestamp", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetback", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMin", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMax", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetback", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMin", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMax", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EmergencyHeatDelta", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACType", + "code": 64, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacity", + "code": 65, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACRefrigerantType", + "code": 66, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCompressorType", + "code": 67, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACErrorCode", + "code": 68, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACLouverPosition", + "code": 69, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCoilTemperature", + "code": 70, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacityformat", + "code": 71, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "FanMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "FanModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FanModeSequence", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "FanModeSequenceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentSetting", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentCurrent", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedMax", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSupport", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AirflowDirection", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "AirflowDirectionEnum", + "included": 0, + "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": "", + "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": "", + "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": "", + "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": "", + "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 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureDisplayMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "KeypadLockout", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScheduleProgrammingVisibility", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "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": "", + "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": "", + "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "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": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "", + "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 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "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": "0", + "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": "0", + "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": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index 9d14653828d7fc..53b418e1fc916d 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -42,5 +42,6 @@ "Mode Select": 39, "Air Purifier": 45, "Air Quality Sensor": 44, - "Robotic Vacuum Cleaner": 116 + "Robotic Vacuum Cleaner": 116, + "Room Air Conditioner": 114 } From 4084f129e18b8cd7d1f16d6118c94eb2af70e1ff Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 3 Aug 2023 11:42:02 -0400 Subject: [PATCH 132/159] [docker] Use gcc 10 in chip build (#28478) * Switch to gcc10 instead of gcc9 for chip build base * Bump up version file * Add -Dtests=false --------- Co-authored-by: Andrei Litvin --- .../docker/images/base/chip-build/Dockerfile | 14 ++++++++++++-- integrations/docker/images/base/chip-build/version | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/integrations/docker/images/base/chip-build/Dockerfile b/integrations/docker/images/base/chip-build/Dockerfile index 60f8cd9a1e015a..a3c4e23fb11210 100644 --- a/integrations/docker/images/base/chip-build/Dockerfile +++ b/integrations/docker/images/base/chip-build/Dockerfile @@ -41,7 +41,7 @@ RUN set -x \ clang-tidy \ curl \ flex \ - g++ \ + g++-10 \ git \ git-lfs \ gperf \ @@ -98,6 +98,16 @@ RUN set -x \ && git lfs install \ && : # last line +# Set gcc 10 as a default compiler to work with TSAN +RUN set -x \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 \ + && update-alternatives --set cc /usr/bin/gcc \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 \ + && update-alternatives --set c++ /usr/bin/g++ \ + && : # last line + # Cmake v3.23.1 ENV CMAKE_PLATFORM_VERSION= RUN case ${TARGETPLATFORM} in \ @@ -206,7 +216,7 @@ RUN case ${TARGETPLATFORM} in \ && export CCACHE_DISABLE=1 PYTHONDONTWRITEBYTECODE=1 \ && GLIB_VERSION=$(pkg-config --modversion glib-2.0) \ && git clone --depth=1 --branch=$GLIB_VERSION https://github.com/GNOME/glib.git \ - && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib \ + && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib -Dtests=false \ && DESTDIR=../build-image ninja -C glib/build install \ && mv glib/build-image/usr/local/lib/x86_64-linux-gnu/lib* $LD_LIBRARY_PATH_TSAN \ && rm -rf glib \ diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 6b5e738e874668..1776994de4304f 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -2 : Update esp-idf to v5.1 and remove few pinned package version +3 : Update to gcc-10 From 3bfcbc5752be630376314dec0372af8ec8745ae7 Mon Sep 17 00:00:00 2001 From: mpbreton-silabs <107145920+mpbreton-silabs@users.noreply.github.com> Date: Thu, 3 Aug 2023 11:48:07 -0400 Subject: [PATCH 133/159] Reduce type character size of SceneTableImpl types (#28448) --- .../clusters/scenes-server/SceneTableImpl.cpp | 20 ++++++------- .../clusters/scenes-server/SceneTableImpl.h | 28 ++++++++++++------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index 99d14e97095aab..3ff044e4bd506c 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -23,9 +23,7 @@ namespace chip { namespace scenes { CHIP_ERROR -DefaultSceneHandlerImpl::EncodeAttributeValueList( - const app::DataModel::List & aVlist, - MutableByteSpan & serializedBytes) +DefaultSceneHandlerImpl::EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes) { TLV::TLVWriter writer; writer.Init(serializedBytes); @@ -35,9 +33,8 @@ DefaultSceneHandlerImpl::EncodeAttributeValueList( return CHIP_NO_ERROR; } -CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList( - const ByteSpan & serializedBytes, - app::DataModel::DecodableList & aVlist) +CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist) { TLV::TLVReader reader; @@ -49,11 +46,10 @@ CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList( } CHIP_ERROR -DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, +DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, MutableByteSpan & serializedBytes) { - app::Clusters::Scenes::Structs::AttributeValuePair::Type aVPairs[kMaxAvPair]; + AttributeValuePairType aVPairs[kMaxAvPair]; size_t pairTotal = 0; // Verify size of list @@ -68,15 +64,15 @@ DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, pairCount++; } ReturnErrorOnFailure(pair_iterator.GetStatus()); - app::DataModel::List attributeValueList(aVPairs, pairCount); + List attributeValueList(aVPairs, pairCount); return EncodeAttributeValueList(attributeValueList, serializedBytes); } CHIP_ERROR DefaultSceneHandlerImpl::Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) + ExtensionFieldSetType & extensionFieldSet) { - app::DataModel::DecodableList attributeValueList; + DecodableList attributeValueList; ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index c7b7e18a2f7782..3be1dc43e48c26 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -39,6 +39,18 @@ using clusterId = chip::ClusterId; /// (Color control cluster), the Extension Field Set's value pair list TLV occupies 99 bytes of memory class DefaultSceneHandlerImpl : public scenes::SceneHandler { + + template + using List = chip::app::DataModel::List; + + template + using DecodableList = chip::app::DataModel::DecodableList; + + using AttributeValuePairType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePairDecodableType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType; + using ExtensionFieldSetDecodableType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType; + using ExtensionFieldSetType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type; + public: static constexpr uint8_t kMaxAvPair = CHIP_CONFIG_SCENES_MAX_AV_PAIRS_EFS; @@ -49,18 +61,15 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @param aVlist[in] Attribute value list to encode /// @param serializedBytes[out] Buffer to fill from the Attribute value list in a TLV format /// @return CHIP_ERROR - virtual CHIP_ERROR - EncodeAttributeValueList(const app::DataModel::List & aVlist, - MutableByteSpan & serializedBytes); + virtual CHIP_ERROR EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes); /// @brief Decodes an attribute value list from a TLV structure and ensure it fits the member pair buffer /// @param serializedBytes [in] Buffer to read from /// @param aVlist [out] Attribute value list to fill from the TLV structure. Only valid while the buffer backing /// serializedBytes exists and its contents are not modified. /// @return CHIP_ERROR - virtual CHIP_ERROR DecodeAttributeValueList( - const ByteSpan & serializedBytes, - app::DataModel::DecodableList & aVlist); + virtual CHIP_ERROR DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist); /// @brief From command AddScene, allows handler to filter through clusters in command to serialize only the supported ones. /// @param endpoint[in] Endpoint ID @@ -68,8 +77,7 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @param serializedBytes[out] Buffer to fill from the ExtensionFieldSet in command /// @return CHIP_NO_ERROR if successful, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not supported, CHIP_ERROR value /// otherwise - virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, + virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, MutableByteSpan & serializedBytes) override; /// @brief Simulates taking data from nvm and loading it in a command object if the cluster is supported by the endpoint @@ -79,10 +87,10 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @return CHIP_NO_ERROR if Extension Field Set was successfully populated, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not /// supported, specific CHIP_ERROR otherwise virtual CHIP_ERROR Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) override; + ExtensionFieldSetType & extensionFieldSet) override; private: - app::Clusters::Scenes::Structs::AttributeValuePair::Type mAVPairs[kMaxAvPair]; + AttributeValuePairType mAVPairs[kMaxAvPair]; }; /** From f0123d5283fbfcf5cf7ff31892b99661eca8ac76 Mon Sep 17 00:00:00 2001 From: Jaehoon-You <55170115+Jaehoon-You@users.noreply.github.com> Date: Fri, 4 Aug 2023 02:15:15 +0900 Subject: [PATCH 134/159] virtual-device-app: Add control module for virtual device's detail view (#28486) Signed-off-by: Jaehoon You Signed-off-by: Charles Kim --- .../android/App/feature/control/.gitignore | 0 .../App/feature/control/build.gradle.kts | 63 +++++++++++++++++++ .../App/feature/control/proguard-rules.pro | 21 +++++++ .../control/ExampleInstrumentedTest.kt | 22 +++++++ .../control/src/main/AndroidManifest.xml | 4 ++ .../feature/control/OnOffSwitchFragment.kt | 44 +++++++++++++ .../res/layout/fragment_on_off_switch.xml | 10 +++ .../main/res/navigation/control_nav_graph.xml | 18 ++++++ .../app/feature/control/ExampleUnitTest.kt | 16 +++++ .../android/App/settings.gradle.kts | 1 + 10 files changed, 199 insertions(+) create mode 100644 examples/virtual-device-app/android/App/feature/control/.gitignore create mode 100644 examples/virtual-device-app/android/App/feature/control/build.gradle.kts create mode 100644 examples/virtual-device-app/android/App/feature/control/proguard-rules.pro create mode 100644 examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt create mode 100644 examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml create mode 100644 examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt create mode 100644 examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml create mode 100644 examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml create mode 100644 examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt diff --git a/examples/virtual-device-app/android/App/feature/control/.gitignore b/examples/virtual-device-app/android/App/feature/control/.gitignore new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/examples/virtual-device-app/android/App/feature/control/build.gradle.kts b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts new file mode 100644 index 00000000000000..a9315f089d25ed --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts @@ -0,0 +1,63 @@ +import com.matter.buildsrc.Deps +import com.matter.buildsrc.Versions + +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") + id("com.google.dagger.hilt.android") + id("androidx.navigation.safeargs.kotlin") + kotlin("kapt") +} + +android { + namespace = "com.matter.virtual.device.app.feature.control" + compileSdk = Versions.compileSdkVersion + + defaultConfig { + minSdk = Versions.minSdkVersion + targetSdk = Versions.targetSdkVersion + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + viewBinding = true + dataBinding = true + } +} + +dependencies { + + implementation(Deps.AndroidX.core) + implementation(Deps.AndroidX.appcompat) + implementation(Deps.AndroidX.fragment) + + implementation(Deps.Navigation.fragment) + implementation(Deps.Navigation.ui) + + implementation(Deps.Dagger.hiltAndroid) + kapt(Deps.Dagger.hiltAndroidCompiler) + + implementation(Deps.timber) + + testImplementation(Deps.Test.junit) + androidTestImplementation(Deps.Test.junitExt) + androidTestImplementation(Deps.Test.espresso) +} \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro b/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro new file mode 100644 index 00000000000000..481bb434814107 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt b/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt new file mode 100644 index 00000000000000..026c8837f4b6ec --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt @@ -0,0 +1,22 @@ +package com.matter.virtual.device.app.feature.control + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.matter.virtual.device.app.feature.control.test", appContext.packageName) + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml new file mode 100644 index 00000000000000..a5918e68abcdde --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt new file mode 100644 index 00000000000000..5f89d07467ed5f --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt @@ -0,0 +1,44 @@ +package com.matter.virtual.device.app.feature.control + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.Fragment +import com.matter.virtual.device.app.feature.control.databinding.FragmentOnOffSwitchBinding +import dagger.hilt.android.AndroidEntryPoint +import timber.log.Timber + +@AndroidEntryPoint +class OnOffSwitchFragment : Fragment() { + + private lateinit var binding: FragmentOnOffSwitchBinding + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + Timber.d("onCreateView()") + binding = DataBindingUtil.inflate(inflater, R.layout.fragment_on_off_switch, container, false) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + Timber.d("onViewCreated()") + super.onViewCreated(view, savedInstanceState) + } + + override fun onResume() { + Timber.d("onResume()") + super.onResume() + } + + override fun onDestroy() { + Timber.d("onDestroy()") + super.onDestroy() + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml new file mode 100644 index 00000000000000..35d548cddf3cc8 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml new file mode 100644 index 00000000000000..def2abe07888fe --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt b/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt new file mode 100644 index 00000000000000..0aabc46fdb7aa0 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt @@ -0,0 +1,16 @@ +package com.matter.virtual.device.app.feature.control + +import org.junit.Assert.* +import org.junit.Test + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/examples/virtual-device-app/android/App/settings.gradle.kts b/examples/virtual-device-app/android/App/settings.gradle.kts index 0ae5b79223eba3..78cbf5ec8af59d 100644 --- a/examples/virtual-device-app/android/App/settings.gradle.kts +++ b/examples/virtual-device-app/android/App/settings.gradle.kts @@ -19,6 +19,7 @@ include(":core:data") include(":core:domain") include(":core:matter") include(":core:model") +include(":feature:control") include(":feature:main") include(":feature:qrcode") include(":feature:setup") From 03de226f9a39cd016159fc59a9777e69de612414 Mon Sep 17 00:00:00 2001 From: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:54:52 -0300 Subject: [PATCH 135/159] Add `__test__ = False` to hooks (#28477) --- scripts/py_matter_yamltests/matter_yamltests/hooks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index 6017dd68ad8f2f..b68ae35fd6ce94 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -18,6 +18,8 @@ class TestParserHooks(): + __test__ = False + def start(self, count: int): """ This method is called when the parser starts parsing a set of files. @@ -77,6 +79,8 @@ def test_success(self, duration: int): class TestRunnerHooks(): + __test__ = False + def start(self, count: int): """ This method is called when the runner starts running a set of tests. From 0246f98533c9e341e3cdc784e74b6bef6e2f8529 Mon Sep 17 00:00:00 2001 From: CuRahman <111998767+CuRahman@users.noreply.github.com> Date: Thu, 3 Aug 2023 13:55:35 -0400 Subject: [PATCH 136/159] Improve Silabs Matter shell functionality/stability (#28475) * Re-worked matter shell to allow for copy/paste, fix varying platform functionality, and increase stability * Update src/lib/shell/MainLoopSilabs.cpp Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> * Added further clarification in comments --------- Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> --- src/lib/shell/MainLoopSilabs.cpp | 89 +++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 29 deletions(-) diff --git a/src/lib/shell/MainLoopSilabs.cpp b/src/lib/shell/MainLoopSilabs.cpp index 2b755119fd8cd5..9cb5dfed0bd586 100644 --- a/src/lib/shell/MainLoopSilabs.cpp +++ b/src/lib/shell/MainLoopSilabs.cpp @@ -32,15 +32,19 @@ using chip::Shell::streamer_get; namespace { -constexpr const char kShellPrompt[] = "matterCli > "; +constexpr const char kShellPrompt[] = "matterCli> "; + +// To track carriage returns of Windows return cases of '\r\n' +bool haveCR = false; -// max > 1 void ReadLine(char * buffer, size_t max) { size_t line_sz = 0; + size_t read = 0; + bool done = false; // Read in characters until we get a line ending or EOT. - for (bool done = false; !done;) + while ((line_sz < max) && !done) { // Stop reading if we've run out of space in the buffer (still need to null-terminate). if (line_sz >= max - 1u) @@ -52,45 +56,72 @@ void ReadLine(char * buffer, size_t max) #ifdef BRD4325A // for 917 SoC board, we need to create a rx event before we wait for the shell activity // NotifyShellProcessFromISR() is called once the buffer is filled - if (streamer_read(streamer_get(), buffer + line_sz, 1) != 1) + while (streamer_read(streamer_get(), buffer + read, 1) == 1) { - continue; + // Count how many characters were read; usually one but could be copy/paste + read++; } #endif chip::WaitForShellActivity(); #ifndef BRD4325A // for EFR32 boards - if (streamer_read(streamer_get(), buffer + line_sz, 1) != 1) + while (streamer_read(streamer_get(), buffer + read, 1) == 1) { - continue; + // Count how many characters were read; usually one but could be copy/paste + read++; } #endif - - // Process character we just read. - switch (buffer[line_sz]) + // Process all characters that were read until we run out or exceed max char limit + while (line_sz < read && line_sz < max) { - case '\r': - case '\n': - streamer_printf(streamer_get(), "\r\n"); - buffer[line_sz] = '\0'; - line_sz++; - done = true; - break; - case 0x7F: - // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. - if (line_sz >= 1u) + switch (buffer[line_sz]) { - streamer_printf(streamer_get(), "\b \b"); - line_sz--; - } - break; - default: - if (isprint(static_cast(buffer[line_sz])) || buffer[line_sz] == '\t') - { - streamer_printf(streamer_get(), "%c", buffer[line_sz]); + case '\r': + // Mac OS return case of '\r' or beginning of Windows return case '\r\n' + buffer[line_sz] = '\0'; + streamer_printf(streamer_get(), "\r\n"); + haveCR = true; + done = true; line_sz++; + break; + case '\n': + // True if Windows return case of '\r\n' + if (haveCR) + { + // Do nothing - already taken care of with CR, return to loop and don't increment buffer + haveCR = false; + read--; + } + // Linux return case of just '\n' + else + { + buffer[line_sz] = '\0'; + streamer_printf(streamer_get(), "\r\n"); + done = true; + line_sz++; + } + break; + case 0x7F: + // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. + if (line_sz >= 1u) + { + // Delete backspace character + whatever came before it + streamer_printf(streamer_get(), "\b \b"); + line_sz--; + read--; + } + // Remove backspace character regardless + read--; + + break; + default: + if (isprint(static_cast(buffer[line_sz])) || buffer[line_sz] == '\t') + { + streamer_printf(streamer_get(), "%c", buffer[line_sz]); + line_sz++; + } + break; } - break; } } } From 21448e79ffd7569271588afeabbd447a76c52978 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:58:47 -0400 Subject: [PATCH 137/159] fix define (#28502) --- src/platform/silabs/CHIPPlatformConfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index 710cb7c08d72c7..a9105527fb7b15 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -84,7 +84,7 @@ #define CHIP_CONFIG_MAX_FABRICS 5 // 4 fabrics + 1 for rotation slack #endif -#if CHIP_CONFIG_ENABLE_ICD_SERVER +#ifdef SL_ICD_ENABLED #ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL #define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL SL_IDLE_MODE_INTERVAL @@ -102,7 +102,7 @@ #define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC #endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC -#endif +#endif // SL_ICD_ENABLED // ==================== FreeRTOS Configuration Overrides ==================== #ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK From 2946b42b5b4c69ca4f4c36847beb70a3f8d16ffc Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 3 Aug 2023 15:03:11 -0400 Subject: [PATCH 138/159] Update python logic for executing work in chip main loop (#28449) * Add python main loop work method * Fix typo and restyle * Fix typo * Code review updates * Comment update * Restyle --------- Co-authored-by: Andrei Litvin --- src/controller/python/BUILD.gn | 9 ++ .../python/chip/native/ChipMainLoopWork.h | 40 ++++++++ .../native/ChipMainLoopWork_StackLock.cpp | 44 +++++++++ .../native/ChipMainLoopWork_WorkSchedule.cpp | 75 +++++++++++++++ .../python/chip/tracing/TracingSetup.cpp | 92 +++++++++---------- 5 files changed, 210 insertions(+), 50 deletions(-) create mode 100644 src/controller/python/chip/native/ChipMainLoopWork.h create mode 100644 src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp create mode 100644 src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 375a65cf7becbc..4b84c63d5ff30d 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -20,6 +20,7 @@ import("$dir_pw_build/python.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/platform/python.gni") +import("${chip_root}/src/system/system.gni") import("${dir_pw_unit_test}/test.gni") if (current_os == "mac") { @@ -33,6 +34,7 @@ config("controller_wno_deprecate") { declare_args() { chip_python_version = "0.0" chip_python_package_prefix = "chip" + chip_python_supports_stack_locking = chip_system_config_locking != "none" } shared_library("ChipDeviceCtrl") { @@ -77,12 +79,19 @@ shared_library("ChipDeviceCtrl") { "chip/internal/ChipThreadWork.h", "chip/internal/CommissionerImpl.cpp", "chip/logging/LoggingRedirect.cpp", + "chip/native/ChipMainLoopWork.h", "chip/native/PyChipError.cpp", "chip/tracing/TracingSetup.cpp", "chip/utils/DeviceProxyUtils.cpp", ] defines += [ "CHIP_CONFIG_MAX_GROUPS_PER_FABRIC=50" ] defines += [ "CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC=50" ] + + if (chip_python_supports_stack_locking) { + sources += [ "chip/native/ChipMainLoopWork_StackLock.cpp" ] + } else { + sources += [ "chip/native/ChipMainLoopWork_WorkSchedule.cpp" ] + } } else { sources += [ "chip/server/Options.cpp", diff --git a/src/controller/python/chip/native/ChipMainLoopWork.h b/src/controller/python/chip/native/ChipMainLoopWork.h new file mode 100644 index 00000000000000..831badefd8855b --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork.h @@ -0,0 +1,40 @@ +/* + * + * 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. + * 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 + +namespace chip { +namespace MainLoopWork { + +/** + * Executes the given function in the CHIP main loop if one exists. + * + * Several implementations exist, however generally: + * + * - if already in the chip main loop (or main loop is not running), + * `f` gets executed right away + * - otherwise: + * - if chip stack locking is available, `f` is executed within the lock + * - if chip stack locking not available, this will schedule and WAIT + * for `f` to execute + */ +void ExecuteInMainLoop(std::function f); + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp b/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp new file mode 100644 index 00000000000000..f848a3bc2c32dc --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp @@ -0,0 +1,44 @@ +/* + * + * 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. + * 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. + */ +#include "ChipMainLoopWork.h" + +#include + +namespace chip { +namespace MainLoopWork { + +void ExecuteInMainLoop(std::function f) +{ + // NOTE: requires CHIP_STACK_LOCK_TRACKING_ENABLED to be available (which python builds + // generally have) to ensure chip stack locks are not deadlocking, since these + // functions do not know the actual state of the chip main loop. + // + // TODO: it may be a good assumption that python code asking for this will NOT run in + // chip main loop, however we try to be generic + if (chip::DeviceLayer::PlatformMgr().IsChipStackLockedByCurrentThread()) + { + f(); + return; + } + + chip::DeviceLayer::StackLock lock; + f(); +} + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp b/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp new file mode 100644 index 00000000000000..fec65a150c9396 --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp @@ -0,0 +1,75 @@ +/* + * + * 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. + * 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. + */ +#include "ChipMainLoopWork.h" + +#include +#include + +namespace chip { +namespace MainLoopWork { +namespace { + +struct WorkData +{ + std::function callback; + sem_t done; + + WorkData() { sem_init(&done, 0 /* shared */, 0); } + ~WorkData() { sem_destroy(&done); } + void Post() { sem_post(&done); } + void Wait() { sem_wait(&done); } +}; + +void PerformWork(intptr_t arg) +{ + WorkData * work = reinterpret_cast(arg); + + work->callback(); + work->Post(); +} + +} // namespace + +void ExecuteInMainLoop(std::function f) +{ + + // NOTE: requires CHIP_STACK_LOCK_TRACKING_ENABLED to be available (which python builds + // generally have) to ensure chip stack locks are not deadlocking, since these + // functions do not know the actual state of the chip main loop. + // + // TODO: it may be a good assumption that python code asking for this will NOT run in + // chip main loop, however we try to be generic + if (chip::DeviceLayer::PlatformMgr().IsChipStackLockedByCurrentThread()) + { + f(); + return; + } + + // NOTE: the code below assumes that chip main loop is running. + // if it does not, this will deadlock. + // + // IsChipStackLockedByCurrentThread is expected to be aware of main loop + // not running. + WorkData workdata; + workdata.callback = f; + chip::DeviceLayer::PlatformMgr().ScheduleWork(PerformWork, reinterpret_cast(&workdata)); + workdata.Wait(); +} + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/tracing/TracingSetup.cpp b/src/controller/python/chip/tracing/TracingSetup.cpp index d09a655b74c633..73e0633b3bf373 100644 --- a/src/controller/python/chip/tracing/TracingSetup.cpp +++ b/src/controller/python/chip/tracing/TracingSetup.cpp @@ -16,8 +16,8 @@ * limitations under the License. */ +#include #include -#include #include #include @@ -27,17 +27,6 @@ #include namespace { - -using chip::DeviceLayer::PlatformMgr; - -class ScopedStackLock -{ -public: - ScopedStackLock() { PlatformMgr().LockChipStack(); } - - ~ScopedStackLock() { PlatformMgr().UnlockChipStack(); } -}; - chip::Tracing::Json::JsonBackend gJsonBackend; chip::Tracing::Perfetto::FileTraceOutput gPerfettoFileOutput; @@ -47,58 +36,61 @@ chip::Tracing::Perfetto::PerfettoBackend gPerfettoBackend; extern "C" void pychip_tracing_start_json_log(const char * file_name) { - - ScopedStackLock lock; - - gJsonBackend.CloseFile(); // just in case, ensure no file output - chip::Tracing::Register(gJsonBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + gJsonBackend.CloseFile(); // just in case, ensure no file output + chip::Tracing::Register(gJsonBackend); + }); } extern "C" PyChipError pychip_tracing_start_json_file(const char * file_name) { - ScopedStackLock lock; - - CHIP_ERROR err = gJsonBackend.OpenFile(file_name); - if (err != CHIP_NO_ERROR) - { - return ToPyChipError(err); - } - chip::Tracing::Register(gJsonBackend); - return ToPyChipError(CHIP_NO_ERROR); + CHIP_ERROR err = CHIP_NO_ERROR; + + chip::MainLoopWork::ExecuteInMainLoop([&err, file_name] { + err = gJsonBackend.OpenFile(file_name); + if (err != CHIP_NO_ERROR) + { + return; + } + chip::Tracing::Register(gJsonBackend); + }); + + return ToPyChipError(err); } extern "C" void pychip_tracing_start_perfetto_system() { - ScopedStackLock lock; - - chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); - chip::Tracing::Perfetto::RegisterEventTrackingStorage(); - chip::Tracing::Register(gPerfettoBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + chip::Tracing::Register(gPerfettoBackend); + }); } extern "C" PyChipError pychip_tracing_start_perfetto_file(const char * file_name) { - ScopedStackLock lock; - - chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); - chip::Tracing::Perfetto::RegisterEventTrackingStorage(); - - CHIP_ERROR err = gPerfettoFileOutput.Open(file_name); - if (err != CHIP_NO_ERROR) - { - return ToPyChipError(err); - } - chip::Tracing::Register(gPerfettoBackend); - - return ToPyChipError(CHIP_NO_ERROR); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::MainLoopWork::ExecuteInMainLoop([&err, file_name] { + chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + + err = gPerfettoFileOutput.Open(file_name); + if (err != CHIP_NO_ERROR) + { + return; + } + chip::Tracing::Register(gPerfettoBackend); + }); + + return ToPyChipError(err); } extern "C" void pychip_tracing_stop() { - ScopedStackLock lock; - - chip::Tracing::Perfetto::FlushEventTrackingStorage(); - gPerfettoFileOutput.Close(); - chip::Tracing::Unregister(gPerfettoBackend); - chip::Tracing::Unregister(gJsonBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + chip::Tracing::Perfetto::FlushEventTrackingStorage(); + gPerfettoFileOutput.Close(); + chip::Tracing::Unregister(gPerfettoBackend); + chip::Tracing::Unregister(gJsonBackend); + }); } From b3d3685685589028150ab6607e8a1e25c5a3cb7b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 3 Aug 2023 16:17:36 -0400 Subject: [PATCH 139/159] Fix crash when an error happens during a BLE scan on darwin. (#28505) If we happened to do a BLE scan after doing a BLE connect, and then during the BLE scan one of two things happens: 1. Bluetooth is shut down (e.g. by just turning it off via the menubar). 2. The scan is a delegate-less scan and times out. then we would try to use the error handler that expects a SetUpCodePairer but without an actual non-null SetUpCodePairer to pass it. And then that would crash. The fix is to not call an error handler that we're not supposed to be calling; scans do not call the _connection_ error handler. --- src/platform/Darwin/BleConnectionDelegateImpl.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 8baed2da9be929..1d4e76618ac321 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -181,8 +181,10 @@ - (void)removePeripheralsFromCache; [ble stop]; ble = [[BleConnection alloc] initWithDelegate:delegate queue:bleWorkQueue]; - ble.onConnectionComplete = OnConnectionComplete; - ble.onConnectionError = OnConnectionError; + // Do _not_ set onConnectionComplete and onConnectionError + // here. The connection callbacks we have expect an appState + // that we do not have here, and in any case connection + // complete/error make no sense for a scan. ble.centralManager = [ble.centralManager initWithDelegate:ble queue:bleWorkQueue]; }); } From 27c3ff4af50b1ae0019d2bdf08352886372eaf10 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 3 Aug 2023 17:19:02 -0400 Subject: [PATCH 140/159] Fix RESOURCE_EXHAUSTED in KeySetWrite (#28456) * Fix RESOURCE_EXHAUSTED in KeySetWrite * Restyled by prettier-yaml --------- Co-authored-by: tennessee.carmelveilleux@gmail.com Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin --- .../group-key-mgmt-server.cpp | 6 + .../suites/TestGroupKeyManagementCluster.yaml | 19 ++ .../chip-tool/zap-generated/test/Commands.h | 238 +++++++++------ .../zap-generated/test/Commands.h | 288 ++++++++++-------- 4 files changed, 332 insertions(+), 219 deletions(-) diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 8edf8810f70c4b..9ff43d9a2ef834 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -500,6 +500,12 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // Set KeySet err = provider->SetKeySet(fabric->GetFabricIndex(), compressed_fabric_id, keyset); + if (CHIP_ERROR_INVALID_LIST_LENGTH == err) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::ResourceExhausted, "Not enough space left to add a new KeySet"); + return true; + } + if (CHIP_NO_ERROR == err) { ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite OK"); diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 034bdfd0a9a7b5..cc69380fa16796 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -538,6 +538,25 @@ tests: # Note: There's always an IPK keyset with index 0 contains: [0x01a1, 0x01a2, 0] + - label: "Write one keyset too many when already full" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x0222, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", + EpochStartTime0: 3110000, + EpochKey1: "\xe1\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef", + EpochStartTime1: 3110001, + EpochKey2: "\xf1\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 3110002, + } + response: + error: RESOURCE_EXHAUSTED + - label: "Write Group Keys (invalid)" command: "writeAttribute" attribute: "GroupKeyMap" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0ab94dafd7c628..d157cf5183082c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -113404,7 +113404,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 63, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 64, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113562,18 +113562,21 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113602,7 +113605,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113647,7 +113650,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113676,7 +113679,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113721,7 +113724,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113730,7 +113733,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113739,7 +113742,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113748,7 +113751,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113757,7 +113760,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113766,7 +113769,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113835,7 +113838,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113918,7 +113921,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113945,7 +113948,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114028,13 +114031,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114055,7 +114058,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114076,7 +114079,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -114085,7 +114088,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114140,10 +114143,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114156,14 +114159,11 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -114178,6 +114178,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114194,10 +114197,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114886,7 +114889,42 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 28: { - LogStep(28, "Write Group Keys (invalid)"); + LogStep(28, "Write one keyset too many when already full"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 546U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 3110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 3110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 3110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 29: { + LogStep(29, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114904,8 +114942,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 29: { - LogStep(29, "Write Group Keys (too many)"); + case 30: { + LogStep(30, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114975,8 +115013,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 30: { - LogStep(30, "Write Group Keys on alpha"); + case 31: { + LogStep(31, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115006,8 +115044,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 31: { - LogStep(31, "Write Group Keys on beta"); + case 32: { + LogStep(32, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115037,28 +115075,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, "Read Group Keys on alpha"); + case 33: { + LogStep(33, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read Group Keys on alpha without fabric filtering"); + case 34: { + LogStep(34, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 34: { - LogStep(34, "Read Group Keys on beta"); + case 35: { + LogStep(35, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Read Group Keys on beta without fabric filtering"); + case 36: { + LogStep(36, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 36: { - LogStep(36, "Add Group 1"); + case 37: { + LogStep(37, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -115067,8 +115105,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 37: { - LogStep(37, "Add Group 2"); + case 38: { + LogStep(38, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -115077,8 +115115,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 38: { - LogStep(38, "Add Group 3"); + case 39: { + LogStep(39, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -115087,8 +115125,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 39: { - LogStep(39, "Add Group 4"); + case 40: { + LogStep(40, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -115097,8 +115135,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "Add Group 5"); + case 41: { + LogStep(41, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -115107,28 +115145,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 41: { - LogStep(41, "Read GroupTable from alpha"); + case 42: { + LogStep(42, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Read GroupTable from alpha without fabric filtering"); + case 43: { + LogStep(43, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 43: { - LogStep(43, "Read GroupTable from beta"); + case 44: { + LogStep(44, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Read GroupTable from beta without fabric filtering"); + case 45: { + LogStep(45, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 45: { - LogStep(45, "KeySet Remove 1"); + case 46: { + LogStep(46, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -115137,8 +115175,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 46: { - LogStep(46, "KeySet Read (removed)"); + case 47: { + LogStep(47, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -115147,8 +115185,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 47: { - LogStep(47, "KeySet Read (not removed) CacheAndSync"); + case 48: { + LogStep(48, "KeySet Read (not removed) CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -115158,8 +115196,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 48: { - LogStep(48, "KeySet Read (not removed) TrustFirst"); + case 49: { + LogStep(49, "KeySet Read (not removed) TrustFirst"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -115169,8 +115207,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 49: { - LogStep(49, "Remove Group 1"); + case 50: { + LogStep(50, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -115179,13 +115217,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 50: { - LogStep(50, "Read GroupTable 2"); + case 51: { + LogStep(51, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Remove All"); + case 52: { + LogStep(52, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -115193,13 +115231,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 52: { - LogStep(52, "Read GroupTable 3"); + case 53: { + LogStep(53, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "KeySet Remove 2"); + case 54: { + LogStep(54, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -115208,8 +115246,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 54: { - LogStep(54, "KeySet Read (also removed)"); + case 55: { + LogStep(55, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -115218,8 +115256,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 55: { - LogStep(55, "KeySet Write 1"); + case 56: { + LogStep(56, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115253,8 +115291,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 56: { - LogStep(56, "KeySet Write 2 CacheAndSync"); + case 57: { + LogStep(57, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115289,8 +115327,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 57: { - LogStep(57, "KeySet Write 2 TrustFirst"); + case 58: { + LogStep(58, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115325,8 +115363,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 58: { - LogStep(58, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 59: { + LogStep(59, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115352,8 +115390,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 59: { - LogStep(59, "Remove keyset 1"); + case 60: { + LogStep(60, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -115362,13 +115400,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 60: { - LogStep(60, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 61: { + LogStep(61, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Remove keyset 2"); + case 62: { + LogStep(62, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -115377,8 +115415,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 62: { - LogStep(62, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 63: { + LogStep(63, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 5f4ad1bcda5777..e753c024da9f07 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -175828,160 +175828,164 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestKeySetReadAllIndices_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Write one keyset too many when already full\n"); + err = TestWriteOneKeysetTooManyWhenAlreadyFull_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Add Group 1\n"); - err = TestAddGroup1_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 2\n"); - err = TestAddGroup2_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 1\n"); + err = TestAddGroup1_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 3\n"); - err = TestAddGroup3_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 2\n"); + err = TestAddGroup2_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 4\n"); - err = TestAddGroup4_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 3\n"); + err = TestAddGroup3_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 5\n"); - err = TestAddGroup5_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 4\n"); + err = TestAddGroup4_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_41(); + ChipLogProgress(chipTool, " ***** Test Step 41 : Add Group 5\n"); + err = TestAddGroup5_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_42(); + ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_43(); + ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_44(); + ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : KeySet Remove 1\n"); - err = TestKeySetRemove1_45(); + ChipLogProgress(chipTool, " ***** Test Step 45 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_45(); break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_46(); + ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Remove 1\n"); + err = TestKeySetRemove1_46(); break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (not removed) CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedCacheAndSync_47(); + err = TestKeySetReadNotRemovedCacheAndSync_48(); break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) TrustFirst\n"); + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : KeySet Read (not removed) TrustFirst\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedTrustFirst_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Remove Group 1\n"); - err = TestRemoveGroup1_49(); + err = TestKeySetReadNotRemovedTrustFirst_49(); break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read GroupTable 2\n"); - err = TestReadGroupTable2_50(); + ChipLogProgress(chipTool, " ***** Test Step 50 : Remove Group 1\n"); + err = TestRemoveGroup1_50(); break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Remove All\n"); - err = TestRemoveAll_51(); + ChipLogProgress(chipTool, " ***** Test Step 51 : Read GroupTable 2\n"); + err = TestReadGroupTable2_51(); break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Read GroupTable 3\n"); - err = TestReadGroupTable3_52(); + ChipLogProgress(chipTool, " ***** Test Step 52 : Remove All\n"); + err = TestRemoveAll_52(); break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : KeySet Remove 2\n"); - err = TestKeySetRemove2_53(); + ChipLogProgress(chipTool, " ***** Test Step 53 : Read GroupTable 3\n"); + err = TestReadGroupTable3_53(); break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_54(); + ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Remove 2\n"); + err = TestKeySetRemove2_54(); break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Write 1\n"); - err = TestKeySetWrite1_55(); + ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_55(); break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 2 CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 1\n"); + err = TestKeySetWrite1_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2CacheAndSync_56(); + err = TestKeySetWrite2CacheAndSync_57(); break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 TrustFirst\n"); + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : KeySet Write 2 TrustFirst\n"); if (ShouldSkip("!GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2TrustFirst_57(); - break; - case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58(); + err = TestKeySetWrite2TrustFirst_58(); break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Remove keyset 1\n"); - err = TestRemoveKeyset1_59(); + ChipLogProgress(chipTool, " ***** Test Step 59 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59(); break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60(); + ChipLogProgress(chipTool, " ***** Test Step 60 : Remove keyset 1\n"); + err = TestRemoveKeyset1_60(); break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Remove keyset 2\n"); - err = TestRemoveKeyset2_61(); + ChipLogProgress(chipTool, " ***** Test Step 61 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61(); break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62(); + ChipLogProgress(chipTool, " ***** Test Step 62 : Remove keyset 2\n"); + err = TestRemoveKeyset2_62(); + break; + case 63: + ChipLogProgress(chipTool, " ***** Test Step 63 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63(); break; } @@ -176079,13 +176083,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176133,10 +176137,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176157,10 +176161,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176183,6 +176187,9 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 63: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176196,7 +176203,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 63; + const uint16_t mTestCount = 64; chip::Optional mNodeId; chip::Optional mCluster; @@ -177185,7 +177192,50 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_28() + CHIP_ERROR TestWriteOneKeysetTooManyWhenAlreadyFull_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:546U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:3110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:3110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:3110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Write one keyset too many when already full Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteGroupKeysInvalid_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177220,7 +177270,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_29() + CHIP_ERROR TestWriteGroupKeysTooMany_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177320,7 +177370,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_30() + CHIP_ERROR TestWriteGroupKeysOnAlpha_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177366,7 +177416,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_31() + CHIP_ERROR TestWriteGroupKeysOnBeta_32() { MTRBaseDevice * device = GetDevice("beta"); @@ -177412,7 +177462,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_32() + CHIP_ERROR TestReadGroupKeysOnAlpha_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177474,7 +177524,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_33() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177568,7 +177618,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_34() + CHIP_ERROR TestReadGroupKeysOnBeta_35() { MTRBaseDevice * device = GetDevice("beta"); @@ -177630,7 +177680,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_35() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_36() { MTRBaseDevice * device = GetDevice("beta"); @@ -177724,7 +177774,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_36() + CHIP_ERROR TestAddGroup1_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177756,7 +177806,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_37() + CHIP_ERROR TestAddGroup2_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177788,7 +177838,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_38() + CHIP_ERROR TestAddGroup3_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177820,7 +177870,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_39() + CHIP_ERROR TestAddGroup4_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177852,7 +177902,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_40() + CHIP_ERROR TestAddGroup5_41() { MTRBaseDevice * device = GetDevice("beta"); @@ -177884,7 +177934,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_41() + CHIP_ERROR TestReadGroupTableFromAlpha_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177973,7 +178023,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_42() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178077,7 +178127,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_43() + CHIP_ERROR TestReadGroupTableFromBeta_44() { MTRBaseDevice * device = GetDevice("beta"); @@ -178121,7 +178171,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_44() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_45() { MTRBaseDevice * device = GetDevice("beta"); @@ -178225,7 +178275,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_45() + CHIP_ERROR TestKeySetRemove1_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178248,7 +178298,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_46() + CHIP_ERROR TestKeySetReadRemoved_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178275,7 +178325,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_47() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178326,7 +178376,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_48() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_49() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178377,7 +178427,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_49() + CHIP_ERROR TestRemoveGroup1_50() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178408,7 +178458,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_50() + CHIP_ERROR TestReadGroupTable2_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178482,7 +178532,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_51() + CHIP_ERROR TestRemoveAll_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178500,7 +178550,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_52() + CHIP_ERROR TestReadGroupTable3_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178529,7 +178579,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_53() + CHIP_ERROR TestKeySetRemove2_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178552,7 +178602,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_54() + CHIP_ERROR TestKeySetReadAlsoRemoved_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178579,7 +178629,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_55() + CHIP_ERROR TestKeySetWrite1_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178619,7 +178669,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_56() + CHIP_ERROR TestKeySetWrite2CacheAndSync_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178659,7 +178709,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_57() + CHIP_ERROR TestKeySetWrite2TrustFirst_58() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178699,7 +178749,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178740,7 +178790,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_59() + CHIP_ERROR TestRemoveKeyset1_60() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178763,7 +178813,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178801,7 +178851,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_61() + CHIP_ERROR TestRemoveKeyset2_62() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178824,7 +178874,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63() { MTRBaseDevice * device = GetDevice("alpha"); From 45e971530d949b0e3e568686054bdec5f2186bc1 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 3 Aug 2023 22:18:23 -0400 Subject: [PATCH 141/159] Power source: Implementation of dynamic endpoint list setter (#28110) * Implementation of dynamic endpoint list setter Test: tested by adding a call to set endpoint list in all clusters with chip-tool. Also see TestPowerSourceCluster.cpp * Restyled by whitespace * Restyled by gn * Remove the define Some platforms run these tests, but don't have that define defined. Instead, just change the function name to test only. * Address review comments * free is being called, man, where's the leak? * Restyled by clang-format * Address some review comments. * Fix leak. * Deal with zero-length arrays. * shutdown -> clear * Use EncodeList for list * test fix. * types need to match --------- Co-authored-by: Restyled.io --- .../power-source-server.cpp | 181 +++++++++- .../power-source-server/power-source-server.h | 66 ++++ src/app/tests/BUILD.gn | 14 + src/app/tests/TestPowerSourceCluster.cpp | 339 ++++++++++++++++++ 4 files changed, 583 insertions(+), 17 deletions(-) create mode 100644 src/app/clusters/power-source-server/power-source-server.h create mode 100644 src/app/tests/TestPowerSourceCluster.cpp diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index a5163df93b2895..b09e25d7ad75b5 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -19,32 +19,82 @@ * @brief Implementation for the Power Source Server Cluster ***************************************************************************/ +#include "power-source-server.h" + #include #include -#include -#include #include #include #include +#include using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::PowerSource::Attributes; +using namespace app; +using namespace app::Clusters; +using namespace app::Clusters::PowerSource::Attributes; namespace { -class PowerSourceAttrAccess : public AttributeAccessInterface +struct PowerSourceClusterInfo { -public: - // Register on all endpoints. - PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + PowerSourceClusterInfo() : mClusterEndpoint(kInvalidEndpointId) {} + explicit PowerSourceClusterInfo(EndpointId powerClusterEndpointId) : mClusterEndpoint(powerClusterEndpointId) {} + void Clear() + { + mBuf.Free(); + mEndpointList = Span(); + } + CHIP_ERROR SetEndpointList(Span endpointList) + { + Clear(); + if (endpointList.size() == 0) + { + mEndpointList = Span(); + return CHIP_NO_ERROR; + } + mBuf.Calloc(endpointList.size()); + if (mBuf.Get() == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + memcpy(mBuf.Get(), endpointList.data(), endpointList.size() * sizeof(EndpointId)); + mEndpointList = Span(mBuf.Get(), endpointList.size()); + return CHIP_NO_ERROR; + } + EndpointId mClusterEndpoint = kInvalidEndpointId; + Platform::ScopedMemoryBuffer mBuf; + Span mEndpointList; }; +PowerSourceServer gPowerSourceServer; + PowerSourceAttrAccess gAttrAccess; +#ifdef ZCL_USING_POWER_SOURCE_CLUSTER_SERVER +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS \ + (EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) +#else +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT +#endif +static constexpr size_t kNumSupportedEndpoints = POWER_SERVER_NUM_SUPPORTED_ENDPOINTS; + +#if POWER_SERVER_NUM_SUPPORTED_ENDPOINTS > 0 +PowerSourceClusterInfo sPowerSourceClusterInfo[kNumSupportedEndpoints] = {}; +#else +PowerSourceClusterInfo * sPowerSourceClusterInfo = nullptr; +#endif + +} // anonymous namespace + +void MatterPowerSourcePluginServerInitCallback() +{ + registerAttributeAccessOverride(&gAttrAccess); +} + +namespace chip { +namespace app { +namespace Clusters { + CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -55,10 +105,25 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, // TODO: Needs implementation. err = aEncoder.EncodeEmptyList(); break; - case EndpointList::Id: - // TODO: Needs implementation and a way to allow dynamic endpoints to register endpoints - err = aEncoder.EncodeEmptyList(); + case EndpointList::Id: { + PowerSourceServer & server = PowerSourceServer::Instance(); + const Span * span = server.GetEndpointList(aPath.mEndpointId); + if (span == nullptr) + { + err = aEncoder.EncodeEmptyList(); + } + else + { + err = aEncoder.EncodeList([span](const auto & encoder) -> CHIP_ERROR { + for (auto id : *span) + { + ReturnErrorOnFailure(encoder.Encode(id)); + } + return CHIP_NO_ERROR; + }); + } break; + } default: break; } @@ -66,9 +131,91 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, return err; } -} // anonymous namespace +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess() +{ + return gAttrAccess; +} -void MatterPowerSourcePluginServerInitCallback() +PowerSourceServer & PowerSourceServer::Instance() { - registerAttributeAccessOverride(&gAttrAccess); + return gPowerSourceServer; +} + +// Caller does not need to retain the span past the call point as these are copied into an internal storage +CHIP_ERROR PowerSourceServer::SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList) +{ + // TODO: should check here that the power source cluster exists on the endpoint, but for now let's take the caller's word + // for it + + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx >= kNumSupportedEndpoints) + { + idx = NextEmptyIndex(); + } + if (idx >= kNumSupportedEndpoints) + { + return CHIP_ERROR_NO_MEMORY; + } + + sPowerSourceClusterInfo[idx].Clear(); + if (endpointList.size() == 0) + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(); + } + else + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(powerSourceClusterEndpoint); + sPowerSourceClusterInfo[idx].SetEndpointList(endpointList); + } + return CHIP_NO_ERROR; +} +const Span * PowerSourceServer::GetEndpointList(EndpointId powerSourceClusterEndpoint) const +{ + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx != std::numeric_limits::max()) + { + return &sPowerSourceClusterInfo[idx].mEndpointList; + } + return nullptr; +} + +void PowerSourceServer::Shutdown() +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + sPowerSourceClusterInfo[i].Clear(); + } +} + +size_t PowerSourceServer::GetNumSupportedEndpointLists() const +{ + return kNumSupportedEndpoints; } + +size_t PowerSourceServer::PowerSourceClusterEndpointIndex(EndpointId endpointId) const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == endpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +size_t PowerSourceServer::NextEmptyIndex() const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == kInvalidEndpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/power-source-server/power-source-server.h b/src/app/clusters/power-source-server/power-source-server.h new file mode 100644 index 00000000000000..a02f54cd5375c1 --- /dev/null +++ b/src/app/clusters/power-source-server/power-source-server.h @@ -0,0 +1,66 @@ +/* + * + * 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 +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +class PowerSourceServer +{ +public: + static PowerSourceServer & Instance(); + + // Caller does not need to retain the span past the call point as these are copied into an internal storage + CHIP_ERROR SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList); + CHIP_ERROR ClearEndpointList(EndpointId powerSourceClusterEndpoint) + { + return SetEndpointList(powerSourceClusterEndpoint, Span()); + } + // returns nullptr if there's not endpoint list set for this power source cluster endpoint id. + const Span * GetEndpointList(EndpointId powerSourceClusterEndpoint) const; + void Shutdown(); + size_t GetNumSupportedEndpointLists() const; + +private: + // Both return std::numeric_limits::max() for not found + size_t PowerSourceClusterEndpointIndex(EndpointId endpointId) const; + size_t NextEmptyIndex() const; +}; + +class PowerSourceAttrAccess : public AttributeAccessInterface +{ +public: + // Register on all endpoints. + PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess(); + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 90b4796fef3c47..9078702fb983e9 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -78,6 +78,18 @@ source_set("time-sync-data-provider-test-srcs") { ] } +source_set("power-cluster-test-srcs") { + sources = [ + "${chip_root}/src/app/clusters/power-source-server/power-source-server.cpp", + ] + + public_deps = [ + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/util/mock:mock_ember", + "${chip_root}/src/lib/core", + ] +} + source_set("scenes-table-test-srcs") { sources = [ "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSets.h", @@ -133,6 +145,7 @@ chip_test_suite("tests") { "TestNumericAttributeTraits.cpp", "TestOperationalStateDelegate.cpp", "TestPendingNotificationMap.cpp", + "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", "TestReportingEngine.cpp", "TestSceneTable.cpp", @@ -183,6 +196,7 @@ chip_test_suite("tests") { ":binding-test-srcs", ":operational-state-test-srcs", ":ota-requestor-test-srcs", + ":power-cluster-test-srcs", ":scenes-table-test-srcs", ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp new file mode 100644 index 00000000000000..e224571a45780d --- /dev/null +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -0,0 +1,339 @@ +/* + * + * Copyright (c) 2021 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. + */ + +#include "lib/support/CHIPMem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace chip { +namespace app { + +class TestPowerSourceCluster +{ +public: + static void TestEndpointList(nlTestSuite * apSuite, void * apContext); +}; + +std::vector ReadEndpointsThroughAttributeReader(nlTestSuite * apSuite, EndpointId endpoint) +{ + Clusters::PowerSourceAttrAccess & attrAccess = Clusters::TestOnlyGetPowerSourceAttrAccess(); + CHIP_ERROR err = CHIP_NO_ERROR; + + // Write TLV through the attribute access interface into the buffer + + // Buffer setup + constexpr size_t buflen = 128; + uint8_t buf[buflen]; + memset(buf, 0, buflen); + + // Create the builders + TLV::TLVWriter tlvWriter; + tlvWriter.Init(buf); + + AttributeReportIBs::Builder builder; + builder.Init(&tlvWriter); + + ConcreteAttributePath path(endpoint, Clusters::PowerSource::Id, Clusters::PowerSource::Attributes::EndpointList::Id); + ConcreteReadAttributePath readPath(path); + chip::DataVersion dataVersion(0); + AttributeValueEncoder aEncoder(builder, 0, path, dataVersion); + + err = attrAccess.Read(readPath, aEncoder); + + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // Read out from the buffer. This comes back as a nested struct + // AttributeReportIBs is a list of + // AttributeReportIB structs containing + // AttributeDataIB struct, which holds DataVersion (tag 0), AttributePathIB (tag 1) and Data (tag 2) + + TLV::TLVReader reader; + reader.Init(buf); + + TLV::TLVReader attrReportsReader; + TLV::TLVReader attrReportReader; + TLV::TLVReader attrDataReader; + + reader.Next(); + reader.OpenContainer(attrReportsReader); + + attrReportsReader.Next(); + attrReportsReader.OpenContainer(attrReportReader); + + attrReportReader.Next(); + attrReportReader.OpenContainer(attrDataReader); + + // We're now in the attribute data IB, skip to the desired tag, we want TagNum = 2 + attrDataReader.Next(); + for (int i = 0; i < 3 && !(IsContextTag(attrDataReader.GetTag()) && TagNumFromTag(attrDataReader.GetTag()) == 2); ++i) + { + attrDataReader.Next(); + } + NL_TEST_ASSERT(apSuite, IsContextTag(attrDataReader.GetTag())); + NL_TEST_ASSERT(apSuite, TagNumFromTag(attrDataReader.GetTag()) == 2); + + // OK, we should be in the right spot now, let's decode the list. + Clusters::PowerSource::Attributes::EndpointList::TypeInfo::DecodableType list; + err = list.Decode(attrDataReader); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + std::vector ret; + auto iter = list.begin(); + while (iter.Next()) + { + ret.push_back(iter.GetValue()); + } + return ret; +} + +void TestPowerSourceCluster::TestEndpointList(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + Clusters::PowerSourceServer & powerSourceServer = Clusters::PowerSourceServer::Instance(); + + // test that when we read everything we get an empty list as nothing has been set up yet + for (EndpointId i = 0; i < 11; ++i) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, i); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + + if (powerSourceServer.GetNumSupportedEndpointLists() < 2 || + powerSourceServer.GetNumSupportedEndpointLists() > std::numeric_limits::max()) + { + // Test assumes at least two endpoints. This runs on linux, not worthwhile to run on platforms with fewer endpoints. + return; + } + + // ***************** + // Test setting, getting and reading through the attribute access interface + // ***************** + EndpointId list0[5] = { 1, 2, 3, 4, 5 }; + EndpointId list1[10] = { 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + EndpointId listRest[1] = { 2 }; + + // we checked earlier that this fit + // This test just uses endpoints in order, so we want to set endpoints from + // 0 to numEndpoints - 1, and use this for overflow checking + EndpointId numEndpoints = static_cast(powerSourceServer.GetNumSupportedEndpointLists()); + + // Endpoint 0 - list of 5 + err = powerSourceServer.SetEndpointList(0, Span(list0)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + const Span * readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // Endpoint 1 - list of 10 + err = powerSourceServer.SetEndpointList(1, Span(list1)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints - list of 1 + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Check for out of memory error when setting too many endpoints + // ***************** + // pick a random endpoint number for the power cluster - it doesn't matter, we don't have space anyway. + err = powerSourceServer.SetEndpointList(55, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_NO_MEMORY); + + // ***************** + // Recheck getting and reading after OOM + // ***************** + // EP0 + readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // EP1 + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Test overwriting + // ***************** + // Overwrite a list + err = powerSourceServer.SetEndpointList(1, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + + // Ensure only the overwritten list was changed, using read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + if (ep == 0) + { + NL_TEST_ASSERT(apSuite, vec.size() == 5); + for (size_t j = 0; j < vec.size(); ++j) + { + NL_TEST_ASSERT(apSuite, vec[j] == list0[j]); + } + } + else if (ep == numEndpoints) + { + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + else + { + NL_TEST_ASSERT(apSuite, vec.size() == 1); + if (vec.size() == 1) + { + NL_TEST_ASSERT(apSuite, vec[0] == listRest[0]); + } + } + } + + // ***************** + // Test removal + // ***************** + for (EndpointId ep = 0; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_ASSERT(apSuite, readBack == nullptr); + } + + // Check through the read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } +} + +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestEndpointList", chip::app::TestPowerSourceCluster::TestEndpointList), + NL_TEST_SENTINEL() +}; +// clang-format on + +/** + * Set up the test suite. + */ +int TestPowerSourceClusterContext_Setup(void * inContext) +{ + CHIP_ERROR error = chip::Platform::MemoryInit(); + if (error != CHIP_NO_ERROR) + return FAILURE; + return SUCCESS; +} + +/** + * Tear down the test suite. + */ +int TestPowerSourceClusterContext_Teardown(void * inContext) +{ + chip::app::Clusters::PowerSourceServer::Instance().Shutdown(); + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +nlTestSuite sSuite = +{ + "TestPowerSourceCluster", + &sTests[0], + TestPowerSourceClusterContext_Setup, + TestPowerSourceClusterContext_Teardown +}; +// clang-format on + +} // namespace + +int TestPowerSource() +{ + nlTestRunner(&sSuite, nullptr); + return nlTestRunnerStats(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestPowerSource) From fc595053e66bd120c6b74d77630a408ea0740f7f Mon Sep 17 00:00:00 2001 From: crlonxp <88241281+crlonxp@users.noreply.github.com> Date: Fri, 4 Aug 2023 10:31:31 +0800 Subject: [PATCH 142/159] * Refine the laundry-washer-control server implementation and add laundry-washer-controls-delegate-impl (#28264) * * Refine the laundry-washer-control server implementation * Add laundry-washer-controls-delegate-impl Signed-off-by: Chin-Ran Lo * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Update src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h Co-authored-by: Boris Zbarsky * Update examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h Co-authored-by: Boris Zbarsky * * Remove the unused code and refine the comment Signed-off-by: Chin-Ran Lo * Update examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h Co-authored-by: Arkadiusz Bokowy * Restyled by clang-format --------- Signed-off-by: Chin-Ran Lo Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky Co-authored-by: Arkadiusz Bokowy --- .../laundry-washer-controls-delegate-impl.h | 55 ++++++++++++++++++ .../laundry-washer-controls-delegate-impl.cpp | 56 +++++++++++++++++++ examples/all-clusters-app/linux/BUILD.gn | 1 + .../all-clusters-app/linux/main-common.cpp | 8 +++ .../laundry-washer-controls-delegate.h | 17 +++--- .../laundry-washer-controls-server.cpp | 11 ++-- .../laundry-washer-controls-server.h | 38 +------------ 7 files changed, 136 insertions(+), 50 deletions(-) create mode 100644 examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h create mode 100644 examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h new file mode 100644 index 00000000000000..15a72482726ba0 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h @@ -0,0 +1,55 @@ +/* + * + * 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. + * 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 +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace LaundryWasherControls { + +/** + * The application delegate to statically define the options. + */ + +class LaundryWasherControlDelegate : public Delegate +{ + static const CharSpan spinSpeedsNameOptions[]; + static const NumberOfRinsesEnum supportRinsesOptions[]; + static LaundryWasherControlDelegate instance; + +public: + CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed); + CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse); + + LaundryWasherControlDelegate() = default; + ~LaundryWasherControlDelegate() = default; + + static inline LaundryWasherControlDelegate & getLaundryWasherControlDelegate() { return instance; } +}; + +} // namespace LaundryWasherControls +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp new file mode 100644 index 00000000000000..6c70ef98cb4736 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp @@ -0,0 +1,56 @@ +/* + * + * 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. + * 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. + */ +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters::LaundryWasherControls; + +const CharSpan LaundryWasherControlDelegate::spinSpeedsNameOptions[] = { + CharSpan::fromCharString("Off"), + CharSpan::fromCharString("Low"), + CharSpan::fromCharString("Medium"), + CharSpan::fromCharString("High"), +}; + +const NumberOfRinsesEnum LaundryWasherControlDelegate::supportRinsesOptions[] = { + NumberOfRinsesEnum::kNormal, + NumberOfRinsesEnum::kExtra, +}; + +LaundryWasherControlDelegate LaundryWasherControlDelegate::instance; + +CHIP_ERROR LaundryWasherControlDelegate::GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) +{ + if (index >= ArraySize(spinSpeedsNameOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(LaundryWasherControlDelegate::spinSpeedsNameOptions[index], spinSpeed); +} + +CHIP_ERROR LaundryWasherControlDelegate::GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) +{ + if (index >= ArraySize(supportRinsesOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + supportedRinse = LaundryWasherControlDelegate::supportRinsesOptions[index]; + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 72cd65ba55bc9e..766b482e5a4600 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -26,6 +26,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 727bddb955056b..71e86397ce7120 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -20,6 +20,7 @@ #include "WindowCoveringManager.h" #include "dishwasher-mode.h" #include "include/tv-callbacks.h" +#include "laundry-washer-controls-delegate-impl.h" #include "laundry-washer-mode.h" #include "rvc-modes.h" #include "tcc-mode.h" @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -205,6 +207,12 @@ void ApplicationShutdown() } } +using namespace chip::app::Clusters::LaundryWasherControls; +void emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) +{ + LaundryWasherControlsServer::SetDefaultDelegate(1, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); +} + void emberAfLowPowerClusterInitCallback(EndpointId endpoint) { ChipLogProgress(NotSpecified, "Setting LowPower default delegate to global manager"); diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h index 5529413a40cb88..c90923c775e5f3 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h @@ -35,20 +35,19 @@ class Delegate virtual ~Delegate() = default; /** - * Get the list of supported spin_speed list. - * Fills in the provided spin_speed at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin_speed. - * @param index The index of the spin_speed, with 0 representing the first one. - * @param spinSpeed The spin speed is filled. + * Get the spin speed string at the given index in the list. + * @param index The index of the spin speed, with 0 representing the first one. + * @param spinSpeed The MutableCharSpan to copy the string data into. On success, the callee must update + * the length to the length of the copied data. + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin speeds. */ virtual CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) = 0; /** - * Get the list of supported rinses list. - * Fills in the provided rinses at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of rinses. + * Get the supported rinses value at the given index in the list. * @param index The index of the supported rinses with 0 representing the first one. - * @param supportedRinse The supported rinse is filled. + * @param supportedRinse The supported rinse at the given index + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of supported rinses. */ virtual CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) = 0; }; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 76832e4c091eb8..f7cb0cd06d42a6 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -83,14 +83,13 @@ LaundryWasherControlsServer & LaundryWasherControlsServer::Instance() return sInstance; } -EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, - DataModel::Nullable newSpinSpeedCurrent) +EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent) { - DataModel::Nullable spinSpeedCurrent; - EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrent); - if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrent != newSpinSpeedCurrent)) + DataModel::Nullable spinSpeedCurrentNow; + EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrentNow); + if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrentNow != spinSpeedCurrent)) { - res = SpinSpeedCurrent::Set(endpointId, newSpinSpeedCurrent); + res = SpinSpeedCurrent::Set(endpointId, spinSpeedCurrent); } return res; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h index ac9b4ca0b7f209..f01069135b3e7c 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h @@ -42,51 +42,19 @@ class LaundryWasherControlsServer : public AttributeAccessInterface * Set the default delegate of laundry washer server at endpoint x * @param endpoint ID of the endpoint * @param delegate The default delegate at the endpoint - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. */ static void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate); /** - * Init the laundry washer server. - * @param void - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - // CHIP_ERROR Init(); - - /** - * @brief Set the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param newSpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure - */ - EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable newSpinSpeedCurrent); - - /** - * @brief Get the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param SpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure + * API to set/get the SpinSpeedCurrent attribute */ + EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent); EmberAfStatus GetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable & spinSpeedCurrent); /** - * @brief Set the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param newNumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure + * API to set/get the NumberOfRinses attribute */ EmberAfStatus SetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum newNumberOfRinses); - - /** - * @brief Get the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param NumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure - */ EmberAfStatus GetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum & numberOfRinses); private: From 6a5f7047b63df400fb9c2e41bcb7794fb880fdac Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 00:41:27 -0400 Subject: [PATCH 143/159] Fix selector for status update on CHIPToolDeviceControllerDelegate. (#28506) This did not get correctly updated in https://github.com/project-chip/connectedhomeip/pull/23665, so it was not getting the status update callbacks. --- .../commands/pairing/DeviceControllerDelegateBridge.h | 1 + .../commands/pairing/DeviceControllerDelegateBridge.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h index 334d2339536b15..04d65bdf565db0 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h @@ -28,6 +28,7 @@ @property MTRDeviceController * commissioner; @property MTRCommissioningParameters * params; +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status; - (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error; - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error; diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index b5166d8b707b54..b3476119c224b5 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -23,7 +23,7 @@ @interface CHIPToolDeviceControllerDelegate () @end @implementation CHIPToolDeviceControllerDelegate -- (void)onStatusUpdate:(MTRCommissioningStatus)status +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status { NSLog(@"Pairing Status Update: %tu", status); switch (status) { From 14bdc24baafbef23a4eeb3606483f13347160639 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:04:55 +0800 Subject: [PATCH 144/159] [app] Add option to disable read client (#28149) * app : Add option to disable Read Client * Restyled by gn * Format changes * Restyled by clang-format --------- Co-authored-by: Restyled.io --- config/esp32/components/chip/CMakeLists.txt | 4 ++++ config/esp32/components/chip/Kconfig | 6 ++++++ .../lighting-app/esp32/sdkconfig.defaults | 3 +++ examples/lighting-app/linux/args.gni | 2 ++ src/app/AttributePathParams.h | 2 ++ src/app/BUILD.gn | 14 +++++++++---- src/app/BufferedReadCallback.h | 2 ++ src/app/ClusterStateCache.h | 6 ++++-- src/app/InteractionModelEngine.cpp | 14 +++++++++++++ src/app/InteractionModelEngine.h | 8 ++++++++ src/app/ReadClient.h | 6 ++++-- src/app/common_flags.gni | 1 + src/controller/BUILD.gn | 20 ++++++++++++------- src/controller/CHIPCluster.h | 2 ++ src/controller/CHIPDeviceController.h | 12 +++++++++-- src/controller/ReadInteraction.h | 2 ++ src/controller/TypedReadCallback.h | 2 ++ 17 files changed, 89 insertions(+), 17 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index dfda6287ccb60e..6aa824bdcba6f3 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -124,6 +124,10 @@ if(CONFIG_DISABLE_IPV4) chip_gn_arg_append("chip_inet_config_enable_ipv4" "false") endif() +if(CONFIG_DISABLE_READ_CLIENT) + chip_gn_arg_append("chip_enable_read_client" "false") +endif() + if(CHIP_CODEGEN_PREGEN_DIR) chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"") endif() diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 99de12afa97e6e..5c871c2d043a30 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -108,6 +108,12 @@ menu "CHIP Core" help Matter spec is based on IPv6 communication only. Enabling this option may save some flash/ram. + config DISABLE_READ_CLIENT + bool "Disable read client in Interaction Model" + default n + help + Some device types don't require the read client. Enabling this option may save some flash/ram. + config BUILD_CHIP_TESTS bool "Build CHIP tests" default n diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 59c0af656896f0..f87a164ae41dd2 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -58,3 +58,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Disable Read Client +CONFIG_DISABLE_READ_CLIENT=y diff --git a/examples/lighting-app/linux/args.gni b/examples/lighting-app/linux/args.gni index d07e8c87cdb15c..4c205a5cef34a5 100644 --- a/examples/lighting-app/linux/args.gni +++ b/examples/lighting-app/linux/args.gni @@ -27,3 +27,5 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true + +chip_enable_read_client = false diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index adfc77cfe27830..b03153d71c2e2f 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -24,7 +24,9 @@ namespace chip { namespace app { +#if CHIP_CONFIG_ENABLE_READ_CLIENT class ReadClient; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT struct AttributePathParams { // diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 312a53aa6ee1a7..f5a167ca7e7aff 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -58,6 +58,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION=${chip_subscription_timeout_resumption}", "CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}", "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", + "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}", ] } @@ -76,7 +77,6 @@ static_library("app") { "AttributePathExpandIterator.h", "AttributePathParams.h", "AttributePersistenceProvider.h", - "BufferedReadCallback.cpp", "CASEClient.cpp", "CASEClient.h", "CASEClientPool.h", @@ -84,8 +84,6 @@ static_library("app") { "CASESessionManager.h", "ChunkedWriteCallback.cpp", "ChunkedWriteCallback.h", - "ClusterStateCache.cpp", - "ClusterStateCache.h", "CommandHandler.cpp", "CommandResponseHelper.h", "CommandSender.cpp", @@ -179,7 +177,6 @@ static_library("app") { "OperationalSessionSetup.cpp", "OperationalSessionSetup.h", "OperationalSessionSetupPool.h", - "ReadClient.cpp", "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", @@ -210,6 +207,15 @@ static_library("app") { ] } + if (chip_enable_read_client) { + sources += [ + "BufferedReadCallback.cpp", + "ClusterStateCache.cpp", + "ClusterStateCache.h", + "ReadClient.cpp", + ] + } + public_deps = [ ":app_config", "${chip_root}/src/access", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index 7779446f5a78fd..0616bb09958348 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -25,6 +25,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -133,3 +134,4 @@ class BufferedReadCallback : public ReadClient::Callback } // namespace app } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index e0d5d98d72a5ec..9e08abacde7768 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -33,6 +33,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { /* @@ -660,5 +661,6 @@ class ClusterStateCache : protected ReadClient::Callback const bool mCacheData = true; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 933b5a4c118254..23aaf9d85d03be 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -108,6 +108,7 @@ void InteractionModelEngine::Shutdown() mReadHandlers.ReleaseAll(); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Shut down any subscription clients that are still around. They won't be // able to work after this point anyway, since we're about to drop our refs // to them. @@ -134,6 +135,7 @@ void InteractionModelEngine::Shutdown() // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & writeHandler : mWriteHandlers) { @@ -254,6 +256,7 @@ uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const return numActive; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::ShutdownSubscription(const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId) { assertChipStackLockedByCurrentThread(); @@ -311,6 +314,7 @@ void InteractionModelEngine::ShutdownMatchingSubscriptions(const OptionalOnMessageReceived(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { @@ -849,6 +854,7 @@ Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContex return Status::InvalidSubscription; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::OnUnsolicitedMessageReceived(const PayloadHeader & payloadHeader, ExchangeDelegate *& newDelegate) @@ -892,10 +898,12 @@ CHIP_ERROR InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext status = OnReadInitialRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), ReadHandler::InteractionType::Subscribe); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::ReportData)) { status = OnUnsolicitedReportData(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(MsgType::TimedRequest)) { OnTimedRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), status); @@ -920,11 +928,13 @@ void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec) ChipLogValueExchange(ec)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::AddReadClient(ReadClient * apReadClient) { apReadClient->SetNextClient(mpActiveReadClientList); mpActiveReadClientList = apReadClient; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::TrimFabricForSubscriptions(FabricIndex aFabricIndex, bool aForceEvict) { @@ -1322,6 +1332,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::EnsureResourceForRea return Status::Success; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::RemoveReadClient(ReadClient * apReadClient) { ReadClient * pPrevListItem = nullptr; @@ -1380,6 +1391,7 @@ bool InteractionModelEngine::InActiveReadClientList(ReadClient * apReadClient) return false; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::HasConflictWriteRequests(const WriteHandler * apWriteHandler, const ConcreteAttributePath & aPath) { @@ -1738,6 +1750,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa return Loop::Continue; }); +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr; readClient = readClient->GetNextClient()) { if (readClient->GetFabricIndex() == fabricIndex) @@ -1746,6 +1759,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa readClient->Close(CHIP_ERROR_IM_FABRIC_DELETED, false); } } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & handler : mWriteHandlers) { diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 6236ff63efc5ec..57e4c66475757f 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -129,6 +129,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, */ CASESessionManager * GetCASESessionManager() const { return mpCASESessionMgr; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Tears down an active subscription. * @@ -151,6 +152,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Tears down all active subscriptions. */ void ShutdownAllSubscriptions(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT uint32_t GetNumActiveReadHandlers() const; uint32_t GetNumActiveReadHandlers(ReadHandler::InteractionType type) const; @@ -234,6 +236,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, void OnTimedWrite(TimedHandler * apTimedHandler, Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Add a read client to the internally tracked list of weak references. This list is used to * correctly dispatch unsolicited reports to the right matching handler by subscription ID. @@ -254,6 +257,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Return the number of active read clients being tracked by the engine. */ size_t GetNumActiveReadClients(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT /** * Returns the number of dirty subscriptions. Including the subscriptions that are generating reports. @@ -348,6 +352,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // void ShutdownActiveReads() { +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr;) { readClient->mpImEngine = nullptr; @@ -361,6 +366,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT mReadHandlers.ReleaseAll(); } @@ -599,7 +605,9 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, ObjectPool mReadHandlers; +#if CHIP_CONFIG_ENABLE_READ_CLIENT ReadClient * mpActiveReadClientList = nullptr; +#endif ReadHandler::ApplicationCallback * mpReadHandlerApplicationCallback = nullptr; diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 502e08eaa65a6a..71844713ff1461 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -49,6 +49,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -613,5 +614,6 @@ class ReadClient : public Messaging::ExchangeDelegate kReservedSizeForEndOfContainer + kReservedSizeForIMRevision + kReservedSizeForEndOfContainer; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index 1d4309810d57e8..5e5a82afd7d5e1 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -15,4 +15,5 @@ declare_args() { # Temporary flag for interaction model and echo protocols, set it to true to enable chip_app_use_echo = false + chip_enable_read_client = true } diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index 3172c1815a1271..9fcbca7ea451e2 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -13,6 +13,8 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/lib/lib.gni") import("${chip_root}/src/platform/device.gni") import("${chip_root}/src/platform/python.gni") @@ -21,15 +23,13 @@ static_library("controller") { sources = [ "CHIPCluster.h" ] - if (chip_controller) { + if (chip_controller && chip_build_controller) { sources += [ "AbstractDnssdDiscoveryController.cpp", "AutoCommissioner.cpp", "AutoCommissioner.h", "CHIPCommissionableNodeController.cpp", "CHIPCommissionableNodeController.h", - "CHIPDeviceController.cpp", - "CHIPDeviceController.h", "CHIPDeviceControllerFactory.cpp", "CHIPDeviceControllerFactory.h", "CommissioneeDeviceProxy.cpp", @@ -37,10 +37,6 @@ static_library("controller") { "CommissionerDiscoveryController.cpp", "CommissionerDiscoveryController.h", "CommissioningDelegate.cpp", - "CommissioningWindowOpener.cpp", - "CommissioningWindowOpener.h", - "CurrentFabricRemover.cpp", - "CurrentFabricRemover.h", "DeviceDiscoveryDelegate.h", "DevicePairingDelegate.h", "EmptyDataModelHandler.cpp", @@ -49,6 +45,16 @@ static_library("controller") { "SetUpCodePairer.cpp", "SetUpCodePairer.h", ] + if (chip_enable_read_client) { + sources += [ + "CHIPDeviceController.cpp", + "CHIPDeviceController.h", + "CommissioningWindowOpener.cpp", + "CommissioningWindowOpener.h", + "CurrentFabricRemover.cpp", + "CurrentFabricRemover.h", + ] + } } cflags = [ "-Wconversion" ] diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index ab37a52ece8e24..4324092871424b 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -221,6 +221,7 @@ class DLL_EXPORT ClusterBase return WriteAttribute(requestData, context, successCb, failureCb, NullOptional, doneCb, aDataVersion); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Read an attribute and get a type-safe callback with the attribute value. */ @@ -399,6 +400,7 @@ class DLL_EXPORT ClusterBase onSubscriptionEstablishedCb, onResubscriptionAttemptCb, aKeepPreviousSubscriptions, aIsUrgentEvent); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT protected: Messaging::ExchangeManager & mExchangeManager; diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9fd8d1cfe7ee03..2d85fdce3068e4 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -384,8 +384,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable public Protocols::UserDirectedCommissioning::InstanceNameResolver, #endif - public SessionEstablishmentDelegate, - public app::ClusterStateCache::Callback +#if CHIP_CONFIG_ENABLE_READ_CLIENT + public app::ClusterStateCache::Callback, +#endif + public SessionEstablishmentDelegate { public: DeviceCommissioner(); @@ -683,8 +685,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void RegisterPairingDelegate(DevicePairingDelegate * pairingDelegate) { mPairingDelegate = pairingDelegate; } DevicePairingDelegate * GetPairingDelegate() const { return mPairingDelegate; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT // ClusterStateCache::Callback impl void OnDone(app::ReadClient *) override; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. @@ -915,11 +919,13 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void SendCommissioningReadRequest(DeviceProxy * proxy, Optional timeout, app::AttributePathParams * readPaths, size_t readPathsSize); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Parsers for the two different read clients void ParseCommissioningInfo(); void ParseFabrics(); // Called by ParseCommissioningInfo void ParseTimeSyncInfo(ReadCommissioningInfo & info); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT static CHIP_ERROR ConvertFromOperationalCertStatus(chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum err); @@ -959,8 +965,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, nullptr; // Commissioning delegate that issued the PerformCommissioningStep command CompletionStatus commissioningCompletionStatus; +#if CHIP_CONFIG_ENABLE_READ_CLIENT Platform::UniquePtr mAttributeCache; Platform::UniquePtr mReadClient; +#endif Credentials::AttestationVerificationResult mAttestationResult; Platform::UniquePtr mAttestationDeviceInfo; Credentials::DeviceAttestationVerifier * mDeviceAttestationVerifier = nullptr; diff --git a/src/controller/ReadInteraction.h b/src/controller/ReadInteraction.h index 88c1f902121de6..34491dd9edfebf 100644 --- a/src/controller/ReadInteraction.h +++ b/src/controller/ReadInteraction.h @@ -23,6 +23,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { namespace detail { @@ -328,3 +329,4 @@ CHIP_ERROR SubscribeEvent( } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index aa0e4394ad4e5e..f35a39670ee8e7 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -24,6 +24,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { @@ -290,3 +291,4 @@ class TypedReadEventCallback final : public app::ReadClient::Callback } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT From 9c7b1c5425af520991f8a4289c917a103ca0f6d6 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 3 Aug 2023 22:46:15 -0700 Subject: [PATCH 145/159] enable android platform configuration (#28451) --- src/platform/android/SystemPlatformConfig.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/android/SystemPlatformConfig.h b/src/platform/android/SystemPlatformConfig.h index 1c601906812edc..085d1e58f96e0b 100644 --- a/src/platform/android/SystemPlatformConfig.h +++ b/src/platform/android/SystemPlatformConfig.h @@ -41,4 +41,5 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= From 5534c6d3fcf98d750b696704c9952c7b8b60511b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 02:56:10 -0400 Subject: [PATCH 146/159] Skip building python modules as part of Matter.framework build. (#28514) We don't need them there, but also they unconditionally pull in perfetto bits, which is also undesirable. --- src/darwin/Framework/chip_xcode_build_connector.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 888ae55c786e59..2127313659614c 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -96,6 +96,7 @@ declare -a args=( 'chip_build_tools=false' 'chip_build_tests=false' 'chip_enable_wifi=false' + 'chip_enable_python_modules=false' 'chip_log_message_max_size=4096' # might as well allow nice long log messages 'chip_disable_platform_kvs=true' 'enable_fuzz_test_targets=false' From a27f6a9f4ad955cc5c0b6a74b2136cf2d82899f1 Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Fri, 4 Aug 2023 16:19:43 +0800 Subject: [PATCH 147/159] [mode-base-cluster]fix: build error while not enable On/Off cluster server (#28388) * fix build error while not enable onOff cluster server * fix include file bug --- src/app/clusters/mode-base-server/mode-base-server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index d2e56f172627dc..4495e728fc7ecb 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include using namespace chip; @@ -193,7 +194,7 @@ CHIP_ERROR Instance::Init() } } } - +#ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a // value of On (turn on at power up), then the CurrentMode attribute SHALL be set to the OnMode attribute @@ -227,7 +228,7 @@ CHIP_ERROR Instance::Init() } } } - +#endif // EMBER_AF_PLUGIN_ON_OFF_SERVER return CHIP_NO_ERROR; } From 32ed9c540553df77b6a402517ac6ac1eb0f9195d Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 4 Aug 2023 21:40:56 +0800 Subject: [PATCH 148/159] [Ameba] Update docker image (#28441) * Update Dockerfile * Update version --- integrations/docker/images/base/chip-build/version | 2 +- integrations/docker/images/stage-2/chip-build-ameba/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 1776994de4304f..17e40cdd356a3d 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -3 : Update to gcc-10 +4 : [Ameba] Upgrade to c++17 diff --git a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile index 07f8118b5f004d..af659cb7a08e0c 100644 --- a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2023_06_28 +ARG TAG_NAME=ameba_update_2023_08_01 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ From 0e005ba0827391bf29a199aa9c21bf07ad022f7a Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:34:17 +0300 Subject: [PATCH 149/159] [K32W0] Use west tool to get SDK (#28431) Signed-off-by: Marius Tache --- integrations/docker/images/base/chip-build/version | 2 +- .../images/stage-2/chip-build-k32w/Dockerfile | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 17e40cdd356a3d..dfab429dbd9f0a 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -4 : [Ameba] Upgrade to c++17 +5 : Use west to download the K32W0 SDK diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index 42e1dde62a56d9..dd629a9824c6ee 100644 --- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -11,15 +11,19 @@ RUN set -x \ && : # last line WORKDIR /opt/sdk -# Setup the K32W SDK + RUN set -x \ - && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip \ - && unzip SDK_2_6_11_K32W061DK6.zip \ - && rm -rf SDK_2_6_11_K32W061DK6.zip \ + && python3 -m pip install -U --no-cache-dir west==1.0.0 \ + && west init -m https://github.com/nxp-mcuxpresso/mcux-sdk --mr "release/2.6.x_k32w0" \ + && west update \ + && chmod +x core/tools/imagetool/sign_images.sh \ + && ln -sf ../rtos core \ + && ln -sf ../middleware core \ + && cp -R examples/* core/boards && rm -rf examples \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/sdk/ /opt/sdk/ -ENV NXP_K32W0_SDK_ROOT=/opt/sdk +ENV NXP_K32W0_SDK_ROOT=/opt/sdk/core From 6c95a745757ce63889c273b0470334a105a132d8 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 4 Aug 2023 22:40:10 +0800 Subject: [PATCH 150/159] [Ameba] Upgrade cpp17 (#28438) * fix cmake workaround for ameba - upgrade pigweed app to c++17 * Update Dockerfile * Update version * Move to chip-build-ameba version 4 instead of 1, to suppor c++17 --------- Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin --- .github/workflows/examples-ameba.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 ++-- examples/all-clusters-minimal-app/ameba/README.md | 4 ++-- examples/light-switch-app/ameba/README.md | 4 ++-- examples/lighting-app/ameba/README.md | 4 ++-- examples/ota-requestor-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/chip_main.cmake | 4 ++-- src/app/chip_data_model.cmake | 7 ------- 9 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index c4c164f880cd0c..5ccb16bfab073a 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:1 + image: ghcr.io/project-chip/chip-build-ameba:4 options: --user root steps: diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index d02447ebfb6330..cb07a50deba7e1 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 21d7c94f4859f0..f4ae242ea0aa05 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 ``` - Setup build environment: diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 03ee7caacb0447..8c45c2ee225d0c 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index bd764b23558643..8297c2a3bb2dbc 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index cb175df24d9116..534db2f8b18b62 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 77ea1e196429f7..4f6ed1830b6cce 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index e18ecb62bdf48c..1f0db465a6878b 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -100,9 +100,9 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++17 + -std=c++17 -fno-rtti - -fno-use-cxa-atexit + -fno-use-cxa-atexit ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 8f0f7f82301cfc..63ebf1b4ef1eee 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -16,13 +16,6 @@ set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) -if (NOT CHIP_ROOT) - # TODO: these are WORKAROUNDS and should be removed - if(DEFINED ameba_matter_root) - SET(CHIP_ROOT "${ameba_matter_root}") - endif() -endif() - include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") # Configure ${APP_TARGET} with source files associated with ${CLUSTER} cluster From 7af8b1b041f224da25c99c92ce22dd2f71ad6f0b Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 4 Aug 2023 11:59:08 -0400 Subject: [PATCH 151/159] Remove ICDM cluster for lighting app (#28522) --- .../data_model/lighting-thread-app.matter | 61 ------------------ .../silabs/data_model/lighting-thread-app.zap | 62 ++++++++++++++++--- 2 files changed, 55 insertions(+), 68 deletions(-) diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 89681a67ce9e42..2745e2fd4d5092 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1914,53 +1914,6 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } -/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { - bitmap Feature : BITMAP32 { - kCheckInProtocolSupport = 0x1; - } - - fabric_scoped struct MonitoringRegistrationStruct { - fabric_sensitive node_id checkInNodeID = 1; - fabric_sensitive int64u monitoredSubject = 2; - fabric_sensitive octet_string<16> key = 3; - fabric_idx fabricIndex = 254; - } - - readonly attribute int32u idleModeInterval = 0; - readonly attribute int32u activeModeInterval = 1; - readonly attribute int16u activeModeThreshold = 2; - readonly attribute access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; - readonly attribute access(read: administer) int32u ICDCounter = 4; - readonly attribute int16u clientsSupportedPerFabric = 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 RegisterClientRequest { - node_id checkInNodeID = 0; - INT64U monitoredSubject = 1; - OCTET_STRING<16> key = 2; - optional OCTET_STRING<16> verificationKey = 3; - } - - request struct UnregisterClientRequest { - node_id checkInNodeID = 0; - optional OCTET_STRING<16> verificationKey = 1; - } - - response struct RegisterClientResponse = 1 { - INT32U ICDCounter = 0; - } - - fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; - fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ server cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { @@ -2463,20 +2416,6 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } - - server cluster IcdManagement { - callback attribute idleModeInterval default = 500; - callback attribute activeModeInterval default = 300; - callback attribute activeModeThreshold default = 300; - callback attribute registeredClients; - callback attribute ICDCounter; - callback attribute clientsSupportedPerFabric default = 1; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; - } } endpoint 1 { device type dimmablelight = 257, version 1; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 978b68609f1e6d..77ce7f1f3b2077 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5555,7 +5581,7 @@ "mfgCode": null, "define": "ICD_MANAGEMENT_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "RegisterClientResponse", @@ -5764,7 +5790,33 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -9103,18 +9155,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } ], "log": [] From 104861d477286f4f5be85f44670d4de49b39a246 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:05:11 -0400 Subject: [PATCH 152/159] [Silabs] Rename SED build target to ICD for python scripts (#28504) * rename sed to icd in build targets * update txt tagets * rename targets --- .github/workflows/examples-efr32.yaml | 4 ++-- scripts/build/build/targets.py | 4 ++-- scripts/build/builders/efr32.py | 4 ++-- scripts/build/testdata/all_targets_linux_x64.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 685a641e5a552a..b0e3eef9b3cbe7 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -67,7 +67,7 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target efr32-brd4187c-thermostat-openthread_mtd \ - --target efr32-brd4187c-switch-sed-shell-use_ot_coap_lib \ + --target efr32-brd4187c-switch-shell-use_ot_coap_lib \ --target efr32-brd4187c-unit-test \ build \ --copy-artifacts-to out/artifacts \ @@ -81,7 +81,7 @@ jobs: --enable-flashbundle \ --target efr32-brd4187c-light-use_ot_lib \ --target efr32-brd4187c-pump \ - --target efr32-brd4187c-lock-rpc-shell-enable_heap_monitoring \ + --target efr32-brd4187c-lock-shell-enable_heap_monitoring \ build \ --copy-artifacts-to out/artifacts \ " diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index b6bb80b2ebe5c7..609400764e0c72 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -237,8 +237,8 @@ def BuildEfr32Target(): target.AppendModifier('rpc', enable_rpcs=True) target.AppendModifier('with-ota-requestor', enable_ota_requestor=True) - target.AppendModifier('sed', enable_sed=True) - target.AppendModifier('low-power', enable_low_power=True).OnlyIfRe('-sed') + target.AppendModifier('icd', enable_icd=True) + target.AppendModifier('low-power', enable_low_power=True).OnlyIfRe('-icd') target.AppendModifier('shell', chip_build_libshell=True) target.AppendModifier('no_logging', chip_logging=False) target.AppendModifier('openthread_mtd', chip_openthread_ftd=False) diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index e45574accd3894..990f44993eb55d 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -140,7 +140,7 @@ def __init__(self, show_qr_code: bool = False, enable_rpcs: bool = False, enable_ota_requestor: bool = False, - enable_sed: bool = False, + enable_icd: bool = False, enable_low_power: bool = False, enable_wifi: bool = False, enable_rs911x: bool = False, @@ -164,7 +164,7 @@ def __init__(self, if enable_ota_requestor: self.extra_gn_options.append('chip_enable_ota_requestor=true') - if enable_sed: + if enable_icd: self.extra_gn_options.append('chip_enable_icd_server=true chip_openthread_ftd=false') if enable_low_power: diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index db0d31ea145989..1ac764d6f1afb0 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -6,7 +6,7 @@ cc32xx-lock ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd] ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd] cyw30739-cyw930739m2evb_01-{light,lock,ota-requestor,switch} -efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-sed][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version] +efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version] esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] From 1465733af63716e033291c52bc4f24ec106cd655 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 4 Aug 2023 12:08:55 -0400 Subject: [PATCH 153/159] [chef] disable Groups and Switch from example devices (#28501) * A set of manual edits * zap regen * Script-disable groups and switch from EP0 * Zap regen --- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 65 ------- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 4 +- ...umiditysensor_thermostat_56de3d5f45.matter | 65 ------- ...r_humiditysensor_thermostat_56de3d5f45.zap | 184 ++++++++++++++++-- ...ootnode_basicvideoplayer_0ff86e943b.matter | 134 ------------- .../rootnode_basicvideoplayer_0ff86e943b.zap | 64 +++++- ...de_colortemperaturelight_hbUnzYVeyn.matter | 6 - ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 2 +- .../rootnode_contactsensor_lFAGG1bfRO.matter | 65 ------- .../rootnode_contactsensor_lFAGG1bfRO.zap | 4 +- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 65 ------- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 4 +- .../rootnode_doorlock_aNKYAreMXE.matter | 65 ------- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 4 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 65 ------- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 4 +- .../devices/rootnode_fan_7N2TobIlOX.matter | 65 ------- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 4 +- .../rootnode_flowsensor_1zVxHedlaV.matter | 134 ------------- .../rootnode_flowsensor_1zVxHedlaV.zap | 4 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 65 ------- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 4 +- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 134 ------------- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 4 +- .../rootnode_lightsensor_lZQycTFcJK.matter | 134 ------------- .../rootnode_lightsensor_lZQycTFcJK.zap | 4 +- ...rootnode_occupancysensor_iHyVgifZuo.matter | 134 ------------- .../rootnode_occupancysensor_iHyVgifZuo.zap | 4 +- .../rootnode_onofflight_bbs1b7IaOV.matter | 65 ------- .../rootnode_onofflight_bbs1b7IaOV.zap | 4 +- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 65 ------- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 4 +- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 65 ------- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 4 +- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 134 ------------- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 4 +- ...ode_roboticvacuumcleaner_1807ff0c49.matter | 65 ------- ...otnode_roboticvacuumcleaner_1807ff0c49.zap | 4 +- .../rootnode_speaker_RpzeXdimqA.matter | 134 ------------- .../devices/rootnode_speaker_RpzeXdimqA.zap | 4 +- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 134 ------------- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 4 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 65 ------- .../rootnode_thermostat_bm3fb8dhYi.zap | 4 +- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 65 ------- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 4 +- examples/chef/devices/template.zap | 64 +++++- scripts/setup/constraints.txt | 2 +- 48 files changed, 318 insertions(+), 2066 deletions(-) diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 3fa94f796969e9..b52350856139ab 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1215,58 +1215,6 @@ server cluster EthernetNetworkDiagnostics = 55 { command ResetCounts(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1556,12 +1504,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1780,13 +1722,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 9ab03f1604e7fe..d487930194b61e 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4642,7 +4642,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index a10059b8f5d77d..37d8723570e27f 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -682,58 +682,6 @@ server cluster GeneralDiagnostics = 51 { command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1807,12 +1755,6 @@ server cluster RadonConcentrationMeasurement = 1071 { endpoint 0 { device type rootdevice = 22, version 1; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1905,13 +1847,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 0647999f636f36..9f584e99db4640 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 3, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 7, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 45, + "code": 45, + "profileId": 259, + "label": "MA-air-purifier", + "name": "MA-air-purifier" + }, + "deviceTypes": [ + { + "id": 45, + "code": 45, + "profileId": 259, + "label": "MA-air-purifier", + "name": "MA-air-purifier" + } + ], + "deviceTypeRefs": [ + 45 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 45 + ], "deviceTypeName": "MA-air-purifier", "deviceTypeCode": 45, "deviceTypeProfileId": 259, @@ -10884,7 +10936,33 @@ ] }, { + "id": 4, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + }, + "deviceTypes": [ + { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + } + ], + "deviceTypeRefs": [ + 46 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 44 + ], "deviceTypeName": "MA-air-quality-sensor", "deviceTypeCode": 44, "deviceTypeProfileId": 259, @@ -15138,7 +15216,33 @@ ] }, { + "id": 6, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceTypeRefs": [ + 24 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 770, "deviceTypeProfileId": 259, @@ -15784,7 +15888,33 @@ ] }, { + "id": 5, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + }, + "deviceTypes": [ + { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + } + ], + "deviceTypeRefs": [ + 27 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 775 + ], "deviceTypeName": "MA-humiditysensor", "deviceTypeCode": 775, "deviceTypeProfileId": 259, @@ -16430,7 +16560,33 @@ ] }, { + "id": 8, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 34, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "id": 34, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceTypeRefs": [ + 34 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -17928,54 +18084,42 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 45 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 44 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 3, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 770 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 4, "profileId": 259, "endpointId": 4, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 775 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 5, "profileId": 259, "endpointId": 5, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 769 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 169129dd542a12..3c51ea71c7b222 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -33,75 +33,6 @@ struct OperationalStateStruct { optional char_string<64> operationalStateLabel = 1; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { @@ -915,58 +846,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1587,12 +1466,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1721,13 +1594,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 49051bc9b0e123..711eaeb3fd40a2 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 10, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 9, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 37, + "code": 40, + "profileId": 259, + "label": "MA-basic-videoplayer", + "name": "MA-basic-videoplayer" + }, + "deviceTypes": [ + { + "id": 37, + "code": 40, + "profileId": 259, + "label": "MA-basic-videoplayer", + "name": "MA-basic-videoplayer" + } + ], + "deviceTypeRefs": [ + 37 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 40 + ], "deviceTypeName": "MA-basic-videoplayer", "deviceTypeCode": 40, "deviceTypeProfileId": 259, @@ -7488,18 +7540,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 40 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index d4ed8ae7833f32..ed53816698d54f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1537,12 +1537,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 6287c65ac3867c..640d0f39b6d6a0 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index e757bfca40c244..69106c33cf137b 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1246,12 +1194,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1380,13 +1322,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 8642b2a170521d..9eac9221ebe424 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index ecddba32229e2a..8ee5b39e03d3e4 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1420,12 +1368,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1556,13 +1498,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 0ab727ecd5abc2..18900740bf7806 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index cb7af5398cb2d9..85f6c9bb9a5be1 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1718,12 +1666,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1852,13 +1794,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index da96d4569de5ef..fdfffe135b50bd 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index cd0309d8576232..25ac0f188072b3 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1649,12 +1597,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1783,13 +1725,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index c38514edfb40ae..acc303bb710b01 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 5253394dac1473..2f2fb298b4d5aa 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -916,58 +916,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1288,12 +1236,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1423,13 +1365,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 1975bfaf97c3e3..011ff039daa3ac 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 5f7dc401654574..6c8e865f26610f 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1320,12 +1199,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1454,13 +1327,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 37a010401215f4..59abbd4ae12012 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 5c16ff4316165a..d57906a51bf465 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1073,58 +1073,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1598,12 +1546,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1732,13 +1674,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index b95ce7015634cb..66561779d4cd88 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 282e57cb787065..a37d8142cff436 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1320,12 +1199,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1454,13 +1327,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index e7267012c6188a..250d24c35eb7cc 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 60663594687e76..828bede7d73b36 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1325,12 +1204,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1459,13 +1332,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 57b5f0a2cb1180..019a4617f0a72c 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 159d6df5d0c559..64035c5820d1aa 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1336,12 +1215,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1470,13 +1343,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 01c4eefa322d6c..e08e37d82df559 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 82a253ba91ab62..26e8c6a26c324a 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1381,12 +1329,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1515,13 +1457,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index f134cca90449a2..9fc7b0e9296203 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 3e3de2c710e365..c3ba8a911d9e97 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1043,58 +1043,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1345,12 +1293,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1479,13 +1421,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 5205af24b4419f..20c1653ac2ea07 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 0f341394b711b3..4b7cc83be7cd9e 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -978,58 +978,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1280,12 +1228,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1414,13 +1356,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index e6984ffac25eae..68ea6f87083982 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index eadffeffcfd559..1155193e3cd3d5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1339,12 +1218,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1473,13 +1346,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 1145564264c61e..ad8e1134b6a71a 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 8fb00caaadd6a7..e1df348a9052ab 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -801,58 +801,6 @@ server cluster GeneralDiagnostics = 51 { command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1247,12 +1195,6 @@ server cluster RvcOperationalState = 97 { endpoint 0 { device type rootdevice = 22, version 1; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1345,13 +1287,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 746259df3636b6..6e71a2c6cb74e1 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index d452974aac5c8e..ef5096d4182ecb 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -73,75 +73,6 @@ server cluster Identify = 3 { command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { @@ -1073,58 +1004,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1375,12 +1254,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1509,13 +1382,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 3e9137e4de49c1..8b4cbf9a609dee 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index b4eb0ec4c22094..1fc82bcf1508b8 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1319,12 +1198,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1453,13 +1326,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index ec498c5a4cb846..5f512e7848cbef 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 57f3f09d4a4963..45831b2a87159b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1499,12 +1447,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1633,13 +1575,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index e71fbc336eceaf..6e6f841d558dd1 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index a5e2ad2299635d..8bae0ae4946a79 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 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; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1375,12 +1323,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1509,13 +1451,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 2ed25d1db597e8..56e76d3ce58aab 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 3df60484a7fb27..f74e712a6b4ff5 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + }, + "deviceTypes": [ + { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + } + ], + "deviceTypeRefs": [ + 52 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 0 + ], "deviceTypeName": "MA-all-clusters-app", "deviceTypeCode": 0, "deviceTypeProfileId": 259, @@ -10062,18 +10114,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 0 + "networkId": 0 } ], "log": [] diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index fa15e9d94ab800..a80c8a297d9fa8 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -379,7 +379,7 @@ wheel==0.38.4 ; sys_platform == "linux" # pip-tools # The following packages are considered to be unsafe in a requirements file: -pip==23.2 +pip==23.2.1 # via # fastcore # ghapi From 78a3bd9186b1f9ce4b5dd89f942491a5c69874fa Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 4 Aug 2023 21:31:40 +0200 Subject: [PATCH 154/159] Bash completion support for chip-tool (#28470) * Bash completion support for chip-tool * Restyled crashes if we've got nested cases... * Prevent executing command when collecting compgen --- scripts/helpers/bash-completion.sh | 69 ++++++++++++++++++++++++++++++ scripts/setup/bootstrap.sh | 7 ++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 scripts/helpers/bash-completion.sh diff --git a/scripts/helpers/bash-completion.sh b/scripts/helpers/bash-completion.sh new file mode 100644 index 00000000000000..6737f2149cc5f9 --- /dev/null +++ b/scripts/helpers/bash-completion.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# +# 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. +# + +# Get the list of commands from the output of the chip-tool, +# where each command is prefixed with the ' | * ' string. +_chip_tool_get_commands() { + "$@" --help 2>&1 | awk '/ [|] [*] /{ print $3 }' +} + +# Get the list of options from the output of the chip-tool, +# where each option starts with the '[--' string. +_chip_tool_get_options() { + "$@" --help 2>&1 | awk -F'[[]|[]]' '/^[[]--/{ print $2 }' +} + +_chip_tool() { + + local cur prev words cword split + _init_completion -s || return + + # Get command line arguments up to the cursor position + local args=("${COMP_WORDS[@]:0:$cword+1}") + + local command=0 + case "$prev" in + --commissioner-name) + readarray -t COMPREPLY < <(compgen -W "alpha beta gamma 4 5 6 7 8 9" -- "$cur") + ;; + --paa-trust-store-path | --cd-trust-store-path) + _filedir -d + ;; + --storage-directory) + _filedir -d + ;; + *) + command=1 + ;; + esac + + if [ "$command" -eq 1 ]; then + case "$cur" in + -*) + words=$(_chip_tool_get_options "${args[@]}") + ;; + *) + words=$(_chip_tool_get_commands "${args[@]}") + ;; + esac + readarray -t COMPREPLY < <(compgen -W "$words" -- "$cur") + fi + +} + +complete -F _chip_tool chip-tool diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index 2fea8adc8f702d..64866fc2e3860b 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -155,6 +155,11 @@ else _install_additional_pip_requirements "none" "$@" fi +# Load bash completion helper if running bash +if [ -n "$BASH" ]; then + . "$_CHIP_ROOT/scripts/helpers/bash-completion.sh" +fi + unset -f _bootstrap_or_activate unset -f _install_additional_pip_requirements @@ -169,6 +174,6 @@ unset PW_DOCTOR_SKIP_CIPD_CHECKS unset -f _chip_bootstrap_banner -if ! [ -z "$_ORIGINAL_PW_ENVIRONMENT_ROOT" ]; then +if [ -n "$_ORIGINAL_PW_ENVIRONMENT_ROOT" ]; then export PW_ENVIRONMENT_ROOT="$_ORIGINAL_PW_ENVIRONMENT_ROOT" fi From 94686f519a537a5804aad6db3f12e47350a41675 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 16:13:13 -0400 Subject: [PATCH 155/159] Add a few new things to Darwin availability annotations. (#28528) --- .../Framework/CHIP/templates/availability.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index d0d958848323de..d49841e22c3d97 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7621,10 +7621,28 @@ attributes: PowerSource: - EndpointList + Descriptor: + - TagList + structs: + Descriptor: + - SemanticTagStruct + struct fields: + Descriptor: + SemanticTagStruct: + - mfgCode + - namespaceID + - tag + - label + bitmaps: + GroupKeyManagement: + - Feature bitmap values: OnOff: Feature: - DeadFront + GroupKeyManagement: + Feature: + - CacheAndSync removed: clusters: # Clusters that really should just not be exposed, even if they're in our XML. From a70d5b44f68bf1bd512d47acdc00b9529b2fe045 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:12:49 -0400 Subject: [PATCH 156/159] [ReadHandler] ReportScheduler Injection (#28497) * Moved the default report scheduler to the application code and added a pointer to a report scheduler in ServerInitParams so it gets injected * Restyled by clang-format * Added a default ReportScheduler to the server init * Restyled by clang-format * Removed the double instanciation of report scheduler in ESP32 to reduce ram usage * Restyled by clang-format * Removed instanciation of ReportScheduler in examples as the default is now in Common Server Init params * Restyled by clang-format * Removed un-necessary mention to CommonCaseDeviceServerInitParams, restore CHIPConfig Synchronous reports to 0 --------- Co-authored-by: Restyled.io --- examples/platform/silabs/MatterConfig.cpp | 19 ++++++++ src/app/BUILD.gn | 2 + src/app/TimerDelegates.cpp | 55 +++++++++++++++++++++++ src/app/TimerDelegates.h | 27 ++--------- src/app/server/Server.cpp | 10 ++++- src/app/server/Server.h | 29 ++++++------ src/app/tests/TestCommissionManager.cpp | 6 +++ 7 files changed, 110 insertions(+), 38 deletions(-) create mode 100644 src/app/TimerDelegates.cpp diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 836e2a777c3699..1392dd9dc2b382 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -56,6 +56,14 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include "SilabsDeviceDataProvider.h" #include "SilabsTestEventTriggerDelegate.h" #include +#include + +#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED +#include +#else +#include +#endif + #include #if CHIP_ENABLE_OPENTHREAD @@ -182,8 +190,19 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) chip::DeviceLayer::PlatformMgr().LockChipStack(); // Create initParams with SDK example defaults here + // TODO: replace with our own init param to avoid double allocation in examples static chip::CommonCaseDeviceServerInitParams initParams; + // Report scheduler and timer delegate instance + static chip::app::DefaultTimerDelegate sTimerDelegate; +#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED + static chip::app::reporting::SynchronizedReportSchedulerImpl sReportScheduler(&sTimerDelegate); +#else + static chip::app::reporting::ReportSchedulerImpl sReportScheduler(&sTimerDelegate); +#endif + + initParams.reportScheduler = &sReportScheduler; + #if SILABS_TEST_EVENT_TRIGGER_ENABLED if (Encoding::HexToBytes(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, strlen(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY), sTestEventTriggerEnableKey, diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index f5a167ca7e7aff..a4028a7a7449ef 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -188,6 +188,8 @@ static_library("app") { "TimedHandler.h", "TimedRequest.cpp", "TimedRequest.h", + "TimerDelegates.cpp", + "TimerDelegates.h", "WriteClient.cpp", "WriteHandler.cpp", "reporting/Engine.cpp", diff --git a/src/app/TimerDelegates.cpp b/src/app/TimerDelegates.cpp new file mode 100644 index 00000000000000..d41503d0947d04 --- /dev/null +++ b/src/app/TimerDelegates.cpp @@ -0,0 +1,55 @@ +/* + * + * 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. + */ + +#include +#include +#include + +using TimerContext = chip::app::reporting::TimerContext; +using Timeout = chip::System::Clock::Timeout; + +namespace chip { +namespace app { + +static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) +{ + TimerContext * context = static_cast(aAppState); + context->TimerFired(); +} +CHIP_ERROR DefaultTimerDelegate::StartTimer(TimerContext * context, Timeout aTimeout) +{ + return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( + aTimeout, TimerCallbackInterface, context); +} +void DefaultTimerDelegate::CancelTimer(TimerContext * context) +{ + InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( + TimerCallbackInterface, context); +} +bool DefaultTimerDelegate::IsTimerActive(TimerContext * context) +{ + return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->IsTimerActive( + TimerCallbackInterface, context); +} + +System::Clock::Timestamp DefaultTimerDelegate::GetCurrentMonotonicTimestamp() +{ + return System::SystemClock().GetMonotonicTimestamp(); +} + +} // namespace app +} // namespace chip diff --git a/src/app/TimerDelegates.h b/src/app/TimerDelegates.h index 8e24fd4aef09bd..563ee138d9199f 100644 --- a/src/app/TimerDelegates.h +++ b/src/app/TimerDelegates.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include @@ -29,28 +28,10 @@ class DefaultTimerDelegate : public reporting::ReportScheduler::TimerDelegate public: using TimerContext = reporting::TimerContext; using Timeout = System::Clock::Timeout; - static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) - { - TimerContext * context = static_cast(aAppState); - context->TimerFired(); - } - CHIP_ERROR StartTimer(TimerContext * context, Timeout aTimeout) override - { - return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( - aTimeout, TimerCallbackInterface, context); - } - void CancelTimer(TimerContext * context) override - { - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( - TimerCallbackInterface, context); - } - bool IsTimerActive(TimerContext * context) override - { - return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->IsTimerActive( - TimerCallbackInterface, context); - } - - System::Clock::Timestamp GetCurrentMonotonicTimestamp() override { return System::SystemClock().GetMonotonicTimestamp(); } + CHIP_ERROR StartTimer(TimerContext * context, Timeout aTimeout) override; + void CancelTimer(TimerContext * context) override; + bool IsTimerActive(TimerContext * context) override; + System::Clock::Timestamp GetCurrentMonotonicTimestamp() override; }; } // namespace app diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index b416d5086c3096..f7d8d24ab36d2f 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -117,6 +117,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) VerifyOrExit(initParams.sessionKeystore != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(initParams.operationalKeystore != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(initParams.opCertStore != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(initParams.reportScheduler != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); // TODO(16969): Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code chip::Platform::MemoryInit(); @@ -171,6 +172,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mGroupsProvider = initParams.groupDataProvider; SetGroupDataProvider(mGroupsProvider); + mReportScheduler = initParams.reportScheduler; + mTestEventTriggerDelegate = initParams.testEventTriggerDelegate; deviceInfoprovider = DeviceLayer::GetDeviceInfoProvider(); @@ -250,7 +253,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT #if CHIP_CONFIG_ENABLE_ICD_SERVER - mICDManager.Init(mDeviceStorage, &GetFabricTable(), &mReportScheduler); + mICDManager.Init(mDeviceStorage, &GetFabricTable(), mReportScheduler); mICDEventManager.Init(&mICDManager); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -317,7 +320,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) &mCertificateValidityPolicy, mGroupsProvider); SuccessOrExit(err); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mReportScheduler, + err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), mReportScheduler, &mCASESessionManager, mSubscriptionResumptionStorage); SuccessOrExit(err); @@ -555,6 +558,9 @@ KvsPersistentStorageDelegate CommonCaseDeviceServerInitParams::sKvsPersistenStor PersistentStorageOperationalKeystore CommonCaseDeviceServerInitParams::sPersistentStorageOperationalKeystore; Credentials::PersistentStorageOpCertStore CommonCaseDeviceServerInitParams::sPersistentStorageOpCertStore; Credentials::GroupDataProviderImpl CommonCaseDeviceServerInitParams::sGroupDataProvider; +app::DefaultTimerDelegate CommonCaseDeviceServerInitParams::sTimerDelegate; +app::reporting::ReportSchedulerImpl + CommonCaseDeviceServerInitParams::sReportScheduler(&CommonCaseDeviceServerInitParams::sTimerDelegate); #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION SimpleSessionResumptionStorage CommonCaseDeviceServerInitParams::sSessionResumptionStorage; #endif diff --git a/src/app/server/Server.h b/src/app/server/Server.h index c41a9e3127e0d9..e5b5585be19f44 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -64,12 +64,8 @@ #include #endif #include -#include -#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED -#include -#else #include -#endif +#include #if CHIP_CONFIG_ENABLE_ICD_SERVER #include // nogncheck @@ -146,6 +142,8 @@ struct ServerInitParams // Operational certificate store with access to the operational certs in persisted storage: // must not be null at timne of Server::Init(). Credentials::OperationalCertificateStore * opCertStore = nullptr; + // Required, if not provided, the Server::Init() WILL fail. + app::reporting::ReportScheduler * reportScheduler = nullptr; }; /** @@ -222,6 +220,14 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams this->opCertStore = &sPersistentStorageOpCertStore; } + // Injection of report scheduler WILL lead to two schedulers being allocated. As recommended above, this should only be used + // for IN-TREE examples. If a default scheduler is desired, the basic ServerInitParams should be used by the application and + // CommonCaseDeviceServerInitParams should not be allocated. + if (this->reportScheduler == nullptr) + { + reportScheduler = &sReportScheduler; + } + // Session Keystore injection this->sessionKeystore = &sSessionKeystore; @@ -260,6 +266,8 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore; static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static Credentials::GroupDataProviderImpl sGroupDataProvider; + static chip::app::DefaultTimerDelegate sTimerDelegate; + static app::reporting::ReportSchedulerImpl sReportScheduler; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION static SimpleSessionResumptionStorage sSessionResumptionStorage; @@ -340,7 +348,7 @@ class Server app::DefaultAttributePersistenceProvider & GetDefaultAttributePersister() { return mAttributePersister; } - app::reporting::ReportScheduler & GetReportScheduler() { return mReportScheduler; } + app::reporting::ReportScheduler * GetReportScheduler() { return mReportScheduler; } /** * This function causes the ShutDown event to be generated async on the @@ -360,7 +368,7 @@ class Server static Server & GetInstance() { return sServer; } private: - Server() : mTimerDelegate(), mReportScheduler(&mTimerDelegate) {} + Server() {} static Server sServer; @@ -594,12 +602,7 @@ class Server app::DefaultAttributePersistenceProvider mAttributePersister; GroupDataProviderListener mListener; ServerFabricDelegate mFabricDelegate; - app::DefaultTimerDelegate mTimerDelegate; -#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED - app::reporting::SynchronizedReportSchedulerImpl mReportScheduler; -#else - app::reporting::ReportSchedulerImpl mReportScheduler; -#endif + app::reporting::ReportScheduler * mReportScheduler; Access::AccessControl mAccessControl; app::AclStorage * mAclStorage; diff --git a/src/app/tests/TestCommissionManager.cpp b/src/app/tests/TestCommissionManager.cpp index e2886f16dbdeab..73cf9423ef0838 100644 --- a/src/app/tests/TestCommissionManager.cpp +++ b/src/app/tests/TestCommissionManager.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#include +#include #include #include #include @@ -92,6 +94,10 @@ void InitializeChip(nlTestSuite * suite) chip::DeviceLayer::SetCommissionableDataProvider(&commissionableDataProvider); static chip::CommonCaseDeviceServerInitParams initParams; + // Report scheduler and timer delegate instance + static chip::app::DefaultTimerDelegate sTimerDelegate; + static chip::app::reporting::ReportSchedulerImpl sReportScheduler(&sTimerDelegate); + initParams.reportScheduler = &sReportScheduler; (void) initParams.InitializeStaticResourcesBeforeServerInit(); err = chip::Server::GetInstance().Init(initParams); From e16f5c8ec92d0012df3119cfa671ff1316c62705 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 4 Aug 2023 16:45:11 -0700 Subject: [PATCH 157/159] [Java] Fix crash on 32bit Android phone when eventing is enabled (#28534) * [Java] Fix crash on 32bit Android phone when eventing is enabled * Restyled by clang-format * Address review comment * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/controller/java/AndroidCallbacks.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index d55dfdf953c91c..4d8e536bfde4c5 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -364,9 +364,9 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jlong eventNumber = static_cast(aEventHeader.mEventNumber); - jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); - jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); + jlong eventNumber = static_cast(aEventHeader.mEventNumber); + jint priorityLevel = static_cast(aEventHeader.mPriorityLevel); + jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); jobject value = nullptr; #if USE_JAVA_TLV_ENCODE_DECODE From c1bcf1dde9ce3a0fa3077d583116a0e2e739c5a1 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Fri, 4 Aug 2023 16:54:04 -0700 Subject: [PATCH 158/159] Json to Tlv and Tlv to Json Converters Implementation in CPP (#27635) * Json to Tlv and Tlv to Json Converters Implemented in CPP This implementation is equivalent to the Kotlin implementation in: src/controller/java/src/chip/jsontlv/ Note that NOT all TLV configurations are supported by the current implementation. Here is the list of limitations: - TLV Structure elements are expected to be sorted in a canonical tag order - TLV Lists are not supported - Multi-Dimensional TLV Arrays are not supported - All elements in an array MUST be of the same type - The top-level TLV element MUST be a single structure with AnonymousTag - The following tags are supported: - AnonymousTag are only used with TLV Array elements or a top-level structure. - ContextSpecificTag are used only with TLV Structure elements. - CommonProfileTag are used only with TLV Structure elements. - Infinity Float/Double values are not supported. Added README.md file that describing the format. Added unit tests for TLV to JSON, JSON to TLV, JSON to TLV back to JSON conversion cases. NOTE about the current implementation of the Tlv-to-Json converter in: src/lib/support/jsontlv/TlvJson.cpp I kept this implementation because it is currently used in a few places in the code for testing/logging purposes. As a follow up work item, this implementation should be replaced with the new one presented in this commit. * Update src/lib/support/jsontlv/JsonToTlv.cpp Co-authored-by: Robert Szewczyk * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Robert Szewczyk * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/JsonToTlv.h Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/JsonToTlv.h Co-authored-by: Boris Zbarsky * Addressed Review Comments * Restyled by clang-format * Restyled by prettier-markdown * Removed Debug Prints * Added Support for Float/Double Infinity Values Those values should be encoded as "Infinity" and "-Infinity" strings. * Restyled by clang-format * Restyled by prettier-markdown * Update src/lib/support/jsontlv/JsonToTlv.cpp Co-authored-by: Boris Zbarsky * Addressed Review Comments * Switch from CommonTag to ProfileTag with an implicit profile id * Documentation update * Restyle * Fix type of variable in unit test * Update src/lib/support/jsontlv/README.md Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvJson.cpp Co-authored-by: Boris Zbarsky * Added more comments about kTemporaryImplicitProfileId not being actually used in stored values. Made the values consistent everywhere * Revert old code updates * Casing on json updated according to code review * Make the tlv element naming a bit more consistent, including invalid JSON in case element types are NOT as expected * Remove obsolete comment * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky --------- Co-authored-by: Robert Szewczyk Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin Co-authored-by: yunhanw-google --- .github/.wordlist.txt | 1 + scripts/tools/check_includes_config.py | 5 + src/lib/core/TLVReader.h | 5 + src/lib/support/jsontlv/BUILD.gn | 15 +- src/lib/support/jsontlv/ElementTypes.h | 43 + src/lib/support/jsontlv/JsonToTlv.cpp | 460 ++++ src/lib/support/jsontlv/JsonToTlv.h | 35 + src/lib/support/jsontlv/README.md | 134 ++ src/lib/support/jsontlv/TlvToJson.cpp | 382 ++++ src/lib/support/jsontlv/TlvToJson.h | 51 + src/lib/support/tests/BUILD.gn | 5 +- src/lib/support/tests/TestJsonToTlv.cpp | 344 +++ src/lib/support/tests/TestJsonToTlvToJson.cpp | 1913 +++++++++++++++++ src/lib/support/tests/TestTlvJson.cpp | 259 +++ src/lib/support/tests/TestTlvToJson.cpp | 239 +- 15 files changed, 3769 insertions(+), 122 deletions(-) create mode 100644 src/lib/support/jsontlv/ElementTypes.h create mode 100644 src/lib/support/jsontlv/JsonToTlv.cpp create mode 100644 src/lib/support/jsontlv/JsonToTlv.h create mode 100644 src/lib/support/jsontlv/README.md create mode 100644 src/lib/support/jsontlv/TlvToJson.cpp create mode 100644 src/lib/support/jsontlv/TlvToJson.h create mode 100644 src/lib/support/tests/TestJsonToTlv.cpp create mode 100644 src/lib/support/tests/TestJsonToTlvToJson.cpp create mode 100644 src/lib/support/tests/TestTlvJson.cpp diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 0b195ba9a244e5..41e37196757c41 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -154,6 +154,7 @@ blocklist blockquote bluetoothd bluez +BOOL BooleanState bootable Bootloader diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index cb1f4e1062fb26..ae06b487cbaba8 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -158,4 +158,9 @@ # Library meant for non-embedded 'src/tracing/json/json_tracing.cpp': {'string', 'sstream'}, 'src/tracing/json/json_tracing.h': {'fstream'}, + + # Not intended for embedded clients + 'src/lib/support/jsontlv/JsonToTlv.cpp': {'sstream'}, + 'src/lib/support/jsontlv/JsonToTlv.h': {'string'}, + 'src/lib/support/jsontlv/TlvToJson.h': {'string'} } diff --git a/src/lib/core/TLVReader.h b/src/lib/core/TLVReader.h index caf56332762e79..0acc618bc86598 100644 --- a/src/lib/core/TLVReader.h +++ b/src/lib/core/TLVReader.h @@ -855,6 +855,11 @@ class DLL_EXPORT TLVReader */ TLVBackingStore * GetBackingStore() { return mBackingStore; } + /** + * Returns true if the current TLV element type is a double. + */ + bool IsElementDouble() { return ElementType() == TLVElementType::FloatingPointNumber64; } + /** * Gets the point in the underlying input buffer that corresponds to the reader's current position. * diff --git a/src/lib/support/jsontlv/BUILD.gn b/src/lib/support/jsontlv/BUILD.gn index 1e62202adc29a5..377b9be19d0656 100644 --- a/src/lib/support/jsontlv/BUILD.gn +++ b/src/lib/support/jsontlv/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -19,7 +19,18 @@ config("jsontlv_config") { } static_library("jsontlv") { - sources = [ "TlvJson.cpp" ] + sources = [ + "ElementTypes.h", + "JsonToTlv.cpp", + "TlvJson.cpp", + "TlvToJson.cpp", + ] + + public = [ + "JsonToTlv.h", + "TlvJson.h", + "TlvToJson.h", + ] public_configs = [ ":jsontlv_config" ] diff --git a/src/lib/support/jsontlv/ElementTypes.h b/src/lib/support/jsontlv/ElementTypes.h new file mode 100644 index 00000000000000..0dd23bf9aaaa76 --- /dev/null +++ b/src/lib/support/jsontlv/ElementTypes.h @@ -0,0 +1,43 @@ +/* + * + * 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. + */ + +#include + +namespace { + +const char kElementTypeInt[] = "INT"; +const char kElementTypeUInt[] = "UINT"; +const char kElementTypeBool[] = "BOOL"; +const char kElementTypeFloat[] = "FLOAT"; +const char kElementTypeDouble[] = "DOUBLE"; +const char kElementTypeBytes[] = "BYTES"; +const char kElementTypeString[] = "STRING"; +const char kElementTypeNull[] = "NULL"; +const char kElementTypeStruct[] = "STRUCT"; +const char kElementTypeArray[] = "ARRAY"; +const char kElementTypeEmpty[] = "?"; + +const char kFloatingPointPositiveInfinity[] = "Infinity"; +const char kFloatingPointNegativeInfinity[] = "-Infinity"; + +struct ElementTypeContext +{ + chip::TLV::TLVType tlvType = chip::TLV::kTLVType_NotSpecified; + bool isDouble = false; +}; + +} // namespace diff --git a/src/lib/support/jsontlv/JsonToTlv.cpp b/src/lib/support/jsontlv/JsonToTlv.cpp new file mode 100644 index 00000000000000..327419e7273b57 --- /dev/null +++ b/src/lib/support/jsontlv/JsonToTlv.cpp @@ -0,0 +1,460 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include +#include + +namespace chip { + +namespace { + +// Not directly used: TLV encoding will not encode this number and +// will just encode "Implicit profile tag" +// This profile, but will be used for deciding what binary values to encode. +constexpr uint32_t kTemporaryImplicitProfileId = 0xFF01; + +std::vector SplitIntoFieldsBySeparator(const std::string & input, char separator) +{ + std::vector substrings; + std::stringstream ss(input); + std::string substring; + + while (std::getline(ss, substring, separator)) + { + substrings.push_back(std::move(substring)); + } + + return substrings; +} + +CHIP_ERROR JsonTypeStrToTlvType(const char * elementType, ElementTypeContext & type) +{ + if (strcmp(elementType, kElementTypeInt) == 0) + { + type.tlvType = TLV::kTLVType_SignedInteger; + } + else if (strcmp(elementType, kElementTypeUInt) == 0) + { + type.tlvType = TLV::kTLVType_UnsignedInteger; + } + else if (strcmp(elementType, kElementTypeBool) == 0) + { + type.tlvType = TLV::kTLVType_Boolean; + } + else if (strcmp(elementType, kElementTypeFloat) == 0) + { + type.tlvType = TLV::kTLVType_FloatingPointNumber; + type.isDouble = false; + } + else if (strcmp(elementType, kElementTypeDouble) == 0) + { + type.tlvType = TLV::kTLVType_FloatingPointNumber; + type.isDouble = true; + } + else if (strcmp(elementType, kElementTypeBytes) == 0) + { + type.tlvType = TLV::kTLVType_ByteString; + } + else if (strcmp(elementType, kElementTypeString) == 0) + { + type.tlvType = TLV::kTLVType_UTF8String; + } + else if (strcmp(elementType, kElementTypeNull) == 0) + { + type.tlvType = TLV::kTLVType_Null; + } + else if (strcmp(elementType, kElementTypeStruct) == 0) + { + type.tlvType = TLV::kTLVType_Structure; + } + else if (strncmp(elementType, kElementTypeArray, strlen(kElementTypeArray)) == 0) + { + type.tlvType = TLV::kTLVType_Array; + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + return CHIP_NO_ERROR; +} + +bool IsUnsignedInteger(const std::string & s) +{ + size_t len = s.length(); + if (len == 0) + { + return false; + } + for (size_t i = 0; i < len; i++) + { + if (!isdigit(s[i])) + { + return false; + } + } + return true; +} + +bool IsSignedInteger(const std::string & s) +{ + if (s.length() == 0) + { + return false; + } + if (s[0] == '-') + { + return IsUnsignedInteger(s.substr(1)); + } + return IsUnsignedInteger(s); +} + +bool IsValidBase64String(const std::string & s) +{ + const std::string base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + size_t len = s.length(); + + // Check if the length is a multiple of 4 + if (len % 4 != 0) + { + return false; + } + + size_t paddingLen = 0; + if (s[len - 1] == '=') + { + paddingLen++; + if (s[len - 2] == '=') + { + paddingLen++; + } + } + + // Check for invalid characters + for (char c : s.substr(0, len - paddingLen)) + { + if (base64Chars.find(c) == std::string::npos) + { + return false; + } + } + + return true; +} + +struct ElementContext +{ + std::string jsonName; + TLV::Tag tag = TLV::AnonymousTag(); + ElementTypeContext type; + ElementTypeContext subType; +}; + +bool CompareByTag(const ElementContext & a, const ElementContext & b) +{ + // If tags are of the same type compare by tag number + if (IsContextTag(a.tag) == IsContextTag(b.tag)) + { + return TLV::TagNumFromTag(a.tag) < TLV::TagNumFromTag(b.tag); + } + // Otherwise, compare by tag type: context tags first followed by common profile tags + return IsContextTag(a.tag); +} + +CHIP_ERROR ParseJsonName(const std::string name, ElementContext & elementCtx, uint32_t implicitProfileId) +{ + uint64_t tagNumber = 0; + const char * elementType = nullptr; + std::vector nameFields = SplitIntoFieldsBySeparator(name, ':'); + TLV::Tag tag = TLV::AnonymousTag(); + ElementTypeContext type; + ElementTypeContext subType; + + if (nameFields.size() == 2) + { + VerifyOrReturnError(IsUnsignedInteger(nameFields[0]), CHIP_ERROR_INVALID_ARGUMENT); + tagNumber = std::strtoull(nameFields[0].c_str(), nullptr, 10); + elementType = nameFields[1].c_str(); + } + else if (nameFields.size() == 3) + { + VerifyOrReturnError(IsUnsignedInteger(nameFields[1]), CHIP_ERROR_INVALID_ARGUMENT); + tagNumber = std::strtoull(nameFields[1].c_str(), nullptr, 10); + elementType = nameFields[2].c_str(); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (tagNumber <= UINT8_MAX) + { + tag = TLV::ContextTag(static_cast(tagNumber)); + } + else if (tagNumber <= UINT32_MAX) + { + tag = TLV::ProfileTag(implicitProfileId, static_cast(tagNumber)); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ReturnErrorOnFailure(JsonTypeStrToTlvType(elementType, type)); + + if (type.tlvType == TLV::kTLVType_Array) + { + std::vector arrayFields = SplitIntoFieldsBySeparator(elementType, '-'); + VerifyOrReturnError(arrayFields.size() == 2, CHIP_ERROR_INVALID_ARGUMENT); + + if (strcmp(arrayFields[1].c_str(), kElementTypeEmpty) == 0) + { + subType.tlvType = TLV::kTLVType_NotSpecified; + } + else + { + ReturnErrorOnFailure(JsonTypeStrToTlvType(arrayFields[1].c_str(), subType)); + } + } + + elementCtx.jsonName = name; + elementCtx.tag = tag; + elementCtx.type = type; + elementCtx.subType = subType; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EncodeTlvElement(const Json::Value & val, TLV::TLVWriter & writer, const ElementContext & elementCtx) +{ + TLV::Tag tag = elementCtx.tag; + + switch (elementCtx.type.tlvType) + { + case TLV::kTLVType_UnsignedInteger: { + uint64_t v; + if (val.isUInt64()) + { + v = val.asUInt64(); + } + else if (val.isString()) + { + const std::string valAsString = val.asString(); + VerifyOrReturnError(IsUnsignedInteger(valAsString), CHIP_ERROR_INVALID_ARGUMENT); + v = std::strtoull(valAsString.c_str(), nullptr, 10); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + ReturnErrorOnFailure(writer.Put(tag, v)); + break; + } + + case TLV::kTLVType_SignedInteger: { + int64_t v; + if (val.isInt64()) + { + v = val.asInt64(); + } + else if (val.isString()) + { + const std::string valAsString = val.asString(); + VerifyOrReturnError(IsSignedInteger(valAsString), CHIP_ERROR_INVALID_ARGUMENT); + v = std::strtoll(valAsString.c_str(), nullptr, 10); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + ReturnErrorOnFailure(writer.Put(tag, v)); + break; + } + + case TLV::kTLVType_Boolean: { + VerifyOrReturnError(val.isBool(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.Put(tag, val.asBool())); + break; + } + + case TLV::kTLVType_FloatingPointNumber: { + if (val.isNumeric()) + { + if (elementCtx.type.isDouble) + { + ReturnErrorOnFailure(writer.Put(tag, val.asDouble())); + } + else + { + ReturnErrorOnFailure(writer.Put(tag, val.asFloat())); + } + } + else if (val.isString()) + { + const std::string valAsString = val.asString(); + bool isPositiveInfinity = (valAsString == kFloatingPointPositiveInfinity); + bool isNegativeInfinity = (valAsString == kFloatingPointNegativeInfinity); + VerifyOrReturnError(isPositiveInfinity || isNegativeInfinity, CHIP_ERROR_INVALID_ARGUMENT); + if (elementCtx.type.isDouble) + { + if (isPositiveInfinity) + { + ReturnErrorOnFailure(writer.Put(tag, std::numeric_limits::infinity())); + } + else + { + ReturnErrorOnFailure(writer.Put(tag, -std::numeric_limits::infinity())); + } + } + else + { + if (isPositiveInfinity) + { + ReturnErrorOnFailure(writer.Put(tag, std::numeric_limits::infinity())); + } + else + { + ReturnErrorOnFailure(writer.Put(tag, -std::numeric_limits::infinity())); + } + } + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + break; + } + + case TLV::kTLVType_ByteString: { + VerifyOrReturnError(val.isString(), CHIP_ERROR_INVALID_ARGUMENT); + const std::string valAsString = val.asString(); + size_t encodedLen = valAsString.length(); + VerifyOrReturnError(CanCastTo(encodedLen), CHIP_ERROR_INVALID_ARGUMENT); + + VerifyOrReturnError(IsValidBase64String(valAsString), CHIP_ERROR_INVALID_ARGUMENT); + + Platform::ScopedMemoryBuffer byteString; + byteString.Alloc(BASE64_MAX_DECODED_LEN(static_cast(encodedLen))); + VerifyOrReturnError(byteString.Get() != nullptr, CHIP_ERROR_NO_MEMORY); + + auto decodedLen = Base64Decode(valAsString.c_str(), static_cast(encodedLen), byteString.Get()); + ReturnErrorOnFailure(writer.PutBytes(tag, byteString.Get(), decodedLen)); + break; + } + + case TLV::kTLVType_UTF8String: { + VerifyOrReturnError(val.isString(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.PutString(tag, val.asCString())); + break; + } + + case TLV::kTLVType_Null: { + VerifyOrReturnError(val.isNull(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.PutNull(tag)); + break; + } + + case TLV::kTLVType_Structure: { + TLV::TLVType containerType; + VerifyOrReturnError(val.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, containerType)); + + std::vector jsonNames = val.getMemberNames(); + std::vector nestedElementsCtx; + + for (size_t i = 0; i < jsonNames.size(); i++) + { + ElementContext ctx; + ReturnErrorOnFailure(ParseJsonName(jsonNames[i], ctx, writer.ImplicitProfileId)); + nestedElementsCtx.push_back(ctx); + } + + // Sort Json object elements by Tag number (low to high). + // Note that all sorted Context Tags will appear first followed by all sorted Common Tags. + std::sort(nestedElementsCtx.begin(), nestedElementsCtx.end(), CompareByTag); + + for (auto & ctx : nestedElementsCtx) + { + ReturnErrorOnFailure(EncodeTlvElement(val[ctx.jsonName], writer, ctx)); + } + + ReturnErrorOnFailure(writer.EndContainer(containerType)); + break; + } + + case TLV::kTLVType_Array: { + TLV::TLVType containerType; + VerifyOrReturnError(val.isArray(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Array, containerType)); + + if (elementCtx.subType.tlvType == TLV::kTLVType_NotSpecified) + { + VerifyOrReturnError(val.size() == 0, CHIP_ERROR_INVALID_ARGUMENT); + } + else + { + ElementContext nestedElementCtx; + nestedElementCtx.tag = TLV::AnonymousTag(); + nestedElementCtx.type = elementCtx.subType; + for (Json::ArrayIndex i = 0; i < val.size(); i++) + { + ReturnErrorOnFailure(EncodeTlvElement(val[i], writer, nestedElementCtx)); + } + } + + ReturnErrorOnFailure(writer.EndContainer(containerType)); + break; + } + + default: + return CHIP_ERROR_INVALID_TLV_ELEMENT; + break; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +CHIP_ERROR JsonToTlv(const std::string & jsonString, MutableByteSpan & tlv) +{ + TLV::TLVWriter writer; + writer.Init(tlv); + writer.ImplicitProfileId = kTemporaryImplicitProfileId; + ReturnErrorOnFailure(JsonToTlv(jsonString, writer)); + ReturnErrorOnFailure(writer.Finalize()); + tlv.reduce_size(writer.GetLengthWritten()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR JsonToTlv(const std::string & jsonString, TLV::TLVWriter & writer) +{ + Json::Reader reader; + Json::Value json; + bool result = reader.parse(jsonString, json); + VerifyOrReturnError(result, CHIP_ERROR_INTERNAL); + + ElementContext elementCtx; + elementCtx.type = { TLV::kTLVType_Structure, false }; + return EncodeTlvElement(json, writer, elementCtx); +} + +} // namespace chip diff --git a/src/lib/support/jsontlv/JsonToTlv.h b/src/lib/support/jsontlv/JsonToTlv.h new file mode 100644 index 00000000000000..d4660465c4c3d9 --- /dev/null +++ b/src/lib/support/jsontlv/JsonToTlv.h @@ -0,0 +1,35 @@ +/* + * + * 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. + */ + +#include +#include + +namespace chip { + +/* + * Given a JSON object that represents TLV, this function writes the corresponding TLV bytes into the provided buffer. + * The size of tlv will be adjusted to the size of the actual data written to the buffer. + */ +CHIP_ERROR JsonToTlv(const std::string & jsonString, MutableByteSpan & tlv); + +/* + * Given a JSON object that represents TLV, this function makes encode calls on the given TLVWriter to encode the corresponding TLV + * bytes. + */ +CHIP_ERROR JsonToTlv(const std::string & jsonString, TLV::TLVWriter & writer); + +} // namespace chip diff --git a/src/lib/support/jsontlv/README.md b/src/lib/support/jsontlv/README.md new file mode 100644 index 00000000000000..06de13398af7b1 --- /dev/null +++ b/src/lib/support/jsontlv/README.md @@ -0,0 +1,134 @@ +# JSON to TLV and TLV to JSON Converter + +## Introduction + +Helper functions for converting TLV-encoded data to Json format and vice versa. + +### Supported payloads + +The library supports + +- full bi-directional conversion for matter data model payloads +- Additional support for generic 32-bit unsigned integer ids using "implicit + profile tags": + + - 8-bit IDs are encoded as `ContextTags`, which matches matter + specification for encoding field identifiers + - For IDs that are larger, they will be encoded as + `Implicit Profile Tags`. The reason for allowing such IDs is to support + json formats where keys contain ids typically found in paths, like + `{"1234:INT": 10}` meaning `"Attribute 1234 has value 10"`. + +### Format details + +In order for the Json format to represent the TLV format without loss of +information, the Json name of each element should contain the TLV element tag +and type information. + +The Json name schema is as follows: + +``` +{ [field_name:]field_id:element_type[-sub_element_type] } +``` + +Specific rules: + +- 'element_type' MUST map to the TLV Type as specified in the table below. +- For 'element_type' of type "ARRAY", the sub_element_type MUST always be + present and be equal to the 'element_type' of the elements in the array. +- Array elements MUST have the same 'element_type'. +- Array elements MUST have anonymous TLV tags. +- 'field_name' is always an optional field and can be provided if the semantic + name for the field is available. +- In the case of an empty array, 'sub_element_type' should be "?" (unknown + element type). +- The unknown element type “?” MUST never occur outside of "ARRAY-?". +- 'field_id' is equivalent to the Field ID for all cluster payloads (commands, + events, attributes), encoded as a decimal number. + +The table below summarizes all element types and their corresponding encoding in +the Json element name: + +| TLV Type | element_type | JSON Type | +| -------------------------------------- | ---------------------- | ------------------------------- | +| Unsigned Integer ( < 2^32 ) | UINT | Number | +| Unsigned Integer ( >= 2^32 ) | UINT | String | +| Signed Integer ( >= -2^31 and < 2^31 ) | INT | Number | +| Signed Integer ( < -2^31 or >= 2^31 ) | INT | String | +| Boolean | BOOL | Boolean | +| Float (positive/negative infinity) | FLOAT | String ("Infinity"/"-Infinity") | +| Double (positive/negative infinity) | DOUBLE | String ("Infinity"/"-Infinity") | +| Float (not infinity) | FLOAT | Number | +| Double (not infinity) | DOUBLE | Number | +| Octet String | BYTES | String (Base64 encoded) | +| UTF-8 String | STRING | String | +| Null Value | NULL | null | +| Struct | STRUCT | Dict | +| Array | ARRAY-sub_element_type | Array | +| Unknown | ? | Empty Array | + +Note that this is NOT a generalized JSON representation of TLV and does not +support arbitrary TLV conversions. The main goal of this Json format is to +support data model payloads for events/commands/attributes. Some of the +limitations of this format are: + +- TLV List types are not supported. +- TLV Array cannot contain another TLV Array. +- The top-level container MUST be an anonymous STRUCT. +- Elements of the TLV Structure MUST have Context or Implicit Profile Tags. +- Implicit Profile Tag number MUST be larger or equal to 256 and smaller than + 2^32 + 1. +- TLV Structure element MUST be sorted by tag numbers from low to high, where + sorted elements with Context Tags MUST appear first followed by sorted + elements with Implicit Profile Tags. + +## Format Example + +The following is an example of a Json string. It represents various TLV +elements, arrays, and structures. + +``` +{ // top-level anonymous structure + "0:ARRAY-STRUCT" : [ // array of structures + { + "0:INT" : 8, // Struct.elem0 + "1:BOOL" : true // Struct.elem1 + } + ], + "1:STRUCT" : { // structure + "0:INT" : 12, // Struct.elem0 + "1:BOOL" : false, // Struct.elem1 + "2:STRING" : "example" // Struct.elem2 + }, + "2:INT" : "40000000000", // int as string + "isQualified:3:BOOL" : true, // boolean with field_name in the Json name + "4:ARRAY-?" : [], // empty array + "5:ARRAY-DOUBLE" : [ // array of doubles + 1.1, + 134.2763, + -12345.87, + "Infinity", // positive infinity + 62534, // positive integer-valued double + -62534 // negative integer-valued double + ], + "6:ARRAY-BYTES" : [ // array of Octet Strings: [{00 01 02 03 04}, {FF}, {4A EF 88}] + "AAECAwQ=", // base64( {00 01 02 03 04} ) + "/w==", // base64( {FF} ) + "Su+I" // base64( {4A EF 88} ) + ], + "7:BYTES" : "VGVzdCBCeXRlcw==", // base64( "Test Bytes" ) + "8:DOUBLE" : 17.9, // 17.9 as double + "9:FLOAT" : 17.9, // 17.9 as float + "10:FLOAT" : "-Infinity", // Negative infinity float + "contact:11:STRUCT" : { // structure example with field_name in the Json name + "name:1:STRING" : "John", + "age:2:UINT" : 34, + "approved:3:BOOL" : true, + "kids:4:ARRAY-INT" : [ + 5, + 9, + 10 + ] + } +} +``` diff --git a/src/lib/support/jsontlv/TlvToJson.cpp b/src/lib/support/jsontlv/TlvToJson.cpp new file mode 100644 index 00000000000000..d9884f60af43fa --- /dev/null +++ b/src/lib/support/jsontlv/TlvToJson.cpp @@ -0,0 +1,382 @@ +/* + * + * 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. + */ + +#include "lib/support/CHIPMemString.h" +#include "lib/support/ScopedBuffer.h" +#include +#include +#include +#include +#include +#include + +namespace chip { + +namespace { + +// actual value of this does not actually matter, however we need +// a value to be able to read 32-bit implicit profile tags +// +// JSON format never has this and TLV payload contains "implicit profile" +// and this value is never stored. +constexpr uint32_t kTemporaryImplicitProfileId = 0xFF01; + +/// RAII to switch the implicit profile id for a reader +class ImplicitProfileIdChange +{ +public: + ImplicitProfileIdChange(TLV::TLVReader & reader, uint32_t id) : mReader(reader), mOldImplicitProfileId(reader.ImplicitProfileId) + { + reader.ImplicitProfileId = id; + } + ~ImplicitProfileIdChange() { mReader.ImplicitProfileId = mOldImplicitProfileId; } + +private: + TLV::TLVReader & mReader; + uint32_t mOldImplicitProfileId; +}; + +const char * GetJsonElementStrFromType(const ElementTypeContext & ctx) +{ + switch (ctx.tlvType) + { + case TLV::kTLVType_UnsignedInteger: + return kElementTypeUInt; + case TLV::kTLVType_SignedInteger: + return kElementTypeInt; + case TLV::kTLVType_Boolean: + return kElementTypeBool; + case TLV::kTLVType_FloatingPointNumber: + return ctx.isDouble ? kElementTypeDouble : kElementTypeFloat; + case TLV::kTLVType_ByteString: + return kElementTypeBytes; + case TLV::kTLVType_UTF8String: + return kElementTypeString; + case TLV::kTLVType_Null: + return kElementTypeNull; + case TLV::kTLVType_Structure: + return kElementTypeStruct; + case TLV::kTLVType_Array: + return kElementTypeArray; + default: + return kElementTypeEmpty; + } +}; + +/* + * Encapsulates the element information required to construct a JSON element name string in a JSON object. + * + * The generated JSON element name string is constructed as: + * 'TagNumber:ElementType-SubElementType'. + */ +struct JsonObjectElementContext +{ + JsonObjectElementContext(TLV::TLVReader & reader) + { + tag = reader.GetTag(); + implicitProfileId = reader.ImplicitProfileId; + type.tlvType = reader.GetType(); + if (type.tlvType == TLV::kTLVType_FloatingPointNumber) + { + type.isDouble = reader.IsElementDouble(); + } + } + + std::string GenerateJsonElementName() const + { + std::string str = "???"; + if (TLV::IsContextTag(tag)) + { + // common case for context tags: raw value + str = std::to_string(TLV::TagNumFromTag(tag)); + } + else if (TLV::IsProfileTag(tag)) + { + if (TLV::ProfileIdFromTag(tag) == implicitProfileId) + { + // Explicit assume implicit tags are just things we want + // 32-bit numbers for + str = std::to_string(TLV::TagNumFromTag(tag)); + } + else + { + // UNEXPECTED, create a full 64-bit number here + str = std::to_string(TLV::ProfileIdFromTag(tag)) + "/" + std::to_string(TLV::TagNumFromTag(tag)); + } + } + str = str + ":" + GetJsonElementStrFromType(type); + if (type.tlvType == TLV::kTLVType_Array) + { + str = str + "-" + GetJsonElementStrFromType(subType); + } + return str; + } + + TLV::Tag tag; + uint32_t implicitProfileId; + ElementTypeContext type; + ElementTypeContext subType; +}; + +/* + * This templated function inserts a name/value pair into the Json object. + * The value is templated to be of type T and accepts any of the following types: + * + * bool, uint*_t, int*_t, char *, float, double, std::string, Json::Value + * + * This method uses the provided element context to generate Json name string. + */ +template +void InsertJsonElement(Json::Value & json, const JsonObjectElementContext & ctx, T val) +{ + if (json.isArray()) + { + json.append(val); + } + else + { + json[ctx.GenerateJsonElementName()] = val; + } +} + +static CHIP_ERROR TlvToJson(TLV::TLVReader & reader, Json::Value & jsonObj); + +/* + * Given a TLVReader positioned at TLV structure this function: + * - enters structure + * - converts all elements of a structure into JSON object representation + * - exits structure + */ +CHIP_ERROR TlvStructToJson(TLV::TLVReader & reader, Json::Value & jsonObj) +{ + CHIP_ERROR err; + TLV::TLVType containerType; + + ReturnErrorOnFailure(reader.EnterContainer(containerType)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + TLV::Tag tag = reader.GetTag(); + VerifyOrReturnError(TLV::IsContextTag(tag) || TLV::IsProfileTag(tag), CHIP_ERROR_INVALID_TLV_TAG); + + // Profile tags are expected to be implicit profile tags and they are + // used to encode > 8bit values from json + if (TLV::IsProfileTag(tag)) + { + VerifyOrReturnError(TLV::ProfileIdFromTag(tag) == reader.ImplicitProfileId, CHIP_ERROR_INVALID_TLV_TAG); + VerifyOrReturnError(TLV::TagNumFromTag(tag) > UINT8_MAX, CHIP_ERROR_INVALID_TLV_TAG); + } + + // Recursively convert to JSON the item within the struct. + ReturnErrorOnFailure(TlvToJson(reader, jsonObj)); + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + return reader.ExitContainer(containerType); +} + +CHIP_ERROR TlvToJson(TLV::TLVReader & reader, Json::Value & jsonObj) +{ + JsonObjectElementContext context(reader); + + switch (reader.GetType()) + { + case TLV::kTLVType_UnsignedInteger: { + uint64_t v; + ReturnErrorOnFailure(reader.Get(v)); + if (CanCastTo(v)) + { + InsertJsonElement(jsonObj, context, v); + } + else + { + InsertJsonElement(jsonObj, context, std::to_string(v)); + } + break; + } + + case TLV::kTLVType_SignedInteger: { + int64_t v; + ReturnErrorOnFailure(reader.Get(v)); + if (CanCastTo(v)) + { + InsertJsonElement(jsonObj, context, v); + } + else + { + InsertJsonElement(jsonObj, context, std::to_string(v)); + } + break; + } + + case TLV::kTLVType_Boolean: { + bool v; + ReturnErrorOnFailure(reader.Get(v)); + InsertJsonElement(jsonObj, context, v); + break; + } + + case TLV::kTLVType_FloatingPointNumber: { + double v; + ReturnErrorOnFailure(reader.Get(v)); + if (v == std::numeric_limits::infinity()) + { + InsertJsonElement(jsonObj, context, kFloatingPointPositiveInfinity); + } + else if (v == -std::numeric_limits::infinity()) + { + InsertJsonElement(jsonObj, context, kFloatingPointNegativeInfinity); + } + else + { + InsertJsonElement(jsonObj, context, v); + } + break; + } + + case TLV::kTLVType_ByteString: { + ByteSpan span; + ReturnErrorOnFailure(reader.Get(span)); + + Platform::ScopedMemoryBuffer byteString; + byteString.Alloc(BASE64_ENCODED_LEN(span.size()) + 1); + VerifyOrReturnError(byteString.Get() != nullptr, CHIP_ERROR_NO_MEMORY); + + auto encodedLen = Base64Encode(span.data(), static_cast(span.size()), byteString.Get()); + byteString.Get()[encodedLen] = '\0'; + + InsertJsonElement(jsonObj, context, byteString.Get()); + break; + } + + case TLV::kTLVType_UTF8String: { + CharSpan span; + ReturnErrorOnFailure(reader.Get(span)); + + std::string str(span.data(), span.size()); + InsertJsonElement(jsonObj, context, str); + break; + } + + case TLV::kTLVType_Null: { + InsertJsonElement(jsonObj, context, Json::Value()); + break; + } + + case TLV::kTLVType_Structure: { + Json::Value jsonStruct(Json::objectValue); + ReturnErrorOnFailure(TlvStructToJson(reader, jsonStruct)); + InsertJsonElement(jsonObj, context, jsonStruct); + break; + } + + case TLV::kTLVType_Array: { + CHIP_ERROR err; + Json::Value jsonArray(Json::arrayValue); + ElementTypeContext prevSubType; + ElementTypeContext nextSubType; + TLV::TLVType containerType; + + ReturnErrorOnFailure(reader.EnterContainer(containerType)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(reader.GetTag() == TLV::AnonymousTag(), CHIP_ERROR_INVALID_TLV_TAG); + VerifyOrReturnError(reader.GetType() != TLV::kTLVType_Array, CHIP_ERROR_INVALID_TLV_ELEMENT); + + nextSubType.tlvType = reader.GetType(); + if (nextSubType.tlvType == TLV::kTLVType_FloatingPointNumber) + { + nextSubType.isDouble = reader.IsElementDouble(); + } + + if (jsonArray.empty()) + { + prevSubType = nextSubType; + } + else + { + VerifyOrReturnError(prevSubType.tlvType == nextSubType.tlvType && prevSubType.isDouble == nextSubType.isDouble, + CHIP_ERROR_INVALID_TLV_ELEMENT); + } + + // Recursively convert to JSON the encompassing item within the array. + ReturnErrorOnFailure(TlvToJson(reader, jsonArray)); + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(containerType)); + + context.subType = prevSubType; + InsertJsonElement(jsonObj, context, jsonArray); + break; + } + + default: + return CHIP_ERROR_INVALID_TLV_ELEMENT; + break; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +CHIP_ERROR TlvToJson(const ByteSpan & tlv, std::string & jsonString) +{ + TLV::TLVReader reader; + reader.Init(tlv); + reader.ImplicitProfileId = kTemporaryImplicitProfileId; + + ReturnErrorOnFailure(reader.Next()); + return TlvToJson(reader, jsonString); +} + +CHIP_ERROR TlvToJson(TLV::TLVReader & reader, std::string & jsonString) +{ + // The top level element must be a TLV Structure of Anonymous type. + VerifyOrReturnError(reader.GetType() == TLV::kTLVType_Structure, CHIP_ERROR_WRONG_TLV_TYPE); + VerifyOrReturnError(reader.GetTag() == TLV::AnonymousTag(), CHIP_ERROR_INVALID_TLV_TAG); + + // During json conversion, a implicit profile ID is required + ImplicitProfileIdChange implicitProfileIdChange(reader, kTemporaryImplicitProfileId); + + Json::Value jsonObject(Json::objectValue); + ReturnErrorOnFailure(TlvStructToJson(reader, jsonObject)); + + Json::StyledWriter writer; + jsonString = writer.write(jsonObject); + return CHIP_NO_ERROR; +} + +std::string PrettyPrintJsonString(const std::string & jsonString) +{ + Json::Reader reader; + Json::Value jsonObject; + reader.parse(jsonString, jsonObject); + Json::StyledWriter writer; + return writer.write(jsonObject); +} + +std::string MakeJsonSingleLine(const std::string & jsonString) +{ + std::string str = PrettyPrintJsonString(jsonString); + str.erase(std::remove_if(str.begin(), str.end(), ::isspace), str.end()); + return str; +} + +} // namespace chip diff --git a/src/lib/support/jsontlv/TlvToJson.h b/src/lib/support/jsontlv/TlvToJson.h new file mode 100644 index 00000000000000..ea7589271e8d2e --- /dev/null +++ b/src/lib/support/jsontlv/TlvToJson.h @@ -0,0 +1,51 @@ +/* + * + * 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. + */ + +#include +#include + +namespace chip { + +/* + * Given a TLVReader positioned at a particular cluster data payload, this function converts + * the TLV data into a JSON object representation. + * + * NOTE: This only accepts data model payloads for events/commands/attributes. It does not support + * arbitrary TLV conversion to JSON. + */ +CHIP_ERROR TlvToJson(TLV::TLVReader & reader, std::string & jsonString); + +/* + * Given a TLV encoded byte array, this function converts it into JSON object. + */ +CHIP_ERROR TlvToJson(const ByteSpan & tlv, std::string & jsonString); + +/* + * Pretty-prints the input Json string using standard library pretty-printer. + * This pretty-printer generates a Json string in a human friendly format with 3 space indentation + * and nice representation of arrays and objects. + * The input can be any string, as long as it's valid Json. + */ +std::string PrettyPrintJsonString(const std::string & jsonString); + +/* + * Reformats the input Json string as a single-line string with no spaces or newlines. + * The input can be any string, as long as it's valid Json. + */ +std::string MakeJsonSingleLine(const std::string & jsonString); + +} // namespace chip diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index a42ecec423a382..1ef6db03710146 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -36,6 +36,8 @@ chip_test_suite("tests") { "TestFold.cpp", "TestIniEscaping.cpp", "TestIntrusiveList.cpp", + "TestJsonToTlv.cpp", + "TestJsonToTlvToJson.cpp", "TestOwnerOf.cpp", "TestPersistedCounter.cpp", "TestPool.cpp", @@ -51,6 +53,7 @@ chip_test_suite("tests") { "TestTestPersistentStorageDelegate.cpp", "TestThreadOperationalDataset.cpp", "TestTimeUtils.cpp", + "TestTlvJson.cpp", "TestTlvToJson.cpp", "TestVariant.cpp", "TestZclString.cpp", diff --git a/src/lib/support/tests/TestJsonToTlv.cpp b/src/lib/support/tests/TestJsonToTlv.cpp new file mode 100644 index 00000000000000..c08ba978360173 --- /dev/null +++ b/src/lib/support/tests/TestJsonToTlv.cpp @@ -0,0 +1,344 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip::Encoding; +using namespace chip; +using namespace chip::app; + +constexpr uint32_t kImplicitProfileId = 0x1234; + +uint8_t gBuf1[1024]; +uint8_t gBuf2[1024]; +TLV::TLVWriter gWriter1; +TLV::TLVWriter gWriter2; +nlTestSuite * gSuite; + +void SetupWriters() +{ + gWriter1.Init(gBuf1); + gWriter1.ImplicitProfileId = kImplicitProfileId; + + gWriter2.Init(gBuf2); + gWriter2.ImplicitProfileId = kImplicitProfileId; +} + +void PrintBytes(const uint8_t * buf, uint32_t len) +{ + for (uint32_t i = 0; i < len; i++) + { + printf("%02X ", buf[i]); + } + printf("\n"); +} + +bool MatchWriter1and2() +{ + auto matches = + (gWriter1.GetLengthWritten() == gWriter2.GetLengthWritten()) && (memcmp(gBuf1, gBuf2, gWriter1.GetLengthWritten()) == 0); + + if (!matches) + { + printf("Didn't match!\n"); + printf("Reference:\n"); + PrintBytes(gBuf1, gWriter1.GetLengthWritten()); + + printf("Generated:\n"); + PrintBytes(gBuf2, gWriter2.GetLengthWritten()); + } + + return matches; +} + +template +void ConvertJsonToTlvAndValidate(T val, const std::string & jsonString) +{ + CHIP_ERROR err; + TLV::TLVType container; + + SetupWriters(); + + err = gWriter1.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, container); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = DataModel::Encode(gWriter1, TLV::ContextTag(1), val); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter1.EndContainer(container); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter1.Finalize(); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = JsonToTlv(jsonString, gWriter2); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(gSuite, MatchWriter1and2()); +} + +void TestConverter(nlTestSuite * inSuite, void * inContext) +{ + std::string jsonString; + + gSuite = inSuite; + + jsonString = "{\n" + " \"1:UINT\" : 30\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(30), jsonString); + + jsonString = "{\n" + " \"1:INT\" : -30\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(-30), jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : false\n" + "}\n"; + ConvertJsonToTlvAndValidate(false, jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : true\n" + "}\n"; + ConvertJsonToTlvAndValidate(true, jsonString); + + jsonString = "{\n" + " \"1:FLOAT\" : 1.0\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(1.0), jsonString); + + jsonString = "{\n" + " \"1:DOUBLE\" : 1.0\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(1.0), jsonString); + + jsonString = "{\n" + " \"1:STRING\" : \"hello\"\n" + "}\n"; + ConvertJsonToTlvAndValidate(CharSpan::fromCharString("hello"), jsonString); + + // Validated using https://base64.guru/converter/encode/hex + const uint8_t byteBuf[] = { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0x99, 0x88, 0xdd, 0xcd }; + ByteSpan byteSpan(byteBuf); + jsonString = "{\n" + " \"1:BYTES\" : \"AQIDBP/+mYjdzQ==\"\n" + "}\n"; + ConvertJsonToTlvAndValidate(byteSpan, jsonString); + + DataModel::Nullable nullValue; + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + ConvertJsonToTlvAndValidate(nullValue, jsonString); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structVal; + structVal.a = 20; + structVal.b = true; + structVal.d = byteBuf; + structVal.e = CharSpan::fromCharString("hello"); + structVal.g = static_cast(1.0); + structVal.h = static_cast(1.0); + + jsonString = "{\n" + " \"1:STRUCT\" : {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + "}\n"; + ConvertJsonToTlvAndValidate(structVal, jsonString); + + uint8_t int8uListData[] = { 1, 2, 3, 4 }; + DataModel::List int8uList; + + int8uList = int8uListData; + jsonString = "{\n" + " \"1:ARRAY-UINT\" : [ 1, 2, 3, 4 ]\n" + "}\n"; + ConvertJsonToTlvAndValidate(int8uList, jsonString); + + int8uList = {}; + jsonString = "{\n" + " \"1:ARRAY-?\" : [ ]\n" + "}\n"; + ConvertJsonToTlvAndValidate(int8uList, jsonString); + + DataModel::Nullable> nullValueList; + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + ConvertJsonToTlvAndValidate(nullValueList, jsonString); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal }; + DataModel::List structList; + + structList = structListData; + jsonString = "{\n" + " \"1:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " },\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + " ]\n" + "}\n"; + ConvertJsonToTlvAndValidate(structList, jsonString); +} + +void Test32BitConvert(nlTestSuite * inSuite, void * inContext) +{ + // JSON TLV format explicitly wants to support 32-bit integer preservation. + // + // This is to support encode/decode of a format like: + // { "123456:BOOL" : true } to be a compact way of encoding + // "attribute id 123456 has value true" + // + // Such an encoding is NOT part of the matter spec, so best-effort is done here: + // - low ids are encoded as context tags (this is in the spec for any structure encoding) + // - large ids are encoded as implicit tags (NOT used in spec as spec never has such high ids) + TLV::TLVReader reader; + TLV::TLVType tlvType; + int32_t value = 0; + + // convert a simple single value + { + SetupWriters(); + JsonToTlv("{\"1:INT\": 321}", gWriter1); + NL_TEST_ASSERT(inSuite, gWriter1.Finalize() == CHIP_NO_ERROR); + + reader.Init(gBuf1, gWriter1.GetLengthWritten()); + reader.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(inSuite, reader.Next(TLV::AnonymousTag()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_Structure); + NL_TEST_ASSERT(inSuite, reader.EnterContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next(TLV::ContextTag(1)) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_SignedInteger); + NL_TEST_ASSERT(inSuite, reader.Get(value) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, value == 321); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + NL_TEST_ASSERT(inSuite, reader.ExitContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + } + + // convert a single value that is larger than 8 bit + { + SetupWriters(); + JsonToTlv("{\"1234:INT\": 321}", gWriter1); + NL_TEST_ASSERT(inSuite, gWriter1.Finalize() == CHIP_NO_ERROR); + + reader.Init(gBuf1, gWriter1.GetLengthWritten()); + reader.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(inSuite, reader.Next(TLV::AnonymousTag()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_Structure); + NL_TEST_ASSERT(inSuite, reader.EnterContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next(TLV::ProfileTag(kImplicitProfileId, 1234)) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_SignedInteger); + NL_TEST_ASSERT(inSuite, reader.Get(value) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, value == 321); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + NL_TEST_ASSERT(inSuite, reader.ExitContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + } + + // Convert to a full 32-bit value, unsigned + { + SetupWriters(); + JsonToTlv("{\"4275878552:INT\": 321}", gWriter1); + NL_TEST_ASSERT(inSuite, gWriter1.Finalize() == CHIP_NO_ERROR); + + reader.Init(gBuf1, gWriter1.GetLengthWritten()); + reader.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(inSuite, reader.Next(TLV::AnonymousTag()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_Structure); + NL_TEST_ASSERT(inSuite, reader.EnterContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next(TLV::ProfileTag(kImplicitProfileId, 0xFEDCBA98u)) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_SignedInteger); + NL_TEST_ASSERT(inSuite, reader.Get(value) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, value == 321); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + NL_TEST_ASSERT(inSuite, reader.ExitContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + } + + // FIXME: implement +} + +int Initialize(void * apSuite) +{ + VerifyOrReturnError(chip::Platform::MemoryInit() == CHIP_NO_ERROR, FAILURE); + return SUCCESS; +} + +int Finalize(void * aContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestConverter", TestConverter), + NL_TEST_DEF("Test32BitConvert", Test32BitConvert), + NL_TEST_SENTINEL() +}; +// clang-format on + +} // namespace + +int TestJsonToTlv() +{ + nlTestSuite theSuite = { "JsonToTlv", sTests, Initialize, Finalize }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestJsonToTlv) diff --git a/src/lib/support/tests/TestJsonToTlvToJson.cpp b/src/lib/support/tests/TestJsonToTlvToJson.cpp new file mode 100644 index 00000000000000..d494521b62537e --- /dev/null +++ b/src/lib/support/tests/TestJsonToTlvToJson.cpp @@ -0,0 +1,1913 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip::Encoding; +using namespace chip; +using namespace chip::app; + +constexpr uint32_t kImplicitProfileId = 0x1122; + +nlTestSuite * gSuite; + +void PrintSpan(const char * prefix, const ByteSpan & span) +{ + printf("%s", prefix); + for (size_t i = 0; i < span.size(); i++) + { + printf("%02X ", span.data()[i]); + } + printf("\n"); +} + +void CheckValidConversion(const std::string & jsonOriginal, const ByteSpan & tlvEncoding, const std::string & jsonExpected) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + bool match = false; + + uint8_t buf[256]; + MutableByteSpan tlvEncodingLocal(buf); + err = JsonToTlv(jsonOriginal, tlvEncodingLocal); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + match = tlvEncodingLocal.data_equal(tlvEncoding); + NL_TEST_ASSERT(gSuite, match); + if (!match) + { + printf("ERROR: TLV Encoding Doesn't Match!\n"); + PrintSpan("TLV Encoding Provided as Input for Reference: ", tlvEncoding); + PrintSpan("TLV Encoding Generated from Json Input String: ", tlvEncodingLocal); + } + + std::string generatedJsonString; + err = TlvToJson(tlvEncoding, generatedJsonString); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + auto compactExpectedString = PrettyPrintJsonString(jsonExpected); + auto compactGeneratedString = PrettyPrintJsonString(generatedJsonString); + match = (compactGeneratedString == compactExpectedString); + NL_TEST_ASSERT(gSuite, match); + if (!match) + { + printf("ERROR: Json String Doesn't Match!\n"); + printf("Expected Json String:\n%s\n", compactExpectedString.c_str()); + printf("Generated Json String:\n%s\n", compactGeneratedString.c_str()); + } + + // Verify that Expected Json String Converts to the Same TLV Encoding + tlvEncodingLocal = MutableByteSpan(buf); + err = JsonToTlv(jsonOriginal, tlvEncodingLocal); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + match = tlvEncodingLocal.data_equal(tlvEncoding); + NL_TEST_ASSERT(gSuite, match); + if (!match) + { + printf("ERROR: TLV Encoding Doesn't Match!\n"); + PrintSpan("TLV Encoding Provided as Input for Reference: ", tlvEncoding); + PrintSpan("TLV Encoding Generated from Json Expected String: ", tlvEncodingLocal); + } +} + +// Boolean true +void TestConverter_Boolean_True(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:BOOL\" : true\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Integer 42, 1-octet +void TestConverter_SignedInt_1BytePositive(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"2:INT\" : 42\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Integer -17, 1-octet +void TestConverter_SignedInt_1ByteNegative(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"3:INT\" : -17\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Unsigned Integer 42, 1-octet +void TestConverter_UnsignedInt_1Byte(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(4), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"value:4:UINT\" : 42\n" + "}\n"; + + std::string jsonExpected = "{\n" + " \"4:UINT\" : 42\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Signed Integer 4242, 2-octet +void TestConverter_SignedInt_2Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(4242))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"7:INT\" : 4242\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Integer -170000, 4-octet +void TestConverter_SignedInt_4Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(80), static_cast(-170000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"80:INT\" : -170000\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Long Integer (int64_t) 40000000000, 8-octet +void TestConverter_SignedInt_8Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(202), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"202:INT\" : \"40000000000\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Unsigned Long Integer (uint64_t) 40000000000, 8-octet +void TestConverter_UnsignedInt_8Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(222), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"222:UINT\" : \"40000000000\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// UTF-8 String, 1-octet length, "Hello!" +void TestConverter_UTF8String_Hello(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(0), "Hello!")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:STRING\" : \"Hello!\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Octet String, 1-octet length, octets { 00 01 02 03 04 } +void TestConverter_OctetString(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t v[] = { 0, 1, 2, 3, 4 }; + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::ContextTag(1), v, sizeof(v))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:BYTES\" : \"AAECAwQ=\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Null +void TestConverter_Null(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::ContextTag(1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Single precision floating point 0.0 +void TestConverter_Float_0(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(0.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:FLOAT\" : 0.0\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Single precision floating point (1.0 / 3.0) +void TestConverter_Float_1third(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(100), static_cast(1.0 / 3.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"100:FLOAT\" : 0.33333334\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"100:FLOAT\" : 0.3333333432674408\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Single precision floating point 17.9 +void TestConverter_Float_17_9(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:FLOAT\" : 17.9\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"101:FLOAT\" : 17.899999618530273\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Single precision floating point positive infinity +void TestConverter_Float_PositiveInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:FLOAT\" : \"Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Single precision floating point negative infinity +void TestConverter_Float_NegativeInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), -std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:FLOAT\" : \"-Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point 0.0 +void TestConverter_Double_0(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(0.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:DOUBLE\" : 0.0\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point (1.0 / 3.0) +void TestConverter_Double_1third(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(100), static_cast(1.0 / 3.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"100:DOUBLE\" : 0.33333333333333331\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point 17.9 +void TestConverter_Double_17_9(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:DOUBLE\" : 17.899999999999999\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point positive infinity +void TestConverter_Double_PositiveInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:DOUBLE\" : \"Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point negative infinity +void TestConverter_Double_NegativeInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), -std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:DOUBLE\" : \"-Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Empty Top-Level Structure, {} +void TestConverter_Structure_TopLevelEmpty(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{ }"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Empty Nested Structure, { {} } +void TestConverter_Structure_NestedEmpty(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:STRUCT\" : { }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Empty Array, { [] } +void TestConverter_Array_Empty(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:ARRAY-?\" : []\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +void TestConverter_Array_Empty_ImplicitProfileTag2(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 10000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"emptyarray:10000:ARRAY-?\" : []\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"10000:ARRAY-?\" : []\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +void TestConverter_Array_Empty_ImplicitProfileTag4(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 1000000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1000000:ARRAY-?\" : []\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Two Signed Integers with context specific tags: {0 = 42, 1 = -17} +void TestConverter_IntsWithContextTags(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:INT\" : 42,\n" + " \"1:INT\" : -17\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Structure with Two Signed Integers with context specific tags: { {0 = 42, 1 = -17} } +void TestConverter_Struct_IntsWithContextTags(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:STRUCT\" : {\n" + " \"0:INT\" : 42,\n" + " \"1:INT\" : -17\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Signed Integers: { [0, 1, 2, 3, 4] } +void TestConverter_Array_Ints(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(2))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(3))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(4))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " 0,\n" + " 1,\n" + " 2,\n" + " 3,\n" + " 4\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Long Signed Integers: { [42, -17, -170000, 40000000000] } +void TestConverter_Array_Ints2(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-170000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " 42,\n" + " -17,\n" + " -170000,\n" + " \"40000000000\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Signed Integers with MIN/MAX values for each type int8_t/int16_t/int32_t/int64_t +void TestConverter_Array_IntsMinMax(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT8_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT8_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT16_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT16_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT32_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT32_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT64_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT64_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " -128,\n" + " 127,\n" + " -32768,\n" + " 32767,\n" + " -2147483648,\n" + " 2147483647,\n" + " -9223372036854775808,\n" + " 9223372036854775807\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " -128,\n" + " 127,\n" + " -32768,\n" + " 32767,\n" + " -2147483648,\n" + " 2147483647,\n" + " \"-9223372036854775808\",\n" + " \"9223372036854775807\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Long Unsigned Integers: { [42, 170000, 40000000000] } +void TestConverter_Array_UInts(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(170000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-UINT\" : [\n" + " 42,\n" + " 170000,\n" + " \"40000000000\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Unsigned Integers, where each element represents MAX possible value for unsigned +// integere types uint8_t, uint16_t, uint32_t, uint64_t: [0xFF, 0xFFFF, 0xFFFFFFFF, 0xFFFFFFFF_FFFFFFFF] +void TestConverter_Array_UIntsMax(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT8_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT16_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT32_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT64_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-UINT\" : [\n" + " 255,\n" + " 65535,\n" + " 4294967295,\n" + " 18446744073709551615\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:ARRAY-UINT\" : [\n" + " 255,\n" + " 65535,\n" + " 4294967295,\n" + " \"18446744073709551615\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Doubles: { [1.1, 134.2763, -12345.87] } +void TestConverter_Array_Doubles(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1.1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(134.2763))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-12345.87))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-DOUBLE\" : [\n" + " 1.1,\n" + " 134.2763,\n" + " -12345.87\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:ARRAY-DOUBLE\" : [\n" + " 1.1000000000000001,\n" + " 134.27629999999999,\n" + " -12345.870000000001\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Floats: { [1.1, 134.2763, -12345.87] } +void TestConverter_Array_Floats(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 1000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1.1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(134.2763))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-12345.87))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1000:ARRAY-FLOAT\" : [\n" + " 1.1,\n" + " 134.2763,\n" + " -12345.87\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"1000:ARRAY-FLOAT\" : [\n" + " 1.1000000238418579,\n" + " 134.27630615234375,\n" + " -12345.8701171875\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Strings: ["ABC", "Options", "more"] +void TestConverter_Array_Strings(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 100000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "ABC")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "Options")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "more")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"100000:ARRAY-STRING\" : [\n" + " \"ABC\",\n" + " \"Options\",\n" + " \"more\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Booleans: [true, false, false] +void TestConverter_Array_Booleans(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(255), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"255:ARRAY-BOOL\" : [\n" + " true,\n" + " false,\n" + " false\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Nulls: [null, null] +void TestConverter_Array_Nulls(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::AnonymousTag())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::AnonymousTag())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:ARRAY-NULL\" : [\n" + " null,\n" + " null\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Context tag 255 (max), Unsigned Integer, 1-octet value: {255 = 42U} +void TestConverter_Struct_UInt(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(255), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"value:0:STRUCT\" : {\n" + " \"name:255:UINT\" : 42\n" + " }\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"0:STRUCT\" : {\n" + " \"255:UINT\" : 42\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Context and Common Profile tags, Unsigned Integer structure: {255 = 42, 256 = 17000, 65535 = +// 1, 65536 = 345678, 4294967295 = 500000000000} +void TestConverter_Struct_MixedTags(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(255), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 256), static_cast(17000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 65535), static_cast(1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 65536), static_cast(345678))); + NL_TEST_ASSERT( + gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 4294967295), static_cast(500000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:STRUCT\" : {\n" + " \"255:UINT\" : 42,\n" + " \"256:UINT\" : 17000,\n" + " \"65535:UINT\" : 1,\n" + " \"65536:UINT\" : 345678,\n" + " \"4294967295:UINT\" : \"500000000000\"\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Structure with mixed elements +void TestConverter_Struct_MixedElements(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + char bytes[] = "Test ByteString Value"; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(20))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(0))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(3), reinterpret_cast(bytes), static_cast(strlen(bytes)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(4), "hello")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(5), static_cast(-500000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(6), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"c:0:STRUCT\" : {\n" + " \"z:0:INT\" : 20,\n" + " \"b:1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"abc:3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVl\",\n" + " \"cc:4:STRING\" : \"hello\",\n" + " \"tt:5:INT\" : -500000,\n" + " \"AA:6:DOUBLE\" : 17.9,\n" + " \"B:7:FLOAT\" : 17.9\n" + " }\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:STRUCT\" : {\n" + " \"0:INT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVl\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:INT\" : -500000,\n" + " \"6:DOUBLE\" : 17.899999999999999,\n" + " \"7:FLOAT\" : 17.899999618530273\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of structures with mixed elements +void TestConverter_Array_Structures(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + TLV::TLVType containerType3; + char bytes1[] = "Test ByteString Value 1"; + char bytes2[] = "Test ByteString Value 2"; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 1000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(20))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(0))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(3), reinterpret_cast(bytes1), static_cast(strlen(bytes1)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(4), "hello1")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(5), static_cast(-500000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(6), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(-10))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(128))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(3), reinterpret_cast(bytes2), static_cast(strlen(bytes2)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(4), "hello2")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(5), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(6), static_cast(-1754.923))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(97.945))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1000:ARRAY-STRUCT\": [\n" + " {\n" + " \"0:INT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDE=\",\n" + " \"4:STRING\" : \"hello1\",\n" + " \"5:INT\" : -500000,\n" + " \"6:DOUBLE\" : 17.9,\n" + " \"7:FLOAT\" : 17.9\n" + " },\n" + " {\n" + " \"0:INT\" : -10,\n" + " \"1:BOOL\" : false,\n" + " \"2:UINT\" : 128,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDI=\",\n" + " \"4:STRING\" : \"hello2\",\n" + " \"5:INT\" : \"40000000000\",\n" + " \"6:DOUBLE\" : -1754.923,\n" + " \"7:FLOAT\" : 97.945\n" + " }\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"1000:ARRAY-STRUCT\": [\n" + " {\n" + " \"0:INT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDE=\",\n" + " \"4:STRING\" : \"hello1\",\n" + " \"5:INT\" : -500000,\n" + " \"6:DOUBLE\" : 17.899999999999999,\n" + " \"7:FLOAT\" : 17.899999618530273\n" + " },\n" + " {\n" + " \"0:INT\" : -10,\n" + " \"1:BOOL\" : false,\n" + " \"2:UINT\" : 128,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDI=\",\n" + " \"4:STRING\" : \"hello2\",\n" + " \"5:INT\" : \"40000000000\",\n" + " \"6:DOUBLE\" : -1754.923,\n" + " \"7:FLOAT\" : 97.944999694824219\n" + " }\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Top level with mixed elements +void TestConverter_TopLevel_MixedElements(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + TLV::TLVType containerType3; + char bytes[] = "Test array member 0"; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(42))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(1), reinterpret_cast(bytes), static_cast(strlen(bytes)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(156.398))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), static_cast(73709551615))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(4), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::ContextTag(5))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(6), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(1), "John")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(34))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(4), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(5))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(10))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(5), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "Ammy")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "David")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "Larry")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(6), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(0.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"value:0:INT\": 42,\n" + " \"value:1:BYTES\": \"VGVzdCBhcnJheSBtZW1iZXIgMA==\",\n" + " \"value:2:DOUBLE\": 156.398,\n" + " \"value:3:UINT\": \"73709551615\",\n" + " \"value:4:BOOL\": true,\n" + " \"value:5:NULL\": null,\n" + " \"value:6:STRUCT\": {\n" + " \"name:1:STRING\": \"John\",\n" + " \"age:2:UINT\": 34,\n" + " \"approved:3:BOOL\": true,\n" + " \"kids:4:ARRAY-INT\": [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ],\n" + " \"names:5:ARRAY-STRING\": [\n" + " \"Ammy\",\n" + " \"David\",\n" + " \"Larry\"\n" + " ],\n" + " \"6:ARRAY-BOOL\": [\n" + " true,\n" + " false,\n" + " true\n" + " ]\n" + " },\n" + " \"value:7:FLOAT\": 0.0\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"0:INT\": 42,\n" + " \"1:BYTES\": \"VGVzdCBhcnJheSBtZW1iZXIgMA==\",\n" + " \"2:DOUBLE\": 156.398,\n" + " \"3:UINT\": \"73709551615\",\n" + " \"4:BOOL\": true,\n" + " \"5:NULL\": null,\n" + " \"6:STRUCT\": {\n" + " \"1:STRING\": \"John\",\n" + " \"2:UINT\": 34,\n" + " \"3:BOOL\": true,\n" + " \"4:ARRAY-INT\": [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ],\n" + " \"5:ARRAY-STRING\": [\n" + " \"Ammy\",\n" + " \"David\",\n" + " \"Larry\"\n" + " ],\n" + " \"6:ARRAY-BOOL\": [\n" + " true,\n" + " false,\n" + " true\n" + " ]\n" + " },\n" + " \"7:FLOAT\": 0.0\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Complex Structure from README +void TestConverter_Structure_FromReadme(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + TLV::TLVType containerType3; + uint8_t bytes1[] = { 0x00, 0x01, 0x02, 0x03, 0x04 }; + uint8_t bytes2[] = { 0xFF }; + uint8_t bytes3[] = { 0x4A, 0xEF, 0x88 }; + char bytes4[] = "Test Bytes"; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(8))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(12))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(2), "example")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(4), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(5), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1.1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(134.2763))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-12345.87))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(62534))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-62534))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(6), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::AnonymousTag(), bytes1, static_cast(sizeof(bytes1)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::AnonymousTag(), bytes2, static_cast(sizeof(bytes2)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::AnonymousTag(), bytes3, static_cast(sizeof(bytes3)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(7), reinterpret_cast(bytes4), static_cast(strlen(bytes4)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(8), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(9), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(10), -std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(11), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(1), "John")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(34))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(4), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(5))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(10))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + + std::string jsonString = "{\n" + " \"0:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:INT\" : 8,\n" + " \"1:BOOL\" : true\n" + " }\n" + " ],\n" + " \"1:STRUCT\" : {\n" + " \"0:INT\" : 12,\n" + " \"1:BOOL\" : false,\n" + " \"2:STRING\" : \"example\"\n" + " },\n" + " \"2:INT\" : \"40000000000\",\n" + " \"isQualified:3:BOOL\" : true,\n" + " \"4:ARRAY-?\" : [],\n" + " \"5:ARRAY-DOUBLE\" : [\n" + " 1.1000000000000001,\n" + " 134.27629999999999,\n" + " -12345.870000000001,\n" + " \"Infinity\",\n" + " 62534.0,\n" + " -62534.0\n" + " ],\n" + " \"6:ARRAY-BYTES\" : [\n" + " \"AAECAwQ=\",\n" + " \"/w==\",\n" + " \"Su+I\"\n" + " ],\n" + " \"7:BYTES\" : \"VGVzdCBCeXRlcw==\",\n" + " \"8:DOUBLE\" : 17.899999999999999,\n" + " \"9:FLOAT\" : 17.899999618530273,\n" + " \"10:FLOAT\" : \"-Infinity\",\n" + " \"contact:11:STRUCT\" : {\n" + " \"name:1:STRING\" : \"John\",\n" + " \"age:2:UINT\" : 34,\n" + " \"approved:3:BOOL\" : true,\n" + " \"kids:4:ARRAY-INT\" : [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ]\n" + " }\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"0:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:INT\" : 8,\n" + " \"1:BOOL\" : true\n" + " }\n" + " ],\n" + " \"1:STRUCT\" : {\n" + " \"0:INT\" : 12,\n" + " \"1:BOOL\" : false,\n" + " \"2:STRING\" : \"example\"\n" + " },\n" + " \"2:INT\" : \"40000000000\",\n" + " \"3:BOOL\" : true,\n" + " \"4:ARRAY-?\" : [],\n" + " \"5:ARRAY-DOUBLE\" : [\n" + " 1.1000000000000001,\n" + " 134.27629999999999,\n" + " -12345.870000000001,\n" + " \"Infinity\",\n" + " 62534.0,\n" + " -62534.0\n" + " ],\n" + " \"6:ARRAY-BYTES\" : [\n" + " \"AAECAwQ=\",\n" + " \"/w==\",\n" + " \"Su+I\"\n" + " ],\n" + " \"7:BYTES\" : \"VGVzdCBCeXRlcw==\",\n" + " \"8:DOUBLE\" : 17.899999999999999,\n" + " \"9:FLOAT\" : 17.899999618530273,\n" + " \"10:FLOAT\" : \"-Infinity\",\n" + " \"11:STRUCT\" : {\n" + " \"1:STRING\" : \"John\",\n" + " \"2:UINT\" : 34,\n" + " \"3:BOOL\" : true,\n" + " \"4:ARRAY-INT\" : [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ]\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +void TestConverter_TlvToJson_ErrorCases(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + struct TestCase + { + const ByteSpan nEncodedTlv; + CHIP_ERROR mExpectedResult; + const char * mNameString; + }; + + uint8_t buf1[32]; + writer.Init(buf1); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::CommonTag(1), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan topLevelStructWithTag(buf1, writer.GetLengthWritten()); + + uint8_t buf2[32]; + writer.Init(buf2); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Array, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan topLevelIsArray(buf2, writer.GetLengthWritten()); + + uint8_t buf3[32]; + writer.Init(buf3); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_List, containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan usingList(buf3, writer.GetLengthWritten()); + + uint8_t buf8[32]; + writer.Init(buf8); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-170000))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42456))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan arrayWithMixedElements(buf8, writer.GetLengthWritten()); + + uint8_t buf9[32]; + writer.Init(buf9); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(0xAA55FEED, 234), static_cast(42))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan useFullyQualifiedTag(buf9, writer.GetLengthWritten()); + + // clang-format off + static const TestCase sTestCases[] = { + // TLV Encoded Input Expected Error Test Case String + // ================================================================================================== + { topLevelStructWithTag, CHIP_ERROR_INVALID_TLV_TAG, "Top-Level Struct is Not Anonymous" }, + { topLevelIsArray, CHIP_ERROR_WRONG_TLV_TYPE, "Top-Level is an Array" }, + { usingList, CHIP_ERROR_INVALID_TLV_ELEMENT, "Using Unsupported List Type" }, + { arrayWithMixedElements, CHIP_ERROR_INVALID_TLV_ELEMENT, "Array with Mixed Elements" }, + { useFullyQualifiedTag, CHIP_ERROR_INVALID_TLV_TAG, "Using Unsupported Fully Qualified Tag" }, + }; + // clang-format on + + for (const auto & testCase : sTestCases) + { + std::string jsonString; + err = TlvToJson(testCase.nEncodedTlv, jsonString); + NL_TEST_ASSERT(inSuite, err == testCase.mExpectedResult); + } +} + +void TestConverter_JsonToTlv_ErrorCases(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err; + + struct TestCase + { + const std::string mJsonString; + CHIP_ERROR mExpectedResult; + const char * mNameString; + }; + + std::string arrayTypeStringExpectedBool = "{\n" + " \"value:1:ARRAY-BOOL\" : [\n" + " \"yes\",\n" + " \"no\"\n" + " ]\n" + "}\n"; + + std::string arrayTypeIntExpectedUInt = "{\n" + " \"value:1:ARRAY-UINT\" : [\n" + " 45,\n" + " -367\n" + " ]\n" + "}\n"; + + std::string arrayElementsWithName = "{\n" + " \"value:1:ARRAY-INT\" : [\n" + " \"1:INT\" : 45,\n" + " \"2:INT\" : -367\n" + " ]\n" + "}\n"; + + std::string invalidNameWithoutTagField = "{\n" + " \"value:ARRAY-BYTES\" : [\n" + " \"AAECAwQ=\"\n" + " ]\n" + "}\n"; + + std::string invalidNameWithoutTagField2 = "{\n" + " \"UINT\" : 42\n" + "}\n"; + + std::string invalidNameTagValueTooBig = "{\n" + " \"invalid:4294967296:UINT\" : 42\n" + "}\n"; + + std::string invalidNameWithNegativeTag = "{\n" + " \"-1:UINT\" : 42\n" + "}\n"; + + std::string invalidNameWithInvalidTypeField = "{\n" + " \"1:INTEGER\" : 42\n" + "}\n"; + + std::string invalidBytesBase64Value1 = "{\n" + " \"1:BYTES\" : \"SGVsbG8!\"\n" + "}\n"; + + std::string invalidBytesBase64Value2 = "{\n" + " \"1:BYTES\" : \"AAECw=Q\"\n" + "}\n"; + + std::string invalidBytesBase64Value3 = "{\n" + " \"1:BYTES\" : \"AAECwQ=\"\n" + "}\n"; + + std::string invalidPositiveInfinityValue = "{\n" + " \"1:DOUBLE\" : \"+Infinity\"\n" + "}\n"; + + std::string invalidFloatValueAsString = "{\n" + " \"1:FLOAT\" : \"1.1\"\n" + "}\n"; + + // clang-format off + static const TestCase sTestCases[] = { + // Json String Expected Error Test Case String + // ========================================================================================================================== + { arrayTypeStringExpectedBool, CHIP_ERROR_INVALID_ARGUMENT, "Array Type Is String While Bool Is Expected" }, + { arrayTypeIntExpectedUInt, CHIP_ERROR_INVALID_ARGUMENT, "Array Type Is Signed Integer While Unsigned Is Expected" }, + { arrayElementsWithName, CHIP_ERROR_INTERNAL, "Array Elements With Json Name" }, + { invalidNameWithoutTagField, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name String Without Tag Field" }, + { invalidNameWithoutTagField2, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name String Without Tag Field 2" }, + { invalidNameTagValueTooBig, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name String Tag Value Larger than UINT32_MAX" }, + { invalidNameWithNegativeTag, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name With Negative Tag Value" }, + { invalidNameWithInvalidTypeField, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name With Invalid Type Field" }, + { invalidBytesBase64Value1, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Base64 Encoding: Invalid Character" }, + { invalidBytesBase64Value2, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Base64 Encoding: Invalid Character" }, + { invalidBytesBase64Value3, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Base64 Encoding: Invalid length" }, + { invalidPositiveInfinityValue, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Double Positive Infinity Encoding" }, + { invalidFloatValueAsString, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Float Value Encoding as a String" }, + }; + // clang-format on + + for (const auto & testCase : sTestCases) + { + uint8_t buf[256]; + MutableByteSpan tlvSpan(buf); + err = JsonToTlv(testCase.mJsonString, tlvSpan); + NL_TEST_ASSERT(inSuite, err == testCase.mExpectedResult); + } +} + +int Initialize(void * apSuite) +{ + VerifyOrReturnError(chip::Platform::MemoryInit() == CHIP_NO_ERROR, FAILURE); + return SUCCESS; +} + +int Finalize(void * aContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +const nlTest sTests[] = { + NL_TEST_DEF("Test Json Tlv Converter - Boolean True", TestConverter_Boolean_True), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 1-Byte Positive", TestConverter_SignedInt_1BytePositive), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 1-Byte Negative", TestConverter_SignedInt_1ByteNegative), + NL_TEST_DEF("Test Json Tlv Converter - Unsigned Integer 1-Byte", TestConverter_UnsignedInt_1Byte), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 2-Bytes", TestConverter_SignedInt_2Bytes), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 4-Bytes", TestConverter_SignedInt_4Bytes), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 8-Bytes", TestConverter_SignedInt_8Bytes), + NL_TEST_DEF("Test Json Tlv Converter - Unsigned Integer 8-Bytes", TestConverter_UnsignedInt_8Bytes), + NL_TEST_DEF("Test Json Tlv Converter - UTF-8 String Hello!", TestConverter_UTF8String_Hello), + NL_TEST_DEF("Test Json Tlv Converter - Octet String", TestConverter_OctetString), + NL_TEST_DEF("Test Json Tlv Converter - Null", TestConverter_Null), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision 0.0", TestConverter_Float_0), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision 1/3", TestConverter_Float_1third), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision 17.9", TestConverter_Float_17_9), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision Positive Infinity", + TestConverter_Float_PositiveInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision Negative Infinity", + TestConverter_Float_NegativeInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision 0.0", TestConverter_Double_0), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision 1/3", TestConverter_Double_1third), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision 17.9", TestConverter_Double_17_9), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision Positive Infinity", + TestConverter_Double_PositiveInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision Negative Infinity", + TestConverter_Double_NegativeInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Structure Top-Level Empty", TestConverter_Structure_TopLevelEmpty), + NL_TEST_DEF("Test Json Tlv Converter - Structure Nested Empty", TestConverter_Structure_NestedEmpty), + NL_TEST_DEF("Test Json Tlv Converter - Array Empty", TestConverter_Array_Empty), + NL_TEST_DEF("Test Json Tlv Converter - Array Empty with Implicit Profile Tag (length 2)", + TestConverter_Array_Empty_ImplicitProfileTag2), + NL_TEST_DEF("Test Json Tlv Converter - Array Empty with Implicit Profile Tag (length 4)", + TestConverter_Array_Empty_ImplicitProfileTag4), + NL_TEST_DEF("Test Json Tlv Converter - Two Signed Integers", TestConverter_IntsWithContextTags), + NL_TEST_DEF("Test Json Tlv Converter - Structure With Two Signed Integers", TestConverter_Struct_IntsWithContextTags), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Signed Integers", TestConverter_Array_Ints), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Long Signed Integers", TestConverter_Array_Ints2), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Min/Max Signed Integers", TestConverter_Array_IntsMinMax), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Long Unsigned Integers", TestConverter_Array_UInts), + NL_TEST_DEF("Test Json Tlv Converter - Array of Unsigned Integers with Max values", TestConverter_Array_UIntsMax), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Doubles", TestConverter_Array_Doubles), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Floats", TestConverter_Array_Floats), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Strings", TestConverter_Array_Strings), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Booleans", TestConverter_Array_Booleans), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Nulls", TestConverter_Array_Nulls), + NL_TEST_DEF("Test Json Tlv Converter - Structure with Unsigned Integer", TestConverter_Struct_UInt), + NL_TEST_DEF("Test Json Tlv Converter - Structure Elements with Mixed Tags", TestConverter_Struct_MixedTags), + NL_TEST_DEF("Test Json Tlv Converter - Structure with Mixed Elements", TestConverter_Struct_MixedElements), + NL_TEST_DEF("Test Json Tlv Converter - Array of Structures with Mixed Elements", TestConverter_Array_Structures), + NL_TEST_DEF("Test Json Tlv Converter - Top-Level Structure with Mixed Elements", TestConverter_TopLevel_MixedElements), + NL_TEST_DEF("Test Json Tlv Converter - Complex Structure from the README File", TestConverter_Structure_FromReadme), + NL_TEST_DEF("Test Json Tlv Converter - Tlv to Json Error Cases", TestConverter_TlvToJson_ErrorCases), + NL_TEST_DEF("Test Json Tlv Converter - Json To Tlv Error Cases", TestConverter_JsonToTlv_ErrorCases), + NL_TEST_SENTINEL() +}; + +} // namespace + +int TestJsonToTlvToJson() +{ + nlTestSuite theSuite = { "JsonToTlvToJson", sTests, Initialize, Finalize }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestJsonToTlvToJson) diff --git a/src/lib/support/tests/TestTlvJson.cpp b/src/lib/support/tests/TestTlvJson.cpp new file mode 100644 index 00000000000000..95a8967820317e --- /dev/null +++ b/src/lib/support/tests/TestTlvJson.cpp @@ -0,0 +1,259 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip::Encoding; +using namespace chip; +using namespace chip::app; + +System::TLVPacketBufferBackingStore gStore; +TLV::TLVWriter gWriter; +TLV::TLVReader gReader; +nlTestSuite * gSuite; + +void SetupBuf() +{ + System::PacketBufferHandle buf; + + buf = System::PacketBufferHandle::New(1024); + gStore.Init(std::move(buf)); + + gWriter.Init(gStore); + gReader.Init(gStore); +} + +CHIP_ERROR SetupReader() +{ + gReader.Init(gStore); + return gReader.Next(); +} + +bool Matches(const char * referenceString, Json::Value & generatedValue) +{ + auto generatedStr = JsonToString(generatedValue); + + // Normalize the reference string to the expected compact value. + Json::Reader reader; + Json::Value referenceValue; + reader.parse(referenceString, referenceValue); + + Json::FastWriter writer; + writer.omitEndingLineFeed(); + auto compactReferenceString = writer.write(referenceValue); + + auto matches = (generatedStr == compactReferenceString); + + if (!matches) + { + printf("Didn't match!\n"); + printf("Reference:\n"); + printf("%s\n", compactReferenceString.c_str()); + + printf("Generated:\n"); + printf("%s\n", generatedStr.c_str()); + } + + return matches; +} + +template +void EncodeAndValidate(T val, const char * expectedJsonString) +{ + CHIP_ERROR err; + + SetupBuf(); + + err = DataModel::Encode(gWriter, TLV::AnonymousTag(), val); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter.Finalize(); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = SetupReader(); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + Json::Value d; + err = TlvToJson(gReader, d); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + bool matches = Matches(expectedJsonString, d); + NL_TEST_ASSERT(gSuite, matches); +} + +void TestConverter(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + EncodeAndValidate(static_cast(30), + "{\n" + " \"value\" : 30\n" + "}\n"); + + EncodeAndValidate(static_cast(-30), + "{\n" + " \"value\" : -30\n" + "}\n"); + + EncodeAndValidate(false, + "{\n" + " \"value\" : false\n" + "}\n"); + + EncodeAndValidate(true, + "{\n" + " \"value\" : true\n" + "}\n"); + + EncodeAndValidate(1.0, + "{\n" + " \"value\" : 1.0\n" + "}\n"); + + const char charBuf[] = "hello"; + CharSpan charSpan(charBuf); + EncodeAndValidate(charSpan, + "{\n" + " \"value\" : \"hello\"\n" + "}\n"); + + // + // Validated using https://base64.guru/converter/encode/hex + // + const uint8_t byteBuf[] = { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0x99, 0x88, 0xdd, 0xcd }; + ByteSpan byteSpan(byteBuf); + EncodeAndValidate(byteSpan, + "{\n" + " \"value\" : \"base64:AQIDBP/+mYjdzQ==\"\n" + "}\n"); + + DataModel::Nullable nullValue; + EncodeAndValidate(nullValue, + "{\n" + " \"value\" : null\n" + "}\n"); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structVal; + structVal.a = 20; + structVal.b = true; + structVal.d = byteBuf; + structVal.e = charSpan; + structVal.g = 1.0; + structVal.h = 1.0; + + EncodeAndValidate(structVal, + "{\n" + " \"value\" : {\n" + " \"0\" : 20,\n" + " \"1\" : true,\n" + " \"2\" : 0,\n" + " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" + " \"4\" : \"hello\",\n" + " \"5\" : 0,\n" + " \"6\" : 1.0,\n" + " \"7\" : 1.0\n" + " }\n" + "}\n"); + + uint8_t int8uListData[] = { 1, 2, 3, 4 }; + DataModel::List int8uList; + + int8uList = int8uListData; + + EncodeAndValidate(int8uList, + "{\n" + " \"value\" : [ 1, 2, 3, 4 ]\n" + "}\n"); + + int8uList = {}; + EncodeAndValidate(int8uList, + "{\n" + " \"value\" : []\n" + "}\n"); + + DataModel::Nullable> nullValueList; + EncodeAndValidate(nullValueList, + "{\n" + " \"value\" : null\n" + "}\n"); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal }; + DataModel::List structList; + + structList = structListData; + + EncodeAndValidate(structList, + "{\n" + " \"value\" : [\n" + " {\n" + " \"0\" : 20,\n" + " \"1\" : true,\n" + " \"2\" : 0,\n" + " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" + " \"4\" : \"hello\",\n" + " \"5\" : 0,\n" + " \"6\" : 1.0,\n" + " \"7\" : 1.0\n" + " },\n" + " {\n" + " \"0\" : 20,\n" + " \"1\" : true,\n" + " \"2\" : 0,\n" + " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" + " \"4\" : \"hello\",\n" + " \"5\" : 0,\n" + " \"6\" : 1.0,\n" + " \"7\" : 1.0\n" + " }\n" + " ]\n" + "}\n"); +} + +int Initialize(void * apSuite) +{ + VerifyOrReturnError(chip::Platform::MemoryInit() == CHIP_NO_ERROR, FAILURE); + return SUCCESS; +} + +int Finalize(void * aContext) +{ + (void) gStore.Release(); + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +const nlTest sTests[] = { NL_TEST_DEF("TestConverter", TestConverter), NL_TEST_SENTINEL() }; + +} // namespace + +int TestTlvJson() +{ + nlTestSuite theSuite = { "TlvJson", sTests, Initialize, Finalize }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestTlvJson) diff --git a/src/lib/support/tests/TestTlvToJson.cpp b/src/lib/support/tests/TestTlvToJson.cpp index 95a8967820317e..5e4bb77cb9ef13 100644 --- a/src/lib/support/tests/TestTlvToJson.cpp +++ b/src/lib/support/tests/TestTlvToJson.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-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. @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,20 +52,12 @@ CHIP_ERROR SetupReader() return gReader.Next(); } -bool Matches(const char * referenceString, Json::Value & generatedValue) +bool Matches(const std::string & referenceString, const std::string & generatedString) { - auto generatedStr = JsonToString(generatedValue); + auto compactReferenceString = PrettyPrintJsonString(referenceString); + auto compactGeneratedString = PrettyPrintJsonString(generatedString); - // Normalize the reference string to the expected compact value. - Json::Reader reader; - Json::Value referenceValue; - reader.parse(referenceString, referenceValue); - - Json::FastWriter writer; - writer.omitEndingLineFeed(); - auto compactReferenceString = writer.write(referenceValue); - - auto matches = (generatedStr == compactReferenceString); + auto matches = (compactGeneratedString == compactReferenceString); if (!matches) { @@ -74,20 +66,27 @@ bool Matches(const char * referenceString, Json::Value & generatedValue) printf("%s\n", compactReferenceString.c_str()); printf("Generated:\n"); - printf("%s\n", generatedStr.c_str()); + printf("%s\n", compactGeneratedString.c_str()); } return matches; } template -void EncodeAndValidate(T val, const char * expectedJsonString) +void EncodeAndValidate(T val, const std::string & expectedJsonString) { CHIP_ERROR err; + TLV::TLVType container; SetupBuf(); - err = DataModel::Encode(gWriter, TLV::AnonymousTag(), val); + err = gWriter.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, container); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = DataModel::Encode(gWriter, TLV::ContextTag(1), val); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter.EndContainer(container); NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); err = gWriter.Finalize(); @@ -96,65 +95,69 @@ void EncodeAndValidate(T val, const char * expectedJsonString) err = SetupReader(); NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); - Json::Value d; - err = TlvToJson(gReader, d); + std::string jsonString; + err = TlvToJson(gReader, jsonString); NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); - bool matches = Matches(expectedJsonString, d); + bool matches = Matches(expectedJsonString, jsonString); NL_TEST_ASSERT(gSuite, matches); } void TestConverter(nlTestSuite * inSuite, void * inContext) { + std::string jsonString; + gSuite = inSuite; - EncodeAndValidate(static_cast(30), - "{\n" - " \"value\" : 30\n" - "}\n"); - - EncodeAndValidate(static_cast(-30), - "{\n" - " \"value\" : -30\n" - "}\n"); - - EncodeAndValidate(false, - "{\n" - " \"value\" : false\n" - "}\n"); - - EncodeAndValidate(true, - "{\n" - " \"value\" : true\n" - "}\n"); - - EncodeAndValidate(1.0, - "{\n" - " \"value\" : 1.0\n" - "}\n"); - - const char charBuf[] = "hello"; - CharSpan charSpan(charBuf); - EncodeAndValidate(charSpan, - "{\n" - " \"value\" : \"hello\"\n" - "}\n"); - - // + jsonString = "{\n" + " \"1:UINT\" : 30\n" + "}\n"; + EncodeAndValidate(static_cast(30), jsonString); + + jsonString = "{\n" + " \"1:INT\" : -30\n" + "}\n"; + EncodeAndValidate(static_cast(-30), jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : false\n" + "}\n"; + EncodeAndValidate(false, jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : true\n" + "}\n"; + EncodeAndValidate(true, jsonString); + + jsonString = "{\n" + " \"1:FLOAT\" : 1.0\n" + "}\n"; + EncodeAndValidate(static_cast(1.0), jsonString); + + jsonString = "{\n" + " \"1:DOUBLE\" : 1.0\n" + "}\n"; + EncodeAndValidate(static_cast(1.0), jsonString); + + CharSpan charSpan = CharSpan::fromCharString("hello"); + jsonString = "{\n" + " \"1:STRING\" : \"hello\"\n" + "}\n"; + EncodeAndValidate(charSpan, jsonString); + // Validated using https://base64.guru/converter/encode/hex - // const uint8_t byteBuf[] = { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0x99, 0x88, 0xdd, 0xcd }; ByteSpan byteSpan(byteBuf); - EncodeAndValidate(byteSpan, - "{\n" - " \"value\" : \"base64:AQIDBP/+mYjdzQ==\"\n" - "}\n"); + jsonString = "{\n" + " \"1:BYTES\" : \"AQIDBP/+mYjdzQ==\"\n" + "}\n"; + EncodeAndValidate(byteSpan, jsonString); DataModel::Nullable nullValue; - EncodeAndValidate(nullValue, - "{\n" - " \"value\" : null\n" - "}\n"); + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + EncodeAndValidate(nullValue, jsonString); Clusters::UnitTesting::Structs::SimpleStruct::Type structVal; structVal.a = 20; @@ -164,72 +167,70 @@ void TestConverter(nlTestSuite * inSuite, void * inContext) structVal.g = 1.0; structVal.h = 1.0; - EncodeAndValidate(structVal, - "{\n" - " \"value\" : {\n" - " \"0\" : 20,\n" - " \"1\" : true,\n" - " \"2\" : 0,\n" - " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" - " \"4\" : \"hello\",\n" - " \"5\" : 0,\n" - " \"6\" : 1.0,\n" - " \"7\" : 1.0\n" - " }\n" - "}\n"); + jsonString = "{\n" + " \"1:STRUCT\" : {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + "}\n"; + EncodeAndValidate(structVal, jsonString); uint8_t int8uListData[] = { 1, 2, 3, 4 }; DataModel::List int8uList; - int8uList = int8uListData; + int8uList = int8uListData; + jsonString = "{\n" + " \"1:ARRAY-UINT\" : [ 1, 2, 3, 4 ]\n" + "}\n"; + EncodeAndValidate(int8uList, jsonString); - EncodeAndValidate(int8uList, - "{\n" - " \"value\" : [ 1, 2, 3, 4 ]\n" - "}\n"); - - int8uList = {}; - EncodeAndValidate(int8uList, - "{\n" - " \"value\" : []\n" - "}\n"); + int8uList = {}; + jsonString = "{\n" + " \"1:ARRAY-?\" : [ ]\n" + "}\n"; + EncodeAndValidate(int8uList, jsonString); DataModel::Nullable> nullValueList; - EncodeAndValidate(nullValueList, - "{\n" - " \"value\" : null\n" - "}\n"); + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + EncodeAndValidate(nullValueList, jsonString); Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal }; DataModel::List structList; structList = structListData; - - EncodeAndValidate(structList, - "{\n" - " \"value\" : [\n" - " {\n" - " \"0\" : 20,\n" - " \"1\" : true,\n" - " \"2\" : 0,\n" - " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" - " \"4\" : \"hello\",\n" - " \"5\" : 0,\n" - " \"6\" : 1.0,\n" - " \"7\" : 1.0\n" - " },\n" - " {\n" - " \"0\" : 20,\n" - " \"1\" : true,\n" - " \"2\" : 0,\n" - " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" - " \"4\" : \"hello\",\n" - " \"5\" : 0,\n" - " \"6\" : 1.0,\n" - " \"7\" : 1.0\n" - " }\n" - " ]\n" - "}\n"); + jsonString = "{\n" + " \"1:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " },\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + " ]\n" + "}\n"; + EncodeAndValidate(structList, jsonString); } int Initialize(void * apSuite) @@ -249,11 +250,11 @@ const nlTest sTests[] = { NL_TEST_DEF("TestConverter", TestConverter), NL_TEST_S } // namespace -int TestTlvJson() +int TestTlvToJson() { - nlTestSuite theSuite = { "TlvJson", sTests, Initialize, Finalize }; + nlTestSuite theSuite = { "TlvToJson", sTests, Initialize, Finalize }; nlTestRunner(&theSuite, nullptr); return nlTestRunnerStats(&theSuite); } -CHIP_REGISTER_TEST_SUITE(TestTlvJson) +CHIP_REGISTER_TEST_SUITE(TestTlvToJson) From fe75cd11c1c0beef163e9b60f3552668311af336 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 20:38:35 -0400 Subject: [PATCH 159/159] Reduce the size of FabricInfo by reordering some members. (#28278) * Reduce the size of FabricInfo by reordering some members. On 32-bit systems this changes the size from 152 bytes to 144 bytes. On 64-bit systems this changes the size from 168 bytes to 152 bytes. * Address review comment. * Remove static asserts, because offsetof is not happy on FabricInfo. --- src/credentials/FabricTable.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 60cd54df220041..26102984e81130 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -220,18 +220,27 @@ class DLL_EXPORT FabricInfo return TLV::EstimateStructOverhead(sizeof(uint16_t), Crypto::P256SerializedKeypair::Capacity()); } - NodeId mNodeId = kUndefinedNodeId; - FabricId mFabricId = kUndefinedFabricId; - FabricIndex mFabricIndex = kUndefinedFabricIndex; + NodeId mNodeId = kUndefinedNodeId; + FabricId mFabricId = kUndefinedFabricId; // We cache the compressed fabric id since it's used so often and costly to get. CompressedFabricId mCompressedFabricId = kUndefinedCompressedFabricId; // We cache the root public key since it's used so often and costly to get. Crypto::P256PublicKey mRootPublicKey; - VendorId mVendorId = VendorId::NotSpecified; + // mFabricLabel is 33 bytes, so ends on a 1 mod 4 byte boundary. char mFabricLabel[kFabricLabelMaxLengthInBytes + 1] = { '\0' }; - mutable Crypto::P256Keypair * mOperationalKey = nullptr; - bool mHasExternallyOwnedOperationalKey = false; + + // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey are 4 bytes + // and do not end up with any padding if they come after the 33-byte + // mFabricLabel, so end on a 1 mod 4 byte boundary. + FabricIndex mFabricIndex = kUndefinedFabricIndex; + VendorId mVendorId = VendorId::NotSpecified; + bool mHasExternallyOwnedOperationalKey = false; + + // 3 bytes of padding here, since mOperationalKey needs to be void*-aligned, + // so has to be at a 0 mod 4 byte location. + + mutable Crypto::P256Keypair * mOperationalKey = nullptr; CHIP_ERROR CommitToStorage(PersistentStorageDelegate * storage) const; CHIP_ERROR LoadFromStorage(PersistentStorageDelegate * storage, FabricIndex newFabricIndex, const ByteSpan & rcac,