From 143bc7caf1cf292b2abac87d87735b241a6b7c4b Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Tue, 1 Oct 2024 16:54:13 +0200 Subject: [PATCH 1/9] [Testing] Convenience property for checking PICS_SDK_CI_ONLY (#35860) --- docs/testing/python.md | 5 ++++- src/python_testing/MinimalRepresentation.py | 3 +-- src/python_testing/TC_BRBINFO_4_1.py | 1 - src/python_testing/TC_CCTRL_2_2.py | 12 +++++------- src/python_testing/TC_CCTRL_2_3.py | 3 +-- src/python_testing/TC_DA_1_2.py | 5 ++--- src/python_testing/TC_DeviceBasicComposition.py | 3 +-- src/python_testing/TC_DeviceConformance.py | 3 +-- src/python_testing/TC_MCORE_FS_1_1.py | 7 +++---- src/python_testing/TC_MCORE_FS_1_2.py | 3 +-- src/python_testing/TC_MCORE_FS_1_3.py | 3 +-- src/python_testing/TC_MCORE_FS_1_4.py | 5 ++--- src/python_testing/TC_MCORE_FS_1_5.py | 3 +-- src/python_testing/TC_pics_checker.py | 2 +- src/python_testing/drlk_2_x_common.py | 3 +-- src/python_testing/matter_testing_support.py | 10 ++++++---- 16 files changed, 31 insertions(+), 40 deletions(-) diff --git a/docs/testing/python.md b/docs/testing/python.md index 9c2edcfc85caf0..07e157c459f8cd 100644 --- a/docs/testing/python.md +++ b/docs/testing/python.md @@ -628,7 +628,10 @@ example DUT on the host and includes factory reset support - Don’t forget to set the PICS file to the ci-pics-values - If there are steps in your test that will fail on CI (e.g. test vendor checks), gate them on the PICS_SDK_CI_ONLY - - `is_ci = self.check_pics('PICS_SDK_CI_ONLY')` + - ```python + if not self.is_pics_sdk_ci_only: + ... # Step that will fail on CI + ``` The CI test runner uses a structured environment setup that can be declared using structured comments at the top of the test file. To use this structured diff --git a/src/python_testing/MinimalRepresentation.py b/src/python_testing/MinimalRepresentation.py index c4a19b76cbbf9f..c99919a9080a8b 100644 --- a/src/python_testing/MinimalRepresentation.py +++ b/src/python_testing/MinimalRepresentation.py @@ -129,8 +129,7 @@ def test_MinimalRepresentation(self): # Before we can generate a minimal representation, we need to make sure that the device is conformant. # Otherwise, the values we extract aren't fully informative. ignore_in_progress = self.user_params.get("ignore_in_progress", False) - is_ci = self.check_pics('PICS_SDK_CI_ONLY') - representation = self.GenerateMinimals(ignore_in_progress, is_ci) + representation = self.GenerateMinimals(ignore_in_progress, self.is_pics_sdk_ci_only) print(type(representation[0])) self.PrettyPrintRepresentation(representation) diff --git a/src/python_testing/TC_BRBINFO_4_1.py b/src/python_testing/TC_BRBINFO_4_1.py index 8b064a775f358b..32dd541d66f676 100644 --- a/src/python_testing/TC_BRBINFO_4_1.py +++ b/src/python_testing/TC_BRBINFO_4_1.py @@ -198,7 +198,6 @@ def resume_th_icd_server(self, check_state): @async_test_body async def test_TC_BRBINFO_4_1(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') icdm_cluster = Clusters.Objects.IcdManagement icdm_attributes = icdm_cluster.Attributes brb_info_cluster = Clusters.Objects.BridgedDeviceBasicInformation diff --git a/src/python_testing/TC_CCTRL_2_2.py b/src/python_testing/TC_CCTRL_2_2.py index 87849e40443d01..20a03e3bd6ef94 100644 --- a/src/python_testing/TC_CCTRL_2_2.py +++ b/src/python_testing/TC_CCTRL_2_2.py @@ -127,8 +127,6 @@ def default_timeout(self) -> int: @run_if_endpoint_matches(has_cluster(Clusters.CommissionerControl)) async def test_TC_CCTRL_2_2(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') - self.step(1) th_server_fabrics = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) self.step(2) @@ -192,7 +190,7 @@ async def test_TC_CCTRL_2_2(self): await self.send_single_cmd(cmd) self.step(12) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input("Approve Commissioning approval request using manufacturer specified mechanism") self.step(13) @@ -248,7 +246,7 @@ async def test_TC_CCTRL_2_2(self): self.step(19) logging.info("Test now waits for 30 seconds") - if not self.is_ci: + if not self.is_pics_sdk_ci_only: time.sleep(30) self.step(20) @@ -267,7 +265,7 @@ async def test_TC_CCTRL_2_2(self): await self.send_single_cmd(cmd) self.step(23) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input("Approve Commissioning approval request using manufacturer specified mechanism") self.step(24) @@ -295,13 +293,13 @@ async def test_TC_CCTRL_2_2(self): await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) self.step(27) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: time.sleep(30) self.step(28) th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) # TODO: this should be mocked too. - if not self.is_ci: + if not self.is_pics_sdk_ci_only: asserts.assert_equal(len(th_server_fabrics) + 1, len(th_server_fabrics_new), "Unexpected number of fabrics on TH_SERVER") diff --git a/src/python_testing/TC_CCTRL_2_3.py b/src/python_testing/TC_CCTRL_2_3.py index 2c1c20e17f309f..95bd546c8a6b0c 100644 --- a/src/python_testing/TC_CCTRL_2_3.py +++ b/src/python_testing/TC_CCTRL_2_3.py @@ -111,7 +111,6 @@ def default_timeout(self) -> int: @run_if_endpoint_matches(has_cluster(Clusters.CommissionerControl)) async def test_TC_CCTRL_2_3(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') self.step(1) th_server_fabrics = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) @@ -129,7 +128,7 @@ async def test_TC_CCTRL_2_3(self): await self.send_single_cmd(cmd=cmd) self.step(5) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input("Approve Commissioning approval request using manufacturer specified mechanism") self.step(6) diff --git a/src/python_testing/TC_DA_1_2.py b/src/python_testing/TC_DA_1_2.py index 30a5285a4a4b68..a8b9dbf3cd414a 100644 --- a/src/python_testing/TC_DA_1_2.py +++ b/src/python_testing/TC_DA_1_2.py @@ -175,7 +175,6 @@ def steps_TC_DA_1_2(self): @async_test_body async def test_TC_DA_1_2(self): - is_ci = self.check_pics('PICS_SDK_CI_ONLY') cd_cert_dir = self.user_params.get("cd_cert_dir", 'credentials/development/cd-certs') post_cert_test = self.user_params.get("post_cert_test", False) @@ -311,7 +310,7 @@ async def test_TC_DA_1_2(self): asserts.assert_equal(format_version, 1, "Format version is incorrect") self.step("6.2") asserts.assert_equal(vendor_id, basic_info_vendor_id, "Vendor ID is incorrect") - if not is_ci: + if not self.is_pics_sdk_ci_only: asserts.assert_in(vendor_id, range(1, 0xfff0), "Vendor ID is out of range") self.step("6.3") asserts.assert_true(basic_info_product_id in product_id_array, "Product ID not found in CD product array") @@ -328,7 +327,7 @@ async def test_TC_DA_1_2(self): self.step("6.9") if post_cert_test: asserts.assert_equal(certification_type, 2, "Certification declaration is not marked as production.") - elif is_ci: + elif self.is_pics_sdk_ci_only: asserts.assert_in(certification_type, [0, 1, 2], "Certification type is out of range") else: asserts.assert_in(certification_type, [1, 2], "Certification type is out of range") diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index a4ab495114a245..31d8bfb76c545e 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -455,8 +455,7 @@ class RequiredMandatoryAttribute: self.print_step( 6, "Validate that none of the global attribute IDs contain values with prefixes outside of the allowed standard or MEI prefix range") - is_ci = self.check_pics('PICS_SDK_CI_ONLY') - if is_ci: + if self.is_pics_sdk_ci_only: # test vendor prefixes are allowed in the CI because we use them internally in examples bad_prefix_min = 0xFFF5_0000 else: diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 86a981c86cde15..2d03e8f326e09a 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -356,9 +356,8 @@ def test_TC_IDM_10_2(self): # TODO: Turn this off after TE2 # https://github.com/project-chip/connectedhomeip/issues/34615 ignore_in_progress = self.user_params.get("ignore_in_progress", True) - is_ci = self.check_pics('PICS_SDK_CI_ONLY') allow_provisional = self.user_params.get("allow_provisional", False) - success, problems = self.check_conformance(ignore_in_progress, is_ci, allow_provisional) + success, problems = self.check_conformance(ignore_in_progress, self.is_pics_sdk_ci_only, allow_provisional) self.problems.extend(problems) if not success: self.fail_current_test("Problems with conformance") diff --git a/src/python_testing/TC_MCORE_FS_1_1.py b/src/python_testing/TC_MCORE_FS_1_1.py index 0d77bad8c6f268..c2f38a766670fc 100755 --- a/src/python_testing/TC_MCORE_FS_1_1.py +++ b/src/python_testing/TC_MCORE_FS_1_1.py @@ -133,7 +133,6 @@ def default_timeout(self) -> int: @async_test_body async def test_TC_MCORE_FS_1_1(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') # TODO this value should either be determined or passed in from command line dut_commissioning_control_endpoint = 0 self.step(1) @@ -152,7 +151,7 @@ async def test_TC_MCORE_FS_1_1(self): requestID=good_request_id, vendorID=th_fsa_server_vid, productID=th_fsa_server_pid, label="Test Ecosystem") await self.send_single_cmd(cmd, endpoint=dut_commissioning_control_endpoint) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input("Approve Commissioning approval request on DUT using manufacturer specified mechanism") if not events: @@ -181,12 +180,12 @@ async def test_TC_MCORE_FS_1_1(self): await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) self.step("3c") - if not self.is_ci: + if not self.is_pics_sdk_ci_only: time.sleep(30) th_fsa_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) # TODO: this should be mocked too. - if not self.is_ci: + if not self.is_pics_sdk_ci_only: asserts.assert_equal(len(th_fsa_server_fabrics) + 1, len(th_fsa_server_fabrics_new), "Unexpected number of fabrics on TH_SERVER") diff --git a/src/python_testing/TC_MCORE_FS_1_2.py b/src/python_testing/TC_MCORE_FS_1_2.py index 7be1bf96063c2e..f1cba9a4c5db5e 100644 --- a/src/python_testing/TC_MCORE_FS_1_2.py +++ b/src/python_testing/TC_MCORE_FS_1_2.py @@ -148,7 +148,6 @@ def default_timeout(self) -> int: @async_test_body async def test_TC_MCORE_FS_1_2(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') min_report_interval_sec = self.user_params.get("min_report_interval_sec", 0) max_report_interval_sec = self.user_params.get("max_report_interval_sec", 30) @@ -176,7 +175,7 @@ async def test_TC_MCORE_FS_1_2(self): asserts.assert_true(type_matches(step_1_dut_parts_list, list), "PartsList is expected to be a list") self.step(2) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params) else: self.dut_fsa_stdin.write( diff --git a/src/python_testing/TC_MCORE_FS_1_3.py b/src/python_testing/TC_MCORE_FS_1_3.py index e57487a24966a2..9dbdabb1abbca7 100644 --- a/src/python_testing/TC_MCORE_FS_1_3.py +++ b/src/python_testing/TC_MCORE_FS_1_3.py @@ -124,7 +124,7 @@ async def commission_via_commissioner_control(self, controller_node_id: int, dev ), ) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input("Approve Commissioning Approval Request on DUT using manufacturer specified mechanism") resp = await self.send_single_cmd( @@ -152,7 +152,6 @@ async def commission_via_commissioner_control(self, controller_node_id: int, dev @async_test_body async def test_TC_MCORE_FS_1_3(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') # Commissioning - done self.step(0) diff --git a/src/python_testing/TC_MCORE_FS_1_4.py b/src/python_testing/TC_MCORE_FS_1_4.py index d76b0625202e1f..26e5d470ce4e92 100644 --- a/src/python_testing/TC_MCORE_FS_1_4.py +++ b/src/python_testing/TC_MCORE_FS_1_4.py @@ -195,7 +195,6 @@ def steps_TC_MCORE_FS_1_4(self) -> list[TestStep]: @async_test_body async def test_TC_MCORE_FS_1_4(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') # Commissioning - done self.step(0) @@ -298,7 +297,7 @@ async def test_TC_MCORE_FS_1_4(self): self.step(4) # Commissioning TH_FSA_BRIDGE to DUT_FSA fabric. - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input( f"Commission TH_FSA's aggregator on DUT using manufacturer specified mechanism.\n" f"Use the following parameters:\n" @@ -326,7 +325,7 @@ async def test_TC_MCORE_FS_1_4(self): )) # Synchronize TH_SERVER_NO_UID from TH_FSA to DUT_FSA fabric. - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self.wait_for_user_input( f"Synchronize endpoint from TH_FSA's aggregator to DUT using manufacturer specified mechanism.\n" f"Use the following parameters:\n" diff --git a/src/python_testing/TC_MCORE_FS_1_5.py b/src/python_testing/TC_MCORE_FS_1_5.py index 4a395f787496e9..b8794c400356c1 100755 --- a/src/python_testing/TC_MCORE_FS_1_5.py +++ b/src/python_testing/TC_MCORE_FS_1_5.py @@ -155,7 +155,6 @@ def default_timeout(self) -> int: @async_test_body async def test_TC_MCORE_FS_1_5(self): - self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') min_report_interval_sec = 0 max_report_interval_sec = 30 @@ -183,7 +182,7 @@ async def test_TC_MCORE_FS_1_5(self): asserts.assert_true(type_matches(step_1_dut_parts_list, list), "PartsList is expected to be a list") self.step(2) - if not self.is_ci: + if not self.is_pics_sdk_ci_only: self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params) else: self.dut_fsa_stdin.write( diff --git a/src/python_testing/TC_pics_checker.py b/src/python_testing/TC_pics_checker.py index f63628fd4eb426..91e2102b5ec46d 100644 --- a/src/python_testing/TC_pics_checker.py +++ b/src/python_testing/TC_pics_checker.py @@ -177,7 +177,7 @@ def test_TC_IDM_10_4(self): self._check_and_record_errors(location, required, pics) self.step(7) - if self.check_pics('PICS_SDK_CI_ONLY'): + if self.is_pics_sdk_ci_only: self.record_error("PICS check", location=ProblemLocation(), problem="PICS PICS_SDK_CI_ONLY found in PICS list. This PICS is disallowed for certification.") self.success = False diff --git a/src/python_testing/drlk_2_x_common.py b/src/python_testing/drlk_2_x_common.py index c25365bf993d8f..044128d0d383e0 100644 --- a/src/python_testing/drlk_2_x_common.py +++ b/src/python_testing/drlk_2_x_common.py @@ -121,7 +121,6 @@ async def teardown(self): credentials=self.createdCredential, userIndex=self.user_index) async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lockUnlockText, doAutoRelockTest): - is_ci = self.check_pics('PICS_SDK_CI_ONLY') self.clear_credential_and_user_flag = True # Allow for user overrides of these values @@ -131,7 +130,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo userCodeTemporaryDisableTime = self.user_params.get("user_code_temporary_disable_time", 15) wrongCodeEntryLimit = self.user_params.get("wrong_code_entry_limit", 3) autoRelockTime = self.user_params.get("auto_relock_time", 60) - if is_ci: + if self.is_pics_sdk_ci_only: autoRelockTime = 10 cluster = Clusters.Objects.DoorLock diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index c5d46e2306dae2..2b9ccb0f286613 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -1008,7 +1008,7 @@ def write_to_app_pipe(self, command_dict: dict, app_pipe_name: Optional[str] = N Use the following environment variables: - - LINUX_DUT_IP + - LINUX_DUT_IP * if not provided, the Matter app is assumed to run on the same machine as the test, such as during CI, and the commands are sent to it using a local named pipe * if provided, the commands for writing to the named pipe are forwarded to the DUT @@ -1128,9 +1128,11 @@ def teardown_class(self): super().teardown_class() def check_pics(self, pics_key: str) -> bool: - picsd = self.matter_test_config.pics - pics_key = pics_key.strip() - return pics_key in picsd and picsd[pics_key] + return self.matter_test_config.pics.get(pics_key.strip(), False) + + @property + def is_pics_sdk_ci_only(self) -> bool: + return self.check_pics('PICS_SDK_CI_ONLY') async def openCommissioningWindow(self, dev_ctrl: ChipDeviceCtrl, node_id: int) -> CustomCommissioningParameters: rnd_discriminator = random.randint(0, 4095) From 3b9df6d5b662acdbd212da0842e07d0456d3e79d Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 1 Oct 2024 08:00:32 -0700 Subject: [PATCH 2/9] DM XMLs: Take spec scrape for 1.4 at 0.9 ballot (#35858) * DM XML: Scrape spec at 0.9 sha * DM XMLs: rename in-progress directory to 1.4 Also flip the default in the spec parsing to use 1.4 --- .../clusters/ACL-Cluster.xml | 0 .../clusters/AccountLogin.xml | 0 .../clusters/AdminCommissioningCluster.xml | 0 .../clusters/AirQuality.xml | 0 .../clusters/AlarmBase.xml | 0 .../clusters/ApplicationBasic.xml | 0 .../clusters/ApplicationLauncher.xml | 0 .../clusters/AudioOutput.xml | 0 .../clusters/BallastConfiguration.xml | 0 .../clusters/BasicInformationCluster.xml | 7 +- .../clusters/Binding-Cluster.xml | 0 .../clusters/BooleanState.xml | 0 .../clusters/BooleanStateConfiguration.xml | 0 .../{in_progress => 1.4}/clusters/Channel.xml | 0 .../clusters/ColorControl.xml | 0 .../clusters/CommissionerControlCluster.xml | 2 +- .../clusters/ConcentrationMeasurement.xml | 0 .../clusters/ContentAppObserver.xml | 0 .../clusters/ContentControl.xml | 0 .../clusters/ContentLauncher.xml | 0 .../clusters/DemandResponseLoadControl.xml | 0 .../clusters/Descriptor-Cluster.xml | 0 .../clusters/DeviceEnergyManagement.xml | 0 .../clusters/DiagnosticLogsCluster.xml | 0 .../clusters/DiagnosticsEthernet.xml | 0 .../clusters/DiagnosticsGeneral.xml | 1 + .../clusters/DiagnosticsSoftware.xml | 0 .../clusters/DiagnosticsThread.xml | 0 .../clusters/DiagnosticsWiFi.xml | 0 .../clusters/DishwasherAlarm.xml | 0 .../clusters/DoorLock.xml | 0 .../clusters/ElectricalEnergyMeasurement.xml | 0 .../clusters/ElectricalPowerMeasurement.xml | 0 .../clusters/EnergyCalendar.xml | 0 .../clusters/EnergyEVSE.xml | 0 .../clusters/EnergyPreference.xml | 0 .../clusters/FanControl.xml | 0 .../clusters/FlowMeasurement.xml | 0 .../clusters/GeneralCommissioningCluster.xml | 86 ++++++++++++++----- .../clusters/Group-Key-Management-Cluster.xml | 2 +- .../{in_progress => 1.4}/clusters/Groups.xml | 0 .../clusters/Humidistat.xml | 0 .../clusters/ICDManagement.xml | 54 +++++++++++- .../clusters/Identify.xml | 0 .../clusters/IlluminanceMeasurement.xml | 0 .../clusters/JointFabricDatastoreCluster.xml | 4 +- .../clusters/JointFabricPKICluster.xml | 11 +-- .../clusters/KeypadInput.xml | 0 .../Label-Cluster-FixedLabelCluster.xml | 0 .../clusters/Label-Cluster-LabelCluster.xml | 0 .../Label-Cluster-UserLabelCluster.xml | 0 .../clusters/LaundryDryerControls.xml | 0 .../clusters/LaundryWasherControls.xml | 0 .../clusters/LevelControl.xml | 3 +- .../clusters/LocalizationConfiguration.xml | 0 .../clusters/LocalizationTimeFormat.xml | 0 .../clusters/LocalizationUnit.xml | 0 .../clusters/LowPower.xml | 0 .../clusters/MediaInput.xml | 0 .../clusters/MediaPlayback.xml | 0 .../clusters/Messages.xml | 0 .../clusters/MicrowaveOvenControl.xml | 0 .../clusters/ModeBase.xml | 0 .../clusters/ModeSelect.xml | 0 .../clusters/Mode_DeviceEnergyManagement.xml | 0 .../clusters/Mode_Dishwasher.xml | 0 .../clusters/Mode_EVSE.xml | 0 .../clusters/Mode_LaundryWasher.xml | 0 .../clusters/Mode_MicrowaveOven.xml | 0 .../clusters/Mode_Oven.xml | 0 .../clusters/Mode_RVCClean.xml | 0 .../clusters/Mode_RVCRun.xml | 0 .../clusters/Mode_Refrigerator.xml | 0 .../clusters/Mode_WaterHeater.xml | 0 .../clusters/NetworkCommissioningCluster.xml | 4 +- .../clusters/OTAProvider.xml | 0 .../clusters/OTARequestor.xml | 0 .../clusters/OccupancySensing.xml | 0 .../{in_progress => 1.4}/clusters/OnOff.xml | 0 .../clusters/OperationalCredentialCluster.xml | 2 +- .../clusters/OperationalState.xml | 0 .../clusters/OperationalState_Oven.xml | 0 .../clusters/OperationalState_RVC.xml | 0 .../clusters/PowerSourceCluster.xml | 6 +- .../PowerSourceConfigurationCluster.xml | 0 .../clusters/PowerTopology.xml | 0 .../clusters/PressureMeasurement.xml | 0 .../clusters/ProxyConfiguration-Cluster.xml | 0 .../clusters/ProxyDiscovery-Cluster.xml | 0 .../clusters/PumpConfigurationControl.xml | 0 .../clusters/RefrigeratorAlarm.xml | 0 .../clusters/ResourceMonitoring.xml | 0 .../{in_progress => 1.4}/clusters/Scenes.xml | 0 .../clusters/ServiceArea.xml | 1 - .../clusters/SmokeCOAlarm.xml | 0 .../{in_progress => 1.4}/clusters/Switch.xml | 0 .../clusters/TargetNavigator.xml | 0 .../clusters/TemperatureControl.xml | 0 .../clusters/TemperatureMeasurement.xml | 0 .../clusters/Thermostat.xml | 0 .../ThermostatUserInterfaceConfiguration.xml | 0 .../clusters/ThreadBorderRouterManagement.xml | 0 .../clusters/ThreadNetworkDirectory.xml | 0 .../clusters/TimeSync.xml | 0 .../clusters/ValidProxies-Cluster.xml | 0 .../clusters/ValveConfigurationControl.xml | 0 .../clusters/WakeOnLAN.xml | 0 .../clusters/WaterContentMeasurement.xml | 0 .../clusters/WaterHeaterManagement.xml | 0 .../clusters/WiFiNetworkManagement.xml | 0 .../clusters/WindowCovering.xml | 47 ++++++---- .../bridge-clusters-ActionsCluster.xml | 2 + ...s-BridgedDeviceBasicInformationCluster.xml | 5 +- ...e-clusters-EcosystemInformationCluster.xml | 14 --- .../clusters/cluster_ids.json | 0 .../device_types/Aggregator.xml | 9 +- .../device_types/AirPurifier.xml | 0 .../device_types/AirQualitySensor.xml | 0 .../device_types/BaseDeviceType.xml | 0 .../device_types/BasicVideoPlayer.xml | 0 .../device_types/BatteryStorage.xml | 0 .../device_types/BridgedNode.xml | 17 +++- .../device_types/CastingVideoClient.xml | 0 .../device_types/CastingVideoPlayer.xml | 0 .../device_types/ColorDimmerSwitch.xml | 0 .../device_types/ColorTemperatureLight.xml | 0 .../device_types/ContactSensor.xml | 0 .../device_types/ContentApp.xml | 0 .../device_types/ControlBridge.xml | 0 .../device_types/CookSurface.xml | 0 .../device_types/Cooktop.xml | 0 .../device_types/DeviceEnergyManagement.xml | 0 .../device_types/DimmableLight.xml | 0 .../device_types/DimmablePlug-InUnit.xml | 0 .../device_types/DimmerSwitch.xml | 0 .../device_types/Dishwasher.xml | 0 .../device_types/DoorLock.xml | 1 + .../device_types/DoorLockController.xml | 0 .../device_types/EVSE.xml | 0 .../device_types/ElectricalSensor.xml | 0 .../device_types/EnergyTariff.xml | 0 .../device_types/EnergyTariffCalendar.xml | 0 .../device_types/ExtendedColorLight.xml | 0 .../device_types/ExtractorHood.xml | 0 .../{in_progress => 1.4}/device_types/Fan.xml | 0 .../device_types/FlowSensor.xml | 0 .../device_types/GenericSwitch.xml | 0 .../device_types/HeatPump.xml | 0 .../device_types/HumidifierDehumidifier.xml | 0 .../device_types/HumiditySensor.xml | 0 .../device_types/JointFabricAdmin.xml | 0 .../device_types/LaundryDryer.xml | 0 .../device_types/LaundryWasher.xml | 0 .../device_types/LightSensor.xml | 0 .../device_types/MicrowaveOven.xml | 0 .../device_types/ModeSelectDeviceType.xml | 0 .../MountedDimmableLoadControl.xml | 0 .../device_types/MountedOnOffControl.xml | 0 .../device_types/NetworkInfraIntro.xml | 0 .../device_types/NetworkInfraManager.xml | 2 +- .../device_types/OccupancySensor.xml | 0 .../device_types/OnOffLight.xml | 0 .../device_types/OnOffLightSwitch.xml | 0 .../device_types/OnOffPlug-inUnit.xml | 0 .../device_types/OnOffSensor.xml | 0 .../device_types/OtaProvider.xml | 0 .../device_types/OtaRequestor.xml | 0 .../device_types/Oven.xml | 0 .../device_types/PowerSource.xml | 0 .../device_types/PressureSensor.xml | 0 .../device_types/Pump.xml | 0 .../device_types/PumpController.xml | 0 .../device_types/RainSensor.xml | 0 .../device_types/Refrigerator.xml | 0 .../device_types/RoboticVacuumCleaner.xml | 6 +- .../device_types/RoomAirConditioner.xml | 0 .../device_types/RootNodeDeviceType.xml | 10 ++- .../SecondaryNetworkInterface.xml | 0 .../device_types/SmokeCOAlarm.xml | 0 .../device_types/SolarPower.xml | 0 .../device_types/Speaker.xml | 0 .../TemperatureControlledCabinet.xml | 0 .../device_types/TemperatureSensor.xml | 0 .../device_types/Thermostat.xml | 0 .../device_types/ThreadBorderRouter.xml | 0 .../device_types/VideoRemoteControl.xml | 0 .../device_types/WaterFreezeDetector.xml | 0 .../device_types/WaterHeater.xml | 6 -- .../device_types/WaterLeakDetector.xml | 0 .../device_types/WaterValve.xml | 0 .../device_types/WindowCovering.xml | 0 .../device_types/WindowCoveringController.xml | 0 .../{in_progress => 1.4}/scraper_version | 0 data_model/1.4/spec_sha | 1 + data_model/in_progress/spec_sha | 1 - src/python_testing/TestSpecParsingSupport.py | 22 ++--- src/python_testing/spec_parsing_support.py | 10 +-- 197 files changed, 227 insertions(+), 109 deletions(-) rename data_model/{in_progress => 1.4}/clusters/ACL-Cluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/AccountLogin.xml (100%) rename data_model/{in_progress => 1.4}/clusters/AdminCommissioningCluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/AirQuality.xml (100%) rename data_model/{in_progress => 1.4}/clusters/AlarmBase.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ApplicationBasic.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ApplicationLauncher.xml (100%) rename data_model/{in_progress => 1.4}/clusters/AudioOutput.xml (100%) rename data_model/{in_progress => 1.4}/clusters/BallastConfiguration.xml (100%) rename data_model/{in_progress => 1.4}/clusters/BasicInformationCluster.xml (97%) rename data_model/{in_progress => 1.4}/clusters/Binding-Cluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/BooleanState.xml (100%) rename data_model/{in_progress => 1.4}/clusters/BooleanStateConfiguration.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Channel.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ColorControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/CommissionerControlCluster.xml (98%) rename data_model/{in_progress => 1.4}/clusters/ConcentrationMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ContentAppObserver.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ContentControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ContentLauncher.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DemandResponseLoadControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Descriptor-Cluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DeviceEnergyManagement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DiagnosticLogsCluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DiagnosticsEthernet.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DiagnosticsGeneral.xml (99%) rename data_model/{in_progress => 1.4}/clusters/DiagnosticsSoftware.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DiagnosticsThread.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DiagnosticsWiFi.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DishwasherAlarm.xml (100%) rename data_model/{in_progress => 1.4}/clusters/DoorLock.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ElectricalEnergyMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ElectricalPowerMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/EnergyCalendar.xml (100%) rename data_model/{in_progress => 1.4}/clusters/EnergyEVSE.xml (100%) rename data_model/{in_progress => 1.4}/clusters/EnergyPreference.xml (100%) rename data_model/{in_progress => 1.4}/clusters/FanControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/FlowMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/GeneralCommissioningCluster.xml (82%) rename data_model/{in_progress => 1.4}/clusters/Group-Key-Management-Cluster.xml (99%) rename data_model/{in_progress => 1.4}/clusters/Groups.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Humidistat.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ICDManagement.xml (81%) rename data_model/{in_progress => 1.4}/clusters/Identify.xml (100%) rename data_model/{in_progress => 1.4}/clusters/IlluminanceMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/JointFabricDatastoreCluster.xml (99%) rename data_model/{in_progress => 1.4}/clusters/JointFabricPKICluster.xml (95%) rename data_model/{in_progress => 1.4}/clusters/KeypadInput.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Label-Cluster-FixedLabelCluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Label-Cluster-LabelCluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Label-Cluster-UserLabelCluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/LaundryDryerControls.xml (100%) rename data_model/{in_progress => 1.4}/clusters/LaundryWasherControls.xml (100%) rename data_model/{in_progress => 1.4}/clusters/LevelControl.xml (98%) rename data_model/{in_progress => 1.4}/clusters/LocalizationConfiguration.xml (100%) rename data_model/{in_progress => 1.4}/clusters/LocalizationTimeFormat.xml (100%) rename data_model/{in_progress => 1.4}/clusters/LocalizationUnit.xml (100%) rename data_model/{in_progress => 1.4}/clusters/LowPower.xml (100%) rename data_model/{in_progress => 1.4}/clusters/MediaInput.xml (100%) rename data_model/{in_progress => 1.4}/clusters/MediaPlayback.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Messages.xml (100%) rename data_model/{in_progress => 1.4}/clusters/MicrowaveOvenControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ModeBase.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ModeSelect.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_DeviceEnergyManagement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_Dishwasher.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_EVSE.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_LaundryWasher.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_MicrowaveOven.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_Oven.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_RVCClean.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_RVCRun.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_Refrigerator.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Mode_WaterHeater.xml (100%) rename data_model/{in_progress => 1.4}/clusters/NetworkCommissioningCluster.xml (99%) rename data_model/{in_progress => 1.4}/clusters/OTAProvider.xml (100%) rename data_model/{in_progress => 1.4}/clusters/OTARequestor.xml (100%) rename data_model/{in_progress => 1.4}/clusters/OccupancySensing.xml (100%) rename data_model/{in_progress => 1.4}/clusters/OnOff.xml (100%) rename data_model/{in_progress => 1.4}/clusters/OperationalCredentialCluster.xml (99%) rename data_model/{in_progress => 1.4}/clusters/OperationalState.xml (100%) rename data_model/{in_progress => 1.4}/clusters/OperationalState_Oven.xml (100%) rename data_model/{in_progress => 1.4}/clusters/OperationalState_RVC.xml (100%) rename data_model/{in_progress => 1.4}/clusters/PowerSourceCluster.xml (99%) rename data_model/{in_progress => 1.4}/clusters/PowerSourceConfigurationCluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/PowerTopology.xml (100%) rename data_model/{in_progress => 1.4}/clusters/PressureMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ProxyConfiguration-Cluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ProxyDiscovery-Cluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/PumpConfigurationControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/RefrigeratorAlarm.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ResourceMonitoring.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Scenes.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ServiceArea.xml (99%) rename data_model/{in_progress => 1.4}/clusters/SmokeCOAlarm.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Switch.xml (100%) rename data_model/{in_progress => 1.4}/clusters/TargetNavigator.xml (100%) rename data_model/{in_progress => 1.4}/clusters/TemperatureControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/TemperatureMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/Thermostat.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ThermostatUserInterfaceConfiguration.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ThreadBorderRouterManagement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ThreadNetworkDirectory.xml (100%) rename data_model/{in_progress => 1.4}/clusters/TimeSync.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ValidProxies-Cluster.xml (100%) rename data_model/{in_progress => 1.4}/clusters/ValveConfigurationControl.xml (100%) rename data_model/{in_progress => 1.4}/clusters/WakeOnLAN.xml (100%) rename data_model/{in_progress => 1.4}/clusters/WaterContentMeasurement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/WaterHeaterManagement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/WiFiNetworkManagement.xml (100%) rename data_model/{in_progress => 1.4}/clusters/WindowCovering.xml (96%) rename data_model/{in_progress => 1.4}/clusters/bridge-clusters-ActionsCluster.xml (98%) rename data_model/{in_progress => 1.4}/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml (97%) rename data_model/{in_progress => 1.4}/clusters/bridge-clusters-EcosystemInformationCluster.xml (87%) rename data_model/{in_progress => 1.4}/clusters/cluster_ids.json (100%) rename data_model/{in_progress => 1.4}/device_types/Aggregator.xml (90%) rename data_model/{in_progress => 1.4}/device_types/AirPurifier.xml (100%) rename data_model/{in_progress => 1.4}/device_types/AirQualitySensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/BaseDeviceType.xml (100%) rename data_model/{in_progress => 1.4}/device_types/BasicVideoPlayer.xml (100%) rename data_model/{in_progress => 1.4}/device_types/BatteryStorage.xml (100%) rename data_model/{in_progress => 1.4}/device_types/BridgedNode.xml (86%) rename data_model/{in_progress => 1.4}/device_types/CastingVideoClient.xml (100%) rename data_model/{in_progress => 1.4}/device_types/CastingVideoPlayer.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ColorDimmerSwitch.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ColorTemperatureLight.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ContactSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ContentApp.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ControlBridge.xml (100%) rename data_model/{in_progress => 1.4}/device_types/CookSurface.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Cooktop.xml (100%) rename data_model/{in_progress => 1.4}/device_types/DeviceEnergyManagement.xml (100%) rename data_model/{in_progress => 1.4}/device_types/DimmableLight.xml (100%) rename data_model/{in_progress => 1.4}/device_types/DimmablePlug-InUnit.xml (100%) rename data_model/{in_progress => 1.4}/device_types/DimmerSwitch.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Dishwasher.xml (100%) rename data_model/{in_progress => 1.4}/device_types/DoorLock.xml (98%) rename data_model/{in_progress => 1.4}/device_types/DoorLockController.xml (100%) rename data_model/{in_progress => 1.4}/device_types/EVSE.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ElectricalSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/EnergyTariff.xml (100%) rename data_model/{in_progress => 1.4}/device_types/EnergyTariffCalendar.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ExtendedColorLight.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ExtractorHood.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Fan.xml (100%) rename data_model/{in_progress => 1.4}/device_types/FlowSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/GenericSwitch.xml (100%) rename data_model/{in_progress => 1.4}/device_types/HeatPump.xml (100%) rename data_model/{in_progress => 1.4}/device_types/HumidifierDehumidifier.xml (100%) rename data_model/{in_progress => 1.4}/device_types/HumiditySensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/JointFabricAdmin.xml (100%) rename data_model/{in_progress => 1.4}/device_types/LaundryDryer.xml (100%) rename data_model/{in_progress => 1.4}/device_types/LaundryWasher.xml (100%) rename data_model/{in_progress => 1.4}/device_types/LightSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/MicrowaveOven.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ModeSelectDeviceType.xml (100%) rename data_model/{in_progress => 1.4}/device_types/MountedDimmableLoadControl.xml (100%) rename data_model/{in_progress => 1.4}/device_types/MountedOnOffControl.xml (100%) rename data_model/{in_progress => 1.4}/device_types/NetworkInfraIntro.xml (100%) rename data_model/{in_progress => 1.4}/device_types/NetworkInfraManager.xml (97%) rename data_model/{in_progress => 1.4}/device_types/OccupancySensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/OnOffLight.xml (100%) rename data_model/{in_progress => 1.4}/device_types/OnOffLightSwitch.xml (100%) rename data_model/{in_progress => 1.4}/device_types/OnOffPlug-inUnit.xml (100%) rename data_model/{in_progress => 1.4}/device_types/OnOffSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/OtaProvider.xml (100%) rename data_model/{in_progress => 1.4}/device_types/OtaRequestor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Oven.xml (100%) rename data_model/{in_progress => 1.4}/device_types/PowerSource.xml (100%) rename data_model/{in_progress => 1.4}/device_types/PressureSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Pump.xml (100%) rename data_model/{in_progress => 1.4}/device_types/PumpController.xml (100%) rename data_model/{in_progress => 1.4}/device_types/RainSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Refrigerator.xml (100%) rename data_model/{in_progress => 1.4}/device_types/RoboticVacuumCleaner.xml (93%) rename data_model/{in_progress => 1.4}/device_types/RoomAirConditioner.xml (100%) rename data_model/{in_progress => 1.4}/device_types/RootNodeDeviceType.xml (94%) rename data_model/{in_progress => 1.4}/device_types/SecondaryNetworkInterface.xml (100%) rename data_model/{in_progress => 1.4}/device_types/SmokeCOAlarm.xml (100%) rename data_model/{in_progress => 1.4}/device_types/SolarPower.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Speaker.xml (100%) rename data_model/{in_progress => 1.4}/device_types/TemperatureControlledCabinet.xml (100%) rename data_model/{in_progress => 1.4}/device_types/TemperatureSensor.xml (100%) rename data_model/{in_progress => 1.4}/device_types/Thermostat.xml (100%) rename data_model/{in_progress => 1.4}/device_types/ThreadBorderRouter.xml (100%) rename data_model/{in_progress => 1.4}/device_types/VideoRemoteControl.xml (100%) rename data_model/{in_progress => 1.4}/device_types/WaterFreezeDetector.xml (100%) rename data_model/{in_progress => 1.4}/device_types/WaterHeater.xml (93%) rename data_model/{in_progress => 1.4}/device_types/WaterLeakDetector.xml (100%) rename data_model/{in_progress => 1.4}/device_types/WaterValve.xml (100%) rename data_model/{in_progress => 1.4}/device_types/WindowCovering.xml (100%) rename data_model/{in_progress => 1.4}/device_types/WindowCoveringController.xml (100%) rename data_model/{in_progress => 1.4}/scraper_version (100%) create mode 100644 data_model/1.4/spec_sha delete mode 100644 data_model/in_progress/spec_sha diff --git a/data_model/in_progress/clusters/ACL-Cluster.xml b/data_model/1.4/clusters/ACL-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ACL-Cluster.xml rename to data_model/1.4/clusters/ACL-Cluster.xml diff --git a/data_model/in_progress/clusters/AccountLogin.xml b/data_model/1.4/clusters/AccountLogin.xml similarity index 100% rename from data_model/in_progress/clusters/AccountLogin.xml rename to data_model/1.4/clusters/AccountLogin.xml diff --git a/data_model/in_progress/clusters/AdminCommissioningCluster.xml b/data_model/1.4/clusters/AdminCommissioningCluster.xml similarity index 100% rename from data_model/in_progress/clusters/AdminCommissioningCluster.xml rename to data_model/1.4/clusters/AdminCommissioningCluster.xml diff --git a/data_model/in_progress/clusters/AirQuality.xml b/data_model/1.4/clusters/AirQuality.xml similarity index 100% rename from data_model/in_progress/clusters/AirQuality.xml rename to data_model/1.4/clusters/AirQuality.xml diff --git a/data_model/in_progress/clusters/AlarmBase.xml b/data_model/1.4/clusters/AlarmBase.xml similarity index 100% rename from data_model/in_progress/clusters/AlarmBase.xml rename to data_model/1.4/clusters/AlarmBase.xml diff --git a/data_model/in_progress/clusters/ApplicationBasic.xml b/data_model/1.4/clusters/ApplicationBasic.xml similarity index 100% rename from data_model/in_progress/clusters/ApplicationBasic.xml rename to data_model/1.4/clusters/ApplicationBasic.xml diff --git a/data_model/in_progress/clusters/ApplicationLauncher.xml b/data_model/1.4/clusters/ApplicationLauncher.xml similarity index 100% rename from data_model/in_progress/clusters/ApplicationLauncher.xml rename to data_model/1.4/clusters/ApplicationLauncher.xml diff --git a/data_model/in_progress/clusters/AudioOutput.xml b/data_model/1.4/clusters/AudioOutput.xml similarity index 100% rename from data_model/in_progress/clusters/AudioOutput.xml rename to data_model/1.4/clusters/AudioOutput.xml diff --git a/data_model/in_progress/clusters/BallastConfiguration.xml b/data_model/1.4/clusters/BallastConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/BallastConfiguration.xml rename to data_model/1.4/clusters/BallastConfiguration.xml diff --git a/data_model/in_progress/clusters/BasicInformationCluster.xml b/data_model/1.4/clusters/BasicInformationCluster.xml similarity index 97% rename from data_model/in_progress/clusters/BasicInformationCluster.xml rename to data_model/1.4/clusters/BasicInformationCluster.xml index 168a0353761159..483cd643e65bda 100644 --- a/data_model/in_progress/clusters/BasicInformationCluster.xml +++ b/data_model/1.4/clusters/BasicInformationCluster.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA - + @@ -303,11 +303,6 @@ Davis, CA 95616, USA - - - - - diff --git a/data_model/in_progress/clusters/Binding-Cluster.xml b/data_model/1.4/clusters/Binding-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/Binding-Cluster.xml rename to data_model/1.4/clusters/Binding-Cluster.xml diff --git a/data_model/in_progress/clusters/BooleanState.xml b/data_model/1.4/clusters/BooleanState.xml similarity index 100% rename from data_model/in_progress/clusters/BooleanState.xml rename to data_model/1.4/clusters/BooleanState.xml diff --git a/data_model/in_progress/clusters/BooleanStateConfiguration.xml b/data_model/1.4/clusters/BooleanStateConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/BooleanStateConfiguration.xml rename to data_model/1.4/clusters/BooleanStateConfiguration.xml diff --git a/data_model/in_progress/clusters/Channel.xml b/data_model/1.4/clusters/Channel.xml similarity index 100% rename from data_model/in_progress/clusters/Channel.xml rename to data_model/1.4/clusters/Channel.xml diff --git a/data_model/in_progress/clusters/ColorControl.xml b/data_model/1.4/clusters/ColorControl.xml similarity index 100% rename from data_model/in_progress/clusters/ColorControl.xml rename to data_model/1.4/clusters/ColorControl.xml diff --git a/data_model/in_progress/clusters/CommissionerControlCluster.xml b/data_model/1.4/clusters/CommissionerControlCluster.xml similarity index 98% rename from data_model/in_progress/clusters/CommissionerControlCluster.xml rename to data_model/1.4/clusters/CommissionerControlCluster.xml index d3b8380aaba929..d02e9592ee232d 100644 --- a/data_model/in_progress/clusters/CommissionerControlCluster.xml +++ b/data_model/1.4/clusters/CommissionerControlCluster.xml @@ -116,7 +116,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/ConcentrationMeasurement.xml b/data_model/1.4/clusters/ConcentrationMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/ConcentrationMeasurement.xml rename to data_model/1.4/clusters/ConcentrationMeasurement.xml diff --git a/data_model/in_progress/clusters/ContentAppObserver.xml b/data_model/1.4/clusters/ContentAppObserver.xml similarity index 100% rename from data_model/in_progress/clusters/ContentAppObserver.xml rename to data_model/1.4/clusters/ContentAppObserver.xml diff --git a/data_model/in_progress/clusters/ContentControl.xml b/data_model/1.4/clusters/ContentControl.xml similarity index 100% rename from data_model/in_progress/clusters/ContentControl.xml rename to data_model/1.4/clusters/ContentControl.xml diff --git a/data_model/in_progress/clusters/ContentLauncher.xml b/data_model/1.4/clusters/ContentLauncher.xml similarity index 100% rename from data_model/in_progress/clusters/ContentLauncher.xml rename to data_model/1.4/clusters/ContentLauncher.xml diff --git a/data_model/in_progress/clusters/DemandResponseLoadControl.xml b/data_model/1.4/clusters/DemandResponseLoadControl.xml similarity index 100% rename from data_model/in_progress/clusters/DemandResponseLoadControl.xml rename to data_model/1.4/clusters/DemandResponseLoadControl.xml diff --git a/data_model/in_progress/clusters/Descriptor-Cluster.xml b/data_model/1.4/clusters/Descriptor-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/Descriptor-Cluster.xml rename to data_model/1.4/clusters/Descriptor-Cluster.xml diff --git a/data_model/in_progress/clusters/DeviceEnergyManagement.xml b/data_model/1.4/clusters/DeviceEnergyManagement.xml similarity index 100% rename from data_model/in_progress/clusters/DeviceEnergyManagement.xml rename to data_model/1.4/clusters/DeviceEnergyManagement.xml diff --git a/data_model/in_progress/clusters/DiagnosticLogsCluster.xml b/data_model/1.4/clusters/DiagnosticLogsCluster.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticLogsCluster.xml rename to data_model/1.4/clusters/DiagnosticLogsCluster.xml diff --git a/data_model/in_progress/clusters/DiagnosticsEthernet.xml b/data_model/1.4/clusters/DiagnosticsEthernet.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsEthernet.xml rename to data_model/1.4/clusters/DiagnosticsEthernet.xml diff --git a/data_model/in_progress/clusters/DiagnosticsGeneral.xml b/data_model/1.4/clusters/DiagnosticsGeneral.xml similarity index 99% rename from data_model/in_progress/clusters/DiagnosticsGeneral.xml rename to data_model/1.4/clusters/DiagnosticsGeneral.xml index 1266705ba6d0dc..44b891fbcd6ea4 100644 --- a/data_model/in_progress/clusters/DiagnosticsGeneral.xml +++ b/data_model/1.4/clusters/DiagnosticsGeneral.xml @@ -263,6 +263,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/clusters/DiagnosticsSoftware.xml b/data_model/1.4/clusters/DiagnosticsSoftware.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsSoftware.xml rename to data_model/1.4/clusters/DiagnosticsSoftware.xml diff --git a/data_model/in_progress/clusters/DiagnosticsThread.xml b/data_model/1.4/clusters/DiagnosticsThread.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsThread.xml rename to data_model/1.4/clusters/DiagnosticsThread.xml diff --git a/data_model/in_progress/clusters/DiagnosticsWiFi.xml b/data_model/1.4/clusters/DiagnosticsWiFi.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsWiFi.xml rename to data_model/1.4/clusters/DiagnosticsWiFi.xml diff --git a/data_model/in_progress/clusters/DishwasherAlarm.xml b/data_model/1.4/clusters/DishwasherAlarm.xml similarity index 100% rename from data_model/in_progress/clusters/DishwasherAlarm.xml rename to data_model/1.4/clusters/DishwasherAlarm.xml diff --git a/data_model/in_progress/clusters/DoorLock.xml b/data_model/1.4/clusters/DoorLock.xml similarity index 100% rename from data_model/in_progress/clusters/DoorLock.xml rename to data_model/1.4/clusters/DoorLock.xml diff --git a/data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml b/data_model/1.4/clusters/ElectricalEnergyMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml rename to data_model/1.4/clusters/ElectricalEnergyMeasurement.xml diff --git a/data_model/in_progress/clusters/ElectricalPowerMeasurement.xml b/data_model/1.4/clusters/ElectricalPowerMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/ElectricalPowerMeasurement.xml rename to data_model/1.4/clusters/ElectricalPowerMeasurement.xml diff --git a/data_model/in_progress/clusters/EnergyCalendar.xml b/data_model/1.4/clusters/EnergyCalendar.xml similarity index 100% rename from data_model/in_progress/clusters/EnergyCalendar.xml rename to data_model/1.4/clusters/EnergyCalendar.xml diff --git a/data_model/in_progress/clusters/EnergyEVSE.xml b/data_model/1.4/clusters/EnergyEVSE.xml similarity index 100% rename from data_model/in_progress/clusters/EnergyEVSE.xml rename to data_model/1.4/clusters/EnergyEVSE.xml diff --git a/data_model/in_progress/clusters/EnergyPreference.xml b/data_model/1.4/clusters/EnergyPreference.xml similarity index 100% rename from data_model/in_progress/clusters/EnergyPreference.xml rename to data_model/1.4/clusters/EnergyPreference.xml diff --git a/data_model/in_progress/clusters/FanControl.xml b/data_model/1.4/clusters/FanControl.xml similarity index 100% rename from data_model/in_progress/clusters/FanControl.xml rename to data_model/1.4/clusters/FanControl.xml diff --git a/data_model/in_progress/clusters/FlowMeasurement.xml b/data_model/1.4/clusters/FlowMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/FlowMeasurement.xml rename to data_model/1.4/clusters/FlowMeasurement.xml diff --git a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml b/data_model/1.4/clusters/GeneralCommissioningCluster.xml similarity index 82% rename from data_model/in_progress/clusters/GeneralCommissioningCluster.xml rename to data_model/1.4/clusters/GeneralCommissioningCluster.xml index a569fef5d44118..01450f959dfea3 100644 --- a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml +++ b/data_model/1.4/clusters/GeneralCommissioningCluster.xml @@ -64,6 +64,11 @@ Davis, CA 95616, USA + + + + + @@ -81,6 +86,21 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + @@ -131,37 +151,52 @@ Davis, CA 95616, USA - - - + + + + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + @@ -223,9 +258,12 @@ Davis, CA 95616, USA - - - + + + + + + @@ -234,9 +272,15 @@ Davis, CA 95616, USA - - - + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml b/data_model/1.4/clusters/Group-Key-Management-Cluster.xml similarity index 99% rename from data_model/in_progress/clusters/Group-Key-Management-Cluster.xml rename to data_model/1.4/clusters/Group-Key-Management-Cluster.xml index 784bdc903ec186..1974047c01acf0 100644 --- a/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml +++ b/data_model/1.4/clusters/Group-Key-Management-Cluster.xml @@ -220,7 +220,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/Groups.xml b/data_model/1.4/clusters/Groups.xml similarity index 100% rename from data_model/in_progress/clusters/Groups.xml rename to data_model/1.4/clusters/Groups.xml diff --git a/data_model/in_progress/clusters/Humidistat.xml b/data_model/1.4/clusters/Humidistat.xml similarity index 100% rename from data_model/in_progress/clusters/Humidistat.xml rename to data_model/1.4/clusters/Humidistat.xml diff --git a/data_model/in_progress/clusters/ICDManagement.xml b/data_model/1.4/clusters/ICDManagement.xml similarity index 81% rename from data_model/in_progress/clusters/ICDManagement.xml rename to data_model/1.4/clusters/ICDManagement.xml index 830f62fba2a63f..b6f76f48e2b137 100644 --- a/data_model/in_progress/clusters/ICDManagement.xml +++ b/data_model/1.4/clusters/ICDManagement.xml @@ -103,7 +103,6 @@ Davis, CA 95616, USA - @@ -112,6 +111,59 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data_model/in_progress/clusters/Identify.xml b/data_model/1.4/clusters/Identify.xml similarity index 100% rename from data_model/in_progress/clusters/Identify.xml rename to data_model/1.4/clusters/Identify.xml diff --git a/data_model/in_progress/clusters/IlluminanceMeasurement.xml b/data_model/1.4/clusters/IlluminanceMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/IlluminanceMeasurement.xml rename to data_model/1.4/clusters/IlluminanceMeasurement.xml diff --git a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml b/data_model/1.4/clusters/JointFabricDatastoreCluster.xml similarity index 99% rename from data_model/in_progress/clusters/JointFabricDatastoreCluster.xml rename to data_model/1.4/clusters/JointFabricDatastoreCluster.xml index 137edd2857f74d..4557cfae7fdf41 100644 --- a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml +++ b/data_model/1.4/clusters/JointFabricDatastoreCluster.xml @@ -60,7 +60,9 @@ Davis, CA 95616, USA - + + + diff --git a/data_model/in_progress/clusters/JointFabricPKICluster.xml b/data_model/1.4/clusters/JointFabricPKICluster.xml similarity index 95% rename from data_model/in_progress/clusters/JointFabricPKICluster.xml rename to data_model/1.4/clusters/JointFabricPKICluster.xml index 847d2548e3b1f1..41c9823626b528 100644 --- a/data_model/in_progress/clusters/JointFabricPKICluster.xml +++ b/data_model/1.4/clusters/JointFabricPKICluster.xml @@ -60,7 +60,9 @@ Davis, CA 95616, USA - + + + @@ -121,18 +123,17 @@ Davis, CA 95616, USA - + - - + - + diff --git a/data_model/in_progress/clusters/KeypadInput.xml b/data_model/1.4/clusters/KeypadInput.xml similarity index 100% rename from data_model/in_progress/clusters/KeypadInput.xml rename to data_model/1.4/clusters/KeypadInput.xml diff --git a/data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml similarity index 100% rename from data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml rename to data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml diff --git a/data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-LabelCluster.xml similarity index 100% rename from data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml rename to data_model/1.4/clusters/Label-Cluster-LabelCluster.xml diff --git a/data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml similarity index 100% rename from data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml rename to data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml diff --git a/data_model/in_progress/clusters/LaundryDryerControls.xml b/data_model/1.4/clusters/LaundryDryerControls.xml similarity index 100% rename from data_model/in_progress/clusters/LaundryDryerControls.xml rename to data_model/1.4/clusters/LaundryDryerControls.xml diff --git a/data_model/in_progress/clusters/LaundryWasherControls.xml b/data_model/1.4/clusters/LaundryWasherControls.xml similarity index 100% rename from data_model/in_progress/clusters/LaundryWasherControls.xml rename to data_model/1.4/clusters/LaundryWasherControls.xml diff --git a/data_model/in_progress/clusters/LevelControl.xml b/data_model/1.4/clusters/LevelControl.xml similarity index 98% rename from data_model/in_progress/clusters/LevelControl.xml rename to data_model/1.4/clusters/LevelControl.xml index de342812287b0f..404b1250e90acc 100644 --- a/data_model/in_progress/clusters/LevelControl.xml +++ b/data_model/1.4/clusters/LevelControl.xml @@ -136,7 +136,7 @@ Davis, CA 95616, USA - + @@ -145,6 +145,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/clusters/LocalizationConfiguration.xml b/data_model/1.4/clusters/LocalizationConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/LocalizationConfiguration.xml rename to data_model/1.4/clusters/LocalizationConfiguration.xml diff --git a/data_model/in_progress/clusters/LocalizationTimeFormat.xml b/data_model/1.4/clusters/LocalizationTimeFormat.xml similarity index 100% rename from data_model/in_progress/clusters/LocalizationTimeFormat.xml rename to data_model/1.4/clusters/LocalizationTimeFormat.xml diff --git a/data_model/in_progress/clusters/LocalizationUnit.xml b/data_model/1.4/clusters/LocalizationUnit.xml similarity index 100% rename from data_model/in_progress/clusters/LocalizationUnit.xml rename to data_model/1.4/clusters/LocalizationUnit.xml diff --git a/data_model/in_progress/clusters/LowPower.xml b/data_model/1.4/clusters/LowPower.xml similarity index 100% rename from data_model/in_progress/clusters/LowPower.xml rename to data_model/1.4/clusters/LowPower.xml diff --git a/data_model/in_progress/clusters/MediaInput.xml b/data_model/1.4/clusters/MediaInput.xml similarity index 100% rename from data_model/in_progress/clusters/MediaInput.xml rename to data_model/1.4/clusters/MediaInput.xml diff --git a/data_model/in_progress/clusters/MediaPlayback.xml b/data_model/1.4/clusters/MediaPlayback.xml similarity index 100% rename from data_model/in_progress/clusters/MediaPlayback.xml rename to data_model/1.4/clusters/MediaPlayback.xml diff --git a/data_model/in_progress/clusters/Messages.xml b/data_model/1.4/clusters/Messages.xml similarity index 100% rename from data_model/in_progress/clusters/Messages.xml rename to data_model/1.4/clusters/Messages.xml diff --git a/data_model/in_progress/clusters/MicrowaveOvenControl.xml b/data_model/1.4/clusters/MicrowaveOvenControl.xml similarity index 100% rename from data_model/in_progress/clusters/MicrowaveOvenControl.xml rename to data_model/1.4/clusters/MicrowaveOvenControl.xml diff --git a/data_model/in_progress/clusters/ModeBase.xml b/data_model/1.4/clusters/ModeBase.xml similarity index 100% rename from data_model/in_progress/clusters/ModeBase.xml rename to data_model/1.4/clusters/ModeBase.xml diff --git a/data_model/in_progress/clusters/ModeSelect.xml b/data_model/1.4/clusters/ModeSelect.xml similarity index 100% rename from data_model/in_progress/clusters/ModeSelect.xml rename to data_model/1.4/clusters/ModeSelect.xml diff --git a/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml b/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml rename to data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml diff --git a/data_model/in_progress/clusters/Mode_Dishwasher.xml b/data_model/1.4/clusters/Mode_Dishwasher.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_Dishwasher.xml rename to data_model/1.4/clusters/Mode_Dishwasher.xml diff --git a/data_model/in_progress/clusters/Mode_EVSE.xml b/data_model/1.4/clusters/Mode_EVSE.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_EVSE.xml rename to data_model/1.4/clusters/Mode_EVSE.xml diff --git a/data_model/in_progress/clusters/Mode_LaundryWasher.xml b/data_model/1.4/clusters/Mode_LaundryWasher.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_LaundryWasher.xml rename to data_model/1.4/clusters/Mode_LaundryWasher.xml diff --git a/data_model/in_progress/clusters/Mode_MicrowaveOven.xml b/data_model/1.4/clusters/Mode_MicrowaveOven.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_MicrowaveOven.xml rename to data_model/1.4/clusters/Mode_MicrowaveOven.xml diff --git a/data_model/in_progress/clusters/Mode_Oven.xml b/data_model/1.4/clusters/Mode_Oven.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_Oven.xml rename to data_model/1.4/clusters/Mode_Oven.xml diff --git a/data_model/in_progress/clusters/Mode_RVCClean.xml b/data_model/1.4/clusters/Mode_RVCClean.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_RVCClean.xml rename to data_model/1.4/clusters/Mode_RVCClean.xml diff --git a/data_model/in_progress/clusters/Mode_RVCRun.xml b/data_model/1.4/clusters/Mode_RVCRun.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_RVCRun.xml rename to data_model/1.4/clusters/Mode_RVCRun.xml diff --git a/data_model/in_progress/clusters/Mode_Refrigerator.xml b/data_model/1.4/clusters/Mode_Refrigerator.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_Refrigerator.xml rename to data_model/1.4/clusters/Mode_Refrigerator.xml diff --git a/data_model/in_progress/clusters/Mode_WaterHeater.xml b/data_model/1.4/clusters/Mode_WaterHeater.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_WaterHeater.xml rename to data_model/1.4/clusters/Mode_WaterHeater.xml diff --git a/data_model/in_progress/clusters/NetworkCommissioningCluster.xml b/data_model/1.4/clusters/NetworkCommissioningCluster.xml similarity index 99% rename from data_model/in_progress/clusters/NetworkCommissioningCluster.xml rename to data_model/1.4/clusters/NetworkCommissioningCluster.xml index 1a511ed18fda3a..8ee15e1b47ad3d 100644 --- a/data_model/in_progress/clusters/NetworkCommissioningCluster.xml +++ b/data_model/1.4/clusters/NetworkCommissioningCluster.xml @@ -185,7 +185,7 @@ Davis, CA 95616, USA - + @@ -452,7 +452,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/OTAProvider.xml b/data_model/1.4/clusters/OTAProvider.xml similarity index 100% rename from data_model/in_progress/clusters/OTAProvider.xml rename to data_model/1.4/clusters/OTAProvider.xml diff --git a/data_model/in_progress/clusters/OTARequestor.xml b/data_model/1.4/clusters/OTARequestor.xml similarity index 100% rename from data_model/in_progress/clusters/OTARequestor.xml rename to data_model/1.4/clusters/OTARequestor.xml diff --git a/data_model/in_progress/clusters/OccupancySensing.xml b/data_model/1.4/clusters/OccupancySensing.xml similarity index 100% rename from data_model/in_progress/clusters/OccupancySensing.xml rename to data_model/1.4/clusters/OccupancySensing.xml diff --git a/data_model/in_progress/clusters/OnOff.xml b/data_model/1.4/clusters/OnOff.xml similarity index 100% rename from data_model/in_progress/clusters/OnOff.xml rename to data_model/1.4/clusters/OnOff.xml diff --git a/data_model/in_progress/clusters/OperationalCredentialCluster.xml b/data_model/1.4/clusters/OperationalCredentialCluster.xml similarity index 99% rename from data_model/in_progress/clusters/OperationalCredentialCluster.xml rename to data_model/1.4/clusters/OperationalCredentialCluster.xml index 338a8af007c5b9..26ae2c57a257b2 100644 --- a/data_model/in_progress/clusters/OperationalCredentialCluster.xml +++ b/data_model/1.4/clusters/OperationalCredentialCluster.xml @@ -264,7 +264,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/OperationalState.xml b/data_model/1.4/clusters/OperationalState.xml similarity index 100% rename from data_model/in_progress/clusters/OperationalState.xml rename to data_model/1.4/clusters/OperationalState.xml diff --git a/data_model/in_progress/clusters/OperationalState_Oven.xml b/data_model/1.4/clusters/OperationalState_Oven.xml similarity index 100% rename from data_model/in_progress/clusters/OperationalState_Oven.xml rename to data_model/1.4/clusters/OperationalState_Oven.xml diff --git a/data_model/in_progress/clusters/OperationalState_RVC.xml b/data_model/1.4/clusters/OperationalState_RVC.xml similarity index 100% rename from data_model/in_progress/clusters/OperationalState_RVC.xml rename to data_model/1.4/clusters/OperationalState_RVC.xml diff --git a/data_model/in_progress/clusters/PowerSourceCluster.xml b/data_model/1.4/clusters/PowerSourceCluster.xml similarity index 99% rename from data_model/in_progress/clusters/PowerSourceCluster.xml rename to data_model/1.4/clusters/PowerSourceCluster.xml index a0b6b91c565dd8..82491aaa741720 100644 --- a/data_model/in_progress/clusters/PowerSourceCluster.xml +++ b/data_model/1.4/clusters/PowerSourceCluster.xml @@ -67,10 +67,10 @@ Davis, CA 95616, USA - + - + @@ -636,7 +636,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml b/data_model/1.4/clusters/PowerSourceConfigurationCluster.xml similarity index 100% rename from data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml rename to data_model/1.4/clusters/PowerSourceConfigurationCluster.xml diff --git a/data_model/in_progress/clusters/PowerTopology.xml b/data_model/1.4/clusters/PowerTopology.xml similarity index 100% rename from data_model/in_progress/clusters/PowerTopology.xml rename to data_model/1.4/clusters/PowerTopology.xml diff --git a/data_model/in_progress/clusters/PressureMeasurement.xml b/data_model/1.4/clusters/PressureMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/PressureMeasurement.xml rename to data_model/1.4/clusters/PressureMeasurement.xml diff --git a/data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml b/data_model/1.4/clusters/ProxyConfiguration-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml rename to data_model/1.4/clusters/ProxyConfiguration-Cluster.xml diff --git a/data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml b/data_model/1.4/clusters/ProxyDiscovery-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml rename to data_model/1.4/clusters/ProxyDiscovery-Cluster.xml diff --git a/data_model/in_progress/clusters/PumpConfigurationControl.xml b/data_model/1.4/clusters/PumpConfigurationControl.xml similarity index 100% rename from data_model/in_progress/clusters/PumpConfigurationControl.xml rename to data_model/1.4/clusters/PumpConfigurationControl.xml diff --git a/data_model/in_progress/clusters/RefrigeratorAlarm.xml b/data_model/1.4/clusters/RefrigeratorAlarm.xml similarity index 100% rename from data_model/in_progress/clusters/RefrigeratorAlarm.xml rename to data_model/1.4/clusters/RefrigeratorAlarm.xml diff --git a/data_model/in_progress/clusters/ResourceMonitoring.xml b/data_model/1.4/clusters/ResourceMonitoring.xml similarity index 100% rename from data_model/in_progress/clusters/ResourceMonitoring.xml rename to data_model/1.4/clusters/ResourceMonitoring.xml diff --git a/data_model/in_progress/clusters/Scenes.xml b/data_model/1.4/clusters/Scenes.xml similarity index 100% rename from data_model/in_progress/clusters/Scenes.xml rename to data_model/1.4/clusters/Scenes.xml diff --git a/data_model/in_progress/clusters/ServiceArea.xml b/data_model/1.4/clusters/ServiceArea.xml similarity index 99% rename from data_model/in_progress/clusters/ServiceArea.xml rename to data_model/1.4/clusters/ServiceArea.xml index 2533d4b549d2f0..3ea629625cb1ee 100644 --- a/data_model/in_progress/clusters/ServiceArea.xml +++ b/data_model/1.4/clusters/ServiceArea.xml @@ -227,7 +227,6 @@ Davis, CA 95616, USA - diff --git a/data_model/in_progress/clusters/SmokeCOAlarm.xml b/data_model/1.4/clusters/SmokeCOAlarm.xml similarity index 100% rename from data_model/in_progress/clusters/SmokeCOAlarm.xml rename to data_model/1.4/clusters/SmokeCOAlarm.xml diff --git a/data_model/in_progress/clusters/Switch.xml b/data_model/1.4/clusters/Switch.xml similarity index 100% rename from data_model/in_progress/clusters/Switch.xml rename to data_model/1.4/clusters/Switch.xml diff --git a/data_model/in_progress/clusters/TargetNavigator.xml b/data_model/1.4/clusters/TargetNavigator.xml similarity index 100% rename from data_model/in_progress/clusters/TargetNavigator.xml rename to data_model/1.4/clusters/TargetNavigator.xml diff --git a/data_model/in_progress/clusters/TemperatureControl.xml b/data_model/1.4/clusters/TemperatureControl.xml similarity index 100% rename from data_model/in_progress/clusters/TemperatureControl.xml rename to data_model/1.4/clusters/TemperatureControl.xml diff --git a/data_model/in_progress/clusters/TemperatureMeasurement.xml b/data_model/1.4/clusters/TemperatureMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/TemperatureMeasurement.xml rename to data_model/1.4/clusters/TemperatureMeasurement.xml diff --git a/data_model/in_progress/clusters/Thermostat.xml b/data_model/1.4/clusters/Thermostat.xml similarity index 100% rename from data_model/in_progress/clusters/Thermostat.xml rename to data_model/1.4/clusters/Thermostat.xml diff --git a/data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml b/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml rename to data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml diff --git a/data_model/in_progress/clusters/ThreadBorderRouterManagement.xml b/data_model/1.4/clusters/ThreadBorderRouterManagement.xml similarity index 100% rename from data_model/in_progress/clusters/ThreadBorderRouterManagement.xml rename to data_model/1.4/clusters/ThreadBorderRouterManagement.xml diff --git a/data_model/in_progress/clusters/ThreadNetworkDirectory.xml b/data_model/1.4/clusters/ThreadNetworkDirectory.xml similarity index 100% rename from data_model/in_progress/clusters/ThreadNetworkDirectory.xml rename to data_model/1.4/clusters/ThreadNetworkDirectory.xml diff --git a/data_model/in_progress/clusters/TimeSync.xml b/data_model/1.4/clusters/TimeSync.xml similarity index 100% rename from data_model/in_progress/clusters/TimeSync.xml rename to data_model/1.4/clusters/TimeSync.xml diff --git a/data_model/in_progress/clusters/ValidProxies-Cluster.xml b/data_model/1.4/clusters/ValidProxies-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ValidProxies-Cluster.xml rename to data_model/1.4/clusters/ValidProxies-Cluster.xml diff --git a/data_model/in_progress/clusters/ValveConfigurationControl.xml b/data_model/1.4/clusters/ValveConfigurationControl.xml similarity index 100% rename from data_model/in_progress/clusters/ValveConfigurationControl.xml rename to data_model/1.4/clusters/ValveConfigurationControl.xml diff --git a/data_model/in_progress/clusters/WakeOnLAN.xml b/data_model/1.4/clusters/WakeOnLAN.xml similarity index 100% rename from data_model/in_progress/clusters/WakeOnLAN.xml rename to data_model/1.4/clusters/WakeOnLAN.xml diff --git a/data_model/in_progress/clusters/WaterContentMeasurement.xml b/data_model/1.4/clusters/WaterContentMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/WaterContentMeasurement.xml rename to data_model/1.4/clusters/WaterContentMeasurement.xml diff --git a/data_model/in_progress/clusters/WaterHeaterManagement.xml b/data_model/1.4/clusters/WaterHeaterManagement.xml similarity index 100% rename from data_model/in_progress/clusters/WaterHeaterManagement.xml rename to data_model/1.4/clusters/WaterHeaterManagement.xml diff --git a/data_model/in_progress/clusters/WiFiNetworkManagement.xml b/data_model/1.4/clusters/WiFiNetworkManagement.xml similarity index 100% rename from data_model/in_progress/clusters/WiFiNetworkManagement.xml rename to data_model/1.4/clusters/WiFiNetworkManagement.xml diff --git a/data_model/in_progress/clusters/WindowCovering.xml b/data_model/1.4/clusters/WindowCovering.xml similarity index 96% rename from data_model/in_progress/clusters/WindowCovering.xml rename to data_model/1.4/clusters/WindowCovering.xml index 09133513af736a..dd6d2293cc31f2 100644 --- a/data_model/in_progress/clusters/WindowCovering.xml +++ b/data_model/1.4/clusters/WindowCovering.xml @@ -305,23 +305,33 @@ Davis, CA 95616, USA - - + + - + + + - + + + - + + + - + + + - + + + @@ -343,10 +353,14 @@ Davis, CA 95616, USA - + + + - + + + @@ -480,7 +494,6 @@ Davis, CA 95616, USA - @@ -523,7 +536,7 @@ Davis, CA 95616, USA - + @@ -534,7 +547,7 @@ Davis, CA 95616, USA - + @@ -546,7 +559,7 @@ Davis, CA 95616, USA - + @@ -558,7 +571,7 @@ Davis, CA 95616, USA - + @@ -570,7 +583,7 @@ Davis, CA 95616, USA - + @@ -582,7 +595,7 @@ Davis, CA 95616, USA - + @@ -593,7 +606,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml b/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml similarity index 98% rename from data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml rename to data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml index 4874aca26bc504..354e24c424417d 100644 --- a/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml @@ -166,6 +166,7 @@ Davis, CA 95616, USA + @@ -189,6 +190,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml similarity index 97% rename from data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml rename to data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml index 62633f55cf08cc..3f7eda5f1ea87c 100644 --- a/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml @@ -62,7 +62,7 @@ Davis, CA 95616, USA - + @@ -141,9 +141,6 @@ Davis, CA 95616, USA - - - diff --git a/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml similarity index 87% rename from data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml rename to data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml index ddebe95679370e..67c2bbbd108cd0 100644 --- a/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml @@ -120,18 +120,4 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/clusters/cluster_ids.json b/data_model/1.4/clusters/cluster_ids.json similarity index 100% rename from data_model/in_progress/clusters/cluster_ids.json rename to data_model/1.4/clusters/cluster_ids.json diff --git a/data_model/in_progress/device_types/Aggregator.xml b/data_model/1.4/device_types/Aggregator.xml similarity index 90% rename from data_model/in_progress/device_types/Aggregator.xml rename to data_model/1.4/device_types/Aggregator.xml index a99ee1108c3b50..be604976521c54 100644 --- a/data_model/in_progress/device_types/Aggregator.xml +++ b/data_model/1.4/device_types/Aggregator.xml @@ -55,12 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + - @@ -68,5 +68,10 @@ Davis, CA 95616, USA + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/AirPurifier.xml b/data_model/1.4/device_types/AirPurifier.xml similarity index 100% rename from data_model/in_progress/device_types/AirPurifier.xml rename to data_model/1.4/device_types/AirPurifier.xml diff --git a/data_model/in_progress/device_types/AirQualitySensor.xml b/data_model/1.4/device_types/AirQualitySensor.xml similarity index 100% rename from data_model/in_progress/device_types/AirQualitySensor.xml rename to data_model/1.4/device_types/AirQualitySensor.xml diff --git a/data_model/in_progress/device_types/BaseDeviceType.xml b/data_model/1.4/device_types/BaseDeviceType.xml similarity index 100% rename from data_model/in_progress/device_types/BaseDeviceType.xml rename to data_model/1.4/device_types/BaseDeviceType.xml diff --git a/data_model/in_progress/device_types/BasicVideoPlayer.xml b/data_model/1.4/device_types/BasicVideoPlayer.xml similarity index 100% rename from data_model/in_progress/device_types/BasicVideoPlayer.xml rename to data_model/1.4/device_types/BasicVideoPlayer.xml diff --git a/data_model/in_progress/device_types/BatteryStorage.xml b/data_model/1.4/device_types/BatteryStorage.xml similarity index 100% rename from data_model/in_progress/device_types/BatteryStorage.xml rename to data_model/1.4/device_types/BatteryStorage.xml diff --git a/data_model/in_progress/device_types/BridgedNode.xml b/data_model/1.4/device_types/BridgedNode.xml similarity index 86% rename from data_model/in_progress/device_types/BridgedNode.xml rename to data_model/1.4/device_types/BridgedNode.xml index 6f309001975627..1ea7a1984f57f5 100644 --- a/data_model/in_progress/device_types/BridgedNode.xml +++ b/data_model/1.4/device_types/BridgedNode.xml @@ -55,13 +55,13 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + - @@ -79,5 +79,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/CastingVideoClient.xml b/data_model/1.4/device_types/CastingVideoClient.xml similarity index 100% rename from data_model/in_progress/device_types/CastingVideoClient.xml rename to data_model/1.4/device_types/CastingVideoClient.xml diff --git a/data_model/in_progress/device_types/CastingVideoPlayer.xml b/data_model/1.4/device_types/CastingVideoPlayer.xml similarity index 100% rename from data_model/in_progress/device_types/CastingVideoPlayer.xml rename to data_model/1.4/device_types/CastingVideoPlayer.xml diff --git a/data_model/in_progress/device_types/ColorDimmerSwitch.xml b/data_model/1.4/device_types/ColorDimmerSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/ColorDimmerSwitch.xml rename to data_model/1.4/device_types/ColorDimmerSwitch.xml diff --git a/data_model/in_progress/device_types/ColorTemperatureLight.xml b/data_model/1.4/device_types/ColorTemperatureLight.xml similarity index 100% rename from data_model/in_progress/device_types/ColorTemperatureLight.xml rename to data_model/1.4/device_types/ColorTemperatureLight.xml diff --git a/data_model/in_progress/device_types/ContactSensor.xml b/data_model/1.4/device_types/ContactSensor.xml similarity index 100% rename from data_model/in_progress/device_types/ContactSensor.xml rename to data_model/1.4/device_types/ContactSensor.xml diff --git a/data_model/in_progress/device_types/ContentApp.xml b/data_model/1.4/device_types/ContentApp.xml similarity index 100% rename from data_model/in_progress/device_types/ContentApp.xml rename to data_model/1.4/device_types/ContentApp.xml diff --git a/data_model/in_progress/device_types/ControlBridge.xml b/data_model/1.4/device_types/ControlBridge.xml similarity index 100% rename from data_model/in_progress/device_types/ControlBridge.xml rename to data_model/1.4/device_types/ControlBridge.xml diff --git a/data_model/in_progress/device_types/CookSurface.xml b/data_model/1.4/device_types/CookSurface.xml similarity index 100% rename from data_model/in_progress/device_types/CookSurface.xml rename to data_model/1.4/device_types/CookSurface.xml diff --git a/data_model/in_progress/device_types/Cooktop.xml b/data_model/1.4/device_types/Cooktop.xml similarity index 100% rename from data_model/in_progress/device_types/Cooktop.xml rename to data_model/1.4/device_types/Cooktop.xml diff --git a/data_model/in_progress/device_types/DeviceEnergyManagement.xml b/data_model/1.4/device_types/DeviceEnergyManagement.xml similarity index 100% rename from data_model/in_progress/device_types/DeviceEnergyManagement.xml rename to data_model/1.4/device_types/DeviceEnergyManagement.xml diff --git a/data_model/in_progress/device_types/DimmableLight.xml b/data_model/1.4/device_types/DimmableLight.xml similarity index 100% rename from data_model/in_progress/device_types/DimmableLight.xml rename to data_model/1.4/device_types/DimmableLight.xml diff --git a/data_model/in_progress/device_types/DimmablePlug-InUnit.xml b/data_model/1.4/device_types/DimmablePlug-InUnit.xml similarity index 100% rename from data_model/in_progress/device_types/DimmablePlug-InUnit.xml rename to data_model/1.4/device_types/DimmablePlug-InUnit.xml diff --git a/data_model/in_progress/device_types/DimmerSwitch.xml b/data_model/1.4/device_types/DimmerSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/DimmerSwitch.xml rename to data_model/1.4/device_types/DimmerSwitch.xml diff --git a/data_model/in_progress/device_types/Dishwasher.xml b/data_model/1.4/device_types/Dishwasher.xml similarity index 100% rename from data_model/in_progress/device_types/Dishwasher.xml rename to data_model/1.4/device_types/Dishwasher.xml diff --git a/data_model/in_progress/device_types/DoorLock.xml b/data_model/1.4/device_types/DoorLock.xml similarity index 98% rename from data_model/in_progress/device_types/DoorLock.xml rename to data_model/1.4/device_types/DoorLock.xml index e2eb1e9152085d..622b9a8bfc6300 100644 --- a/data_model/in_progress/device_types/DoorLock.xml +++ b/data_model/1.4/device_types/DoorLock.xml @@ -85,6 +85,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/device_types/DoorLockController.xml b/data_model/1.4/device_types/DoorLockController.xml similarity index 100% rename from data_model/in_progress/device_types/DoorLockController.xml rename to data_model/1.4/device_types/DoorLockController.xml diff --git a/data_model/in_progress/device_types/EVSE.xml b/data_model/1.4/device_types/EVSE.xml similarity index 100% rename from data_model/in_progress/device_types/EVSE.xml rename to data_model/1.4/device_types/EVSE.xml diff --git a/data_model/in_progress/device_types/ElectricalSensor.xml b/data_model/1.4/device_types/ElectricalSensor.xml similarity index 100% rename from data_model/in_progress/device_types/ElectricalSensor.xml rename to data_model/1.4/device_types/ElectricalSensor.xml diff --git a/data_model/in_progress/device_types/EnergyTariff.xml b/data_model/1.4/device_types/EnergyTariff.xml similarity index 100% rename from data_model/in_progress/device_types/EnergyTariff.xml rename to data_model/1.4/device_types/EnergyTariff.xml diff --git a/data_model/in_progress/device_types/EnergyTariffCalendar.xml b/data_model/1.4/device_types/EnergyTariffCalendar.xml similarity index 100% rename from data_model/in_progress/device_types/EnergyTariffCalendar.xml rename to data_model/1.4/device_types/EnergyTariffCalendar.xml diff --git a/data_model/in_progress/device_types/ExtendedColorLight.xml b/data_model/1.4/device_types/ExtendedColorLight.xml similarity index 100% rename from data_model/in_progress/device_types/ExtendedColorLight.xml rename to data_model/1.4/device_types/ExtendedColorLight.xml diff --git a/data_model/in_progress/device_types/ExtractorHood.xml b/data_model/1.4/device_types/ExtractorHood.xml similarity index 100% rename from data_model/in_progress/device_types/ExtractorHood.xml rename to data_model/1.4/device_types/ExtractorHood.xml diff --git a/data_model/in_progress/device_types/Fan.xml b/data_model/1.4/device_types/Fan.xml similarity index 100% rename from data_model/in_progress/device_types/Fan.xml rename to data_model/1.4/device_types/Fan.xml diff --git a/data_model/in_progress/device_types/FlowSensor.xml b/data_model/1.4/device_types/FlowSensor.xml similarity index 100% rename from data_model/in_progress/device_types/FlowSensor.xml rename to data_model/1.4/device_types/FlowSensor.xml diff --git a/data_model/in_progress/device_types/GenericSwitch.xml b/data_model/1.4/device_types/GenericSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/GenericSwitch.xml rename to data_model/1.4/device_types/GenericSwitch.xml diff --git a/data_model/in_progress/device_types/HeatPump.xml b/data_model/1.4/device_types/HeatPump.xml similarity index 100% rename from data_model/in_progress/device_types/HeatPump.xml rename to data_model/1.4/device_types/HeatPump.xml diff --git a/data_model/in_progress/device_types/HumidifierDehumidifier.xml b/data_model/1.4/device_types/HumidifierDehumidifier.xml similarity index 100% rename from data_model/in_progress/device_types/HumidifierDehumidifier.xml rename to data_model/1.4/device_types/HumidifierDehumidifier.xml diff --git a/data_model/in_progress/device_types/HumiditySensor.xml b/data_model/1.4/device_types/HumiditySensor.xml similarity index 100% rename from data_model/in_progress/device_types/HumiditySensor.xml rename to data_model/1.4/device_types/HumiditySensor.xml diff --git a/data_model/in_progress/device_types/JointFabricAdmin.xml b/data_model/1.4/device_types/JointFabricAdmin.xml similarity index 100% rename from data_model/in_progress/device_types/JointFabricAdmin.xml rename to data_model/1.4/device_types/JointFabricAdmin.xml diff --git a/data_model/in_progress/device_types/LaundryDryer.xml b/data_model/1.4/device_types/LaundryDryer.xml similarity index 100% rename from data_model/in_progress/device_types/LaundryDryer.xml rename to data_model/1.4/device_types/LaundryDryer.xml diff --git a/data_model/in_progress/device_types/LaundryWasher.xml b/data_model/1.4/device_types/LaundryWasher.xml similarity index 100% rename from data_model/in_progress/device_types/LaundryWasher.xml rename to data_model/1.4/device_types/LaundryWasher.xml diff --git a/data_model/in_progress/device_types/LightSensor.xml b/data_model/1.4/device_types/LightSensor.xml similarity index 100% rename from data_model/in_progress/device_types/LightSensor.xml rename to data_model/1.4/device_types/LightSensor.xml diff --git a/data_model/in_progress/device_types/MicrowaveOven.xml b/data_model/1.4/device_types/MicrowaveOven.xml similarity index 100% rename from data_model/in_progress/device_types/MicrowaveOven.xml rename to data_model/1.4/device_types/MicrowaveOven.xml diff --git a/data_model/in_progress/device_types/ModeSelectDeviceType.xml b/data_model/1.4/device_types/ModeSelectDeviceType.xml similarity index 100% rename from data_model/in_progress/device_types/ModeSelectDeviceType.xml rename to data_model/1.4/device_types/ModeSelectDeviceType.xml diff --git a/data_model/in_progress/device_types/MountedDimmableLoadControl.xml b/data_model/1.4/device_types/MountedDimmableLoadControl.xml similarity index 100% rename from data_model/in_progress/device_types/MountedDimmableLoadControl.xml rename to data_model/1.4/device_types/MountedDimmableLoadControl.xml diff --git a/data_model/in_progress/device_types/MountedOnOffControl.xml b/data_model/1.4/device_types/MountedOnOffControl.xml similarity index 100% rename from data_model/in_progress/device_types/MountedOnOffControl.xml rename to data_model/1.4/device_types/MountedOnOffControl.xml diff --git a/data_model/in_progress/device_types/NetworkInfraIntro.xml b/data_model/1.4/device_types/NetworkInfraIntro.xml similarity index 100% rename from data_model/in_progress/device_types/NetworkInfraIntro.xml rename to data_model/1.4/device_types/NetworkInfraIntro.xml diff --git a/data_model/in_progress/device_types/NetworkInfraManager.xml b/data_model/1.4/device_types/NetworkInfraManager.xml similarity index 97% rename from data_model/in_progress/device_types/NetworkInfraManager.xml rename to data_model/1.4/device_types/NetworkInfraManager.xml index 58cbae2e7ab440..a4d17e11c0faaa 100644 --- a/data_model/in_progress/device_types/NetworkInfraManager.xml +++ b/data_model/1.4/device_types/NetworkInfraManager.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/in_progress/device_types/OccupancySensor.xml b/data_model/1.4/device_types/OccupancySensor.xml similarity index 100% rename from data_model/in_progress/device_types/OccupancySensor.xml rename to data_model/1.4/device_types/OccupancySensor.xml diff --git a/data_model/in_progress/device_types/OnOffLight.xml b/data_model/1.4/device_types/OnOffLight.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffLight.xml rename to data_model/1.4/device_types/OnOffLight.xml diff --git a/data_model/in_progress/device_types/OnOffLightSwitch.xml b/data_model/1.4/device_types/OnOffLightSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffLightSwitch.xml rename to data_model/1.4/device_types/OnOffLightSwitch.xml diff --git a/data_model/in_progress/device_types/OnOffPlug-inUnit.xml b/data_model/1.4/device_types/OnOffPlug-inUnit.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffPlug-inUnit.xml rename to data_model/1.4/device_types/OnOffPlug-inUnit.xml diff --git a/data_model/in_progress/device_types/OnOffSensor.xml b/data_model/1.4/device_types/OnOffSensor.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffSensor.xml rename to data_model/1.4/device_types/OnOffSensor.xml diff --git a/data_model/in_progress/device_types/OtaProvider.xml b/data_model/1.4/device_types/OtaProvider.xml similarity index 100% rename from data_model/in_progress/device_types/OtaProvider.xml rename to data_model/1.4/device_types/OtaProvider.xml diff --git a/data_model/in_progress/device_types/OtaRequestor.xml b/data_model/1.4/device_types/OtaRequestor.xml similarity index 100% rename from data_model/in_progress/device_types/OtaRequestor.xml rename to data_model/1.4/device_types/OtaRequestor.xml diff --git a/data_model/in_progress/device_types/Oven.xml b/data_model/1.4/device_types/Oven.xml similarity index 100% rename from data_model/in_progress/device_types/Oven.xml rename to data_model/1.4/device_types/Oven.xml diff --git a/data_model/in_progress/device_types/PowerSource.xml b/data_model/1.4/device_types/PowerSource.xml similarity index 100% rename from data_model/in_progress/device_types/PowerSource.xml rename to data_model/1.4/device_types/PowerSource.xml diff --git a/data_model/in_progress/device_types/PressureSensor.xml b/data_model/1.4/device_types/PressureSensor.xml similarity index 100% rename from data_model/in_progress/device_types/PressureSensor.xml rename to data_model/1.4/device_types/PressureSensor.xml diff --git a/data_model/in_progress/device_types/Pump.xml b/data_model/1.4/device_types/Pump.xml similarity index 100% rename from data_model/in_progress/device_types/Pump.xml rename to data_model/1.4/device_types/Pump.xml diff --git a/data_model/in_progress/device_types/PumpController.xml b/data_model/1.4/device_types/PumpController.xml similarity index 100% rename from data_model/in_progress/device_types/PumpController.xml rename to data_model/1.4/device_types/PumpController.xml diff --git a/data_model/in_progress/device_types/RainSensor.xml b/data_model/1.4/device_types/RainSensor.xml similarity index 100% rename from data_model/in_progress/device_types/RainSensor.xml rename to data_model/1.4/device_types/RainSensor.xml diff --git a/data_model/in_progress/device_types/Refrigerator.xml b/data_model/1.4/device_types/Refrigerator.xml similarity index 100% rename from data_model/in_progress/device_types/Refrigerator.xml rename to data_model/1.4/device_types/Refrigerator.xml diff --git a/data_model/in_progress/device_types/RoboticVacuumCleaner.xml b/data_model/1.4/device_types/RoboticVacuumCleaner.xml similarity index 93% rename from data_model/in_progress/device_types/RoboticVacuumCleaner.xml rename to data_model/1.4/device_types/RoboticVacuumCleaner.xml index fd30668cd2e084..446410dfb7c60a 100644 --- a/data_model/in_progress/device_types/RoboticVacuumCleaner.xml +++ b/data_model/1.4/device_types/RoboticVacuumCleaner.xml @@ -55,10 +55,11 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + @@ -75,5 +76,8 @@ Davis, CA 95616, USA + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/RoomAirConditioner.xml b/data_model/1.4/device_types/RoomAirConditioner.xml similarity index 100% rename from data_model/in_progress/device_types/RoomAirConditioner.xml rename to data_model/1.4/device_types/RoomAirConditioner.xml diff --git a/data_model/in_progress/device_types/RootNodeDeviceType.xml b/data_model/1.4/device_types/RootNodeDeviceType.xml similarity index 94% rename from data_model/in_progress/device_types/RootNodeDeviceType.xml rename to data_model/1.4/device_types/RootNodeDeviceType.xml index c96759503bfb13..13473e44cacb60 100644 --- a/data_model/in_progress/device_types/RootNodeDeviceType.xml +++ b/data_model/1.4/device_types/RootNodeDeviceType.xml @@ -55,16 +55,24 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + + + + + + + + diff --git a/data_model/in_progress/device_types/SecondaryNetworkInterface.xml b/data_model/1.4/device_types/SecondaryNetworkInterface.xml similarity index 100% rename from data_model/in_progress/device_types/SecondaryNetworkInterface.xml rename to data_model/1.4/device_types/SecondaryNetworkInterface.xml diff --git a/data_model/in_progress/device_types/SmokeCOAlarm.xml b/data_model/1.4/device_types/SmokeCOAlarm.xml similarity index 100% rename from data_model/in_progress/device_types/SmokeCOAlarm.xml rename to data_model/1.4/device_types/SmokeCOAlarm.xml diff --git a/data_model/in_progress/device_types/SolarPower.xml b/data_model/1.4/device_types/SolarPower.xml similarity index 100% rename from data_model/in_progress/device_types/SolarPower.xml rename to data_model/1.4/device_types/SolarPower.xml diff --git a/data_model/in_progress/device_types/Speaker.xml b/data_model/1.4/device_types/Speaker.xml similarity index 100% rename from data_model/in_progress/device_types/Speaker.xml rename to data_model/1.4/device_types/Speaker.xml diff --git a/data_model/in_progress/device_types/TemperatureControlledCabinet.xml b/data_model/1.4/device_types/TemperatureControlledCabinet.xml similarity index 100% rename from data_model/in_progress/device_types/TemperatureControlledCabinet.xml rename to data_model/1.4/device_types/TemperatureControlledCabinet.xml diff --git a/data_model/in_progress/device_types/TemperatureSensor.xml b/data_model/1.4/device_types/TemperatureSensor.xml similarity index 100% rename from data_model/in_progress/device_types/TemperatureSensor.xml rename to data_model/1.4/device_types/TemperatureSensor.xml diff --git a/data_model/in_progress/device_types/Thermostat.xml b/data_model/1.4/device_types/Thermostat.xml similarity index 100% rename from data_model/in_progress/device_types/Thermostat.xml rename to data_model/1.4/device_types/Thermostat.xml diff --git a/data_model/in_progress/device_types/ThreadBorderRouter.xml b/data_model/1.4/device_types/ThreadBorderRouter.xml similarity index 100% rename from data_model/in_progress/device_types/ThreadBorderRouter.xml rename to data_model/1.4/device_types/ThreadBorderRouter.xml diff --git a/data_model/in_progress/device_types/VideoRemoteControl.xml b/data_model/1.4/device_types/VideoRemoteControl.xml similarity index 100% rename from data_model/in_progress/device_types/VideoRemoteControl.xml rename to data_model/1.4/device_types/VideoRemoteControl.xml diff --git a/data_model/in_progress/device_types/WaterFreezeDetector.xml b/data_model/1.4/device_types/WaterFreezeDetector.xml similarity index 100% rename from data_model/in_progress/device_types/WaterFreezeDetector.xml rename to data_model/1.4/device_types/WaterFreezeDetector.xml diff --git a/data_model/in_progress/device_types/WaterHeater.xml b/data_model/1.4/device_types/WaterHeater.xml similarity index 93% rename from data_model/in_progress/device_types/WaterHeater.xml rename to data_model/1.4/device_types/WaterHeater.xml index 9d038d89c55563..975e9f2bb4b850 100644 --- a/data_model/in_progress/device_types/WaterHeater.xml +++ b/data_model/1.4/device_types/WaterHeater.xml @@ -68,9 +68,6 @@ Davis, CA 95616, USA - - - @@ -80,9 +77,6 @@ Davis, CA 95616, USA - - - diff --git a/data_model/in_progress/device_types/WaterLeakDetector.xml b/data_model/1.4/device_types/WaterLeakDetector.xml similarity index 100% rename from data_model/in_progress/device_types/WaterLeakDetector.xml rename to data_model/1.4/device_types/WaterLeakDetector.xml diff --git a/data_model/in_progress/device_types/WaterValve.xml b/data_model/1.4/device_types/WaterValve.xml similarity index 100% rename from data_model/in_progress/device_types/WaterValve.xml rename to data_model/1.4/device_types/WaterValve.xml diff --git a/data_model/in_progress/device_types/WindowCovering.xml b/data_model/1.4/device_types/WindowCovering.xml similarity index 100% rename from data_model/in_progress/device_types/WindowCovering.xml rename to data_model/1.4/device_types/WindowCovering.xml diff --git a/data_model/in_progress/device_types/WindowCoveringController.xml b/data_model/1.4/device_types/WindowCoveringController.xml similarity index 100% rename from data_model/in_progress/device_types/WindowCoveringController.xml rename to data_model/1.4/device_types/WindowCoveringController.xml diff --git a/data_model/in_progress/scraper_version b/data_model/1.4/scraper_version similarity index 100% rename from data_model/in_progress/scraper_version rename to data_model/1.4/scraper_version diff --git a/data_model/1.4/spec_sha b/data_model/1.4/spec_sha new file mode 100644 index 00000000000000..094141d3c099c6 --- /dev/null +++ b/data_model/1.4/spec_sha @@ -0,0 +1 @@ +2760ea4338a4b612ac025bfa5677e6918041c1d4 diff --git a/data_model/in_progress/spec_sha b/data_model/in_progress/spec_sha deleted file mode 100644 index a399f222280c76..00000000000000 --- a/data_model/in_progress/spec_sha +++ /dev/null @@ -1 +0,0 @@ -ec20ddf482db8deffe8b2eb745e34d2f9cea72b2 diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index c7f087cb03d834..4e0171b0779936 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -259,21 +259,21 @@ def test_build_xml_override(self): # checks that the 1.3 spec (default) does not contain in-progress clusters and the TOT does tot_xml_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.kMaster) one_three_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.k1_3) - in_progress, problems = build_xml_clusters(PrebuiltDataModelDirectory.kInProgress) + one_four_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.k1_4) asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(one_three_clusters.keys())), 0, "Master dir does not contain any clusters not in 1.3") - asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(in_progress.keys())), - 0, "Master dir does not contain any clusters not in in_progress") - asserts.assert_greater(len(set(in_progress.keys()) - set(one_three_clusters.keys())), - 0, "in_progress dir does not contain any clusters not in 1.3") + asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(one_four_clusters.keys())), + 0, "Master dir does not contain any clusters not in 1.4") + asserts.assert_greater(len(set(one_four_clusters.keys()) - set(one_three_clusters.keys())), + 0, "1.4 dir does not contain any clusters not in 1.3") # only the pulse width modulation cluster was removed post 1.3 asserts.assert_equal(set(one_three_clusters.keys()) - set(tot_xml_clusters.keys()), set([Clusters.PulseWidthModulation.id]), "There are some 1.3 clusters that are not included in the TOT spec") - asserts.assert_equal(set(in_progress.keys())-set(tot_xml_clusters.keys()), - set(), "There are some in_progress clusters that are not included in the TOT spec") + asserts.assert_equal(set(one_four_clusters.keys())-set(tot_xml_clusters.keys()), + set(), "There are some 1.4 clusters that are not included in the TOT spec") str_path = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), - '..', '..', 'data_model', 'in_progress', 'clusters')) + '..', '..', 'data_model', '1.4', 'clusters')) string_override_check, problems = build_xml_clusters(str_path) asserts.assert_equal(string_override_check.keys(), self.spec_xml_clusters.keys(), "Mismatched cluster generation") @@ -466,7 +466,7 @@ def test_provisional_clusters(self): def test_atomic_thermostat(self): tot_xml_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.kMaster) one_three_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.k1_3) - in_progress, problems = build_xml_clusters(PrebuiltDataModelDirectory.kInProgress) + one_four_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.k1_4) asserts.assert_in("Atomic Request", tot_xml_clusters[Clusters.Thermostat.id].command_map, "Atomic request not found on thermostat command map") @@ -474,10 +474,10 @@ def test_atomic_thermostat(self): asserts.assert_in(request_id, tot_xml_clusters[Clusters.Thermostat.id].accepted_commands.keys(), "Atomic request not found in thermostat accepted command list") - asserts.assert_in("Atomic Response", tot_xml_clusters[Clusters.Thermostat.id].command_map, + asserts.assert_in("Atomic Response", one_four_clusters[Clusters.Thermostat.id].command_map, "Atomic response not found in the thermostat command map") response_id = tot_xml_clusters[Clusters.Thermostat.id].command_map["Atomic Response"] - asserts.assert_in(response_id, tot_xml_clusters[Clusters.Thermostat.id].generated_commands.keys(), + asserts.assert_in(response_id, one_four_clusters[Clusters.Thermostat.id].generated_commands.keys(), "Atomic response not found in thermostat generated command list") asserts.assert_not_in( diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index 5a66a900c28c91..75ffea120ff126 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -509,7 +509,7 @@ def check_clusters_for_unknown_commands(clusters: dict[int, XmlCluster], problem class PrebuiltDataModelDirectory(Enum): k1_3 = auto() - kInProgress = auto() + k1_4 = auto() kMaster = auto() @@ -521,15 +521,15 @@ class DataModelLevel(str, Enum): def _get_data_model_directory(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str], data_model_level: DataModelLevel) -> str: if data_model_directory == PrebuiltDataModelDirectory.k1_3: return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.3', data_model_level) - elif data_model_directory == PrebuiltDataModelDirectory.kInProgress: - return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'in_progress', data_model_level) + elif data_model_directory == PrebuiltDataModelDirectory.k1_4: + return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.4', data_model_level) elif data_model_directory == PrebuiltDataModelDirectory.kMaster: return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'master', data_model_level) else: return data_model_directory -def build_xml_clusters(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.kInProgress) -> tuple[dict[uint, XmlCluster], list[ProblemNotice]]: +def build_xml_clusters(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.k1_4) -> tuple[dict[uint, XmlCluster], list[ProblemNotice]]: dir = _get_data_model_directory(data_model_directory, DataModelLevel.kCluster) clusters: dict[int, XmlCluster] = {} @@ -776,7 +776,7 @@ def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNot return device_types, problems -def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.kInProgress) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: +def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.k1_4) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: dir = _get_data_model_directory(data_model_directory, DataModelLevel.kDeviceType) device_types: dict[int, XmlDeviceType] = {} problems = [] From d404400ca60b73d79336b0a1988a27d723a32049 Mon Sep 17 00:00:00 2001 From: Martin Girardot <165289184+Martin-NXP@users.noreply.github.com> Date: Tue, 1 Oct 2024 18:01:34 +0200 Subject: [PATCH 3/9] [NXP] Add wifi/tread/software diagnostics support, apply wifi tests fixes, add second BR interface (#35820) * [NXP][platform][common] Fix test TC CNET 4.9: failed to remove wifi network Signed-off-by: Martin Girardot * [NXP][platform][common] Fix TC-CNET-4.11 test Signed-off-by: Martin Girardot * [NXP][platform][common] Add wifi diagnostics and Software Diagnostics, use wlan API instead of wifi Signed-off-by: Martin Girardot * [NXP][zap][thermostat] Add Software, wifi and OT Diagnostics Signed-off-by: Martin Girardot * [NXP][examples][thermostat] Update secondary nwk if cluster location in ZAP This commit updates the location of the secondary network interface in the zap file according to Matter 1.4 spec desciption. When both SNI and TBRM clusters are present, they are set on the same endpoint. Signed-off-by: Marius Preda * [NXP] Enable wifi/thread/software diagnostics Signed-off-by: Martin Girardot * [NXP] add support of new wifi diagnostics, only available with sdk 2.16.100 Signed-off-by: Martin Girardot * Restyled by clang-format * [NXP] Update zap to add new wifi diagnostics Signed-off-by: Martin Girardot * [NXP] Fix BR zap according to PR comments Signed-off-by: Martin Girardot --------- Signed-off-by: Martin Girardot Signed-off-by: Marius Preda Co-authored-by: Marius Preda Co-authored-by: Restyled.io --- .../nxp/zap/thermostat_matter_br.matter | 332 +-- .../nxp/zap/thermostat_matter_br.zap | 2351 ++++++++++------- .../nxp/zap/thermostat_matter_thread.matter | 52 + .../nxp/zap/thermostat_matter_thread.zap | 186 ++ .../nxp/zap/thermostat_matter_wifi.matter | 62 + .../nxp/zap/thermostat_matter_wifi.zap | 315 +++ .../nxp/common/ConnectivityManagerImpl.cpp | 56 +- .../nxp/common/ConnectivityManagerImpl.h | 2 + .../nxp/common/DiagnosticDataProviderImpl.cpp | 185 +- .../nxp/common/DiagnosticDataProviderImpl.h | 39 +- .../common/NetworkCommissioningWiFiDriver.cpp | 32 +- 11 files changed, 2352 insertions(+), 1260 deletions(-) diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.matter b/examples/thermostat/nxp/zap/thermostat_matter_br.matter index bb72c0caceaf27..03d13fd74700b6 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.matter @@ -444,27 +444,6 @@ cluster Descriptor = 29 { readonly attribute int16u clusterRevision = 65533; } -/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -cluster Binding = 30 { - revision 1; // NOTE: Default/not specifically set - - fabric_scoped struct TargetStruct { - optional node_id node = 1; - optional group_id group = 2; - optional endpoint_no endpoint = 3; - optional cluster_id cluster = 4; - fabric_idx fabricIndex = 254; - } - - attribute access(write: manage) TargetStruct binding[] = 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; -} - /** 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 @@ -841,93 +820,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { 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 */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) 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. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - 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; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional 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; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for the units in which values are conveyed in communication to a - user. As such, Nodes that visually or audibly convey measurable values to the user need a - mechanism by which they can be configured to use a user’s preferred unit. */ -cluster UnitLocalization = 45 { - revision 1; - - enum TempUnitEnum : enum8 { - kFahrenheit = 0; - kCelsius = 1; - kKelvin = 2; - } - - bitmap Feature : bitmap32 { - kTemperatureUnit = 0x1; - } - - attribute access(write: manage) optional TempUnitEnum temperatureUnit = 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 is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1377,6 +1269,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ cluster ThreadNetworkDiagnostics = 53 { revision 2; @@ -2384,37 +2313,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - 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; - } - - server cluster TimeFormatLocalization { - 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; - } - - server cluster UnitLocalization { - ram attribute temperatureUnit; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0x1; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2492,19 +2390,41 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster WiFiNetworkDiagnostics { callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; callback attribute channelNumber; callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; callback attribute currentMaxRate; + callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; + + handle command ResetCounts; } server cluster AdministratorCommissioning { @@ -2603,16 +2523,6 @@ endpoint 1 { callback attribute clusterRevision; } - server cluster Binding { - 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; - } - server cluster FixedLabel { callback attribute labelList; callback attribute eventList; @@ -2655,6 +2565,7 @@ endpoint 1 { } endpoint 2 { device type ma_thread_border_router = 145, version 1; + device type ma_secondary_network_interface = 25, version 1; server cluster Descriptor { @@ -2670,13 +2581,44 @@ endpoint 2 { callback attribute clusterRevision; } + 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 supportedThreadFeatures; + ram attribute threadVersion; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + server cluster ThreadNetworkDiagnostics { + emits event ConnectionStatus; + emits event NetworkFaultChange; callback attribute channel; callback attribute routingRole; callback attribute networkName; callback attribute panId; callback attribute extendedPanId; callback attribute meshLocalPrefix; + callback attribute overrunCount; callback attribute neighborTable; callback attribute routeTable; callback attribute partitionId; @@ -2684,6 +2626,51 @@ endpoint 2 { callback attribute dataVersion; callback attribute stableDataVersion; callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; callback attribute securityPolicy; callback attribute channelPage0Mask; callback attribute operationalDatasetComponents; @@ -2694,6 +2681,8 @@ endpoint 2 { callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; + + handle command ResetCounts; } server cluster ThreadBorderRouterManagement { @@ -2717,50 +2706,5 @@ endpoint 2 { handle command SetPendingDatasetRequest; } } -endpoint 3 { - device type ma_secondary_network_interface = 25, version 1; - - - 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; - callback attribute featureMap; - callback attribute clusterRevision; - } - - 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 supportedThreadFeatures; - ram attribute threadVersion; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - - handle command ScanNetworks; - handle command ScanNetworksResponse; - handle command AddOrUpdateThreadNetwork; - handle command RemoveNetwork; - handle command NetworkConfigResponse; - handle command ConnectNetwork; - handle command ConnectNetworkResponse; - handle command ReorderNetwork; - } -} diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.zap b/examples/thermostat/nxp/zap/thermostat_matter_br.zap index 3586eeb6b2320d..ea67cd00667610 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.zap @@ -976,67 +976,101 @@ ] }, { - "name": "Localization Configuration", - "code": 43, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "commands": [ { - "name": "ActiveLocale", + "name": "ArmFailSafe", "code": 0, "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "SupportedLocales", + "name": "ArmFailSafeResponse", "code": 1, "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "BasicCommissioningInfo", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "BasicCommissioningInfo", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RegulatoryConfig", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -1048,11 +1082,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "LocationCapability", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -1064,11 +1098,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "SupportsConcurrentConnection", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, @@ -1107,39 +1141,113 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Time Format Localization", - "code": 44, + "name": "Network Commissioning", + "code": 49, "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "define": "NETWORK_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { - "name": "HourFormat", + "name": "MaxNetworks", "code": 0, "mfgCode": null, "side": "server", - "type": "HourFormatEnum", + "type": "int8u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "Networks", + "code": 1, "mfgCode": null, "side": "server", "type": "array", @@ -1154,101 +1262,91 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "ScanMaxTimeSeconds", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "ConnectMaxTimeSeconds", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "InterfaceEnabled", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "LastNetworkingStatus", + "code": 5, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "NetworkCommissioningStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "LastNetworkID", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "octet_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "TemperatureUnit", - "code": 0, + "name": "LastConnectErrorValue", + "code": 7, "mfgCode": null, "side": "server", - "type": "TempUnitEnum", + "type": "int32s", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1260,8 +1358,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "SupportedWiFiBands", + "code": 8, "mfgCode": null, "side": "server", "type": "array", @@ -1276,8 +1374,24 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -1333,7 +1447,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1351,22 +1465,22 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "General Commissioning", - "code": 48, + "name": "Diagnostic Logs", + "code": 50, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "DIAGNOSTIC_LOGS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "ArmFailSafe", + "name": "RetrieveLogsRequest", "code": 0, "mfgCode": null, "source": "client", @@ -1374,85 +1488,37 @@ "isEnabled": 1 }, { - "name": "ArmFailSafeResponse", + "name": "RetrieveLogsResponse", "code": 1, "mfgCode": null, "source": "server", "isIncoming": 0, "isEnabled": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 } ], "attributes": [ { - "name": "Breadcrumb", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BasicCommissioningInfo", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "BasicCommissioningInfo", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RegulatoryConfig", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1464,11 +1530,11 @@ "reportableChange": 0 }, { - "name": "LocationCapability", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1480,11 +1546,11 @@ "reportableChange": 0 }, { - "name": "SupportsConcurrentConnection", - "code": 4, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1523,22 +1589,22 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "ScanNetworks", + "name": "TestEventTrigger", "code": 0, "mfgCode": null, "source": "client", @@ -1546,202 +1612,154 @@ "isEnabled": 1 }, { - "name": "ScanNetworksResponse", + "name": "TimeSnapshot", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "NetworkConfigResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ConnectNetwork", - "code": 6, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "ConnectNetworkResponse", - "code": 7, + "name": "TimeSnapshotResponse", + "code": 2, "mfgCode": null, "source": "server", "isIncoming": 0, "isEnabled": 1 - }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 } ], "attributes": [ { - "name": "MaxNetworks", + "name": "NetworkInterfaces", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Networks", + "name": "RebootCount", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", + "name": "UpTime", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", + "name": "TotalOperationalHours", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InterfaceEnabled", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "BootReasonEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkingStatus", - "code": 5, + "name": "TestEventTriggersEnabled", + "code": 8, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatusEnum", + "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "false", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkID", - "code": 6, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastConnectErrorValue", - "code": 7, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int32s", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedWiFiBands", - "code": 8, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -1756,9 +1774,9 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, + "name": "AttributeList", + "code": 65531, + "mfgCode": null, "side": "server", "type": "array", "included": 1, @@ -1772,11 +1790,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, "storageOption": "External", "singleton": 0, @@ -1788,8 +1806,43 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, "mfgCode": null, "side": "server", "type": "array", @@ -1804,11 +1857,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "CurrentHeapFree", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -1820,65 +1873,37 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "CurrentHeapUsed", + "code": 2, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentHeapHighWatermark", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "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", - "isIncoming": 1, - "isEnabled": 1 }, - { - "name": "RetrieveLogsResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ { "name": "GeneratedCommandList", "code": 65528, @@ -1950,10 +1975,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1978,45 +2003,29 @@ ] }, { - "name": "General Diagnostics", - "code": 51, + "name": "Wi-Fi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "TestEventTrigger", + "name": "ResetCounts", "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "TimeSnapshot", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TimeSnapshotResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 } ], "attributes": [ { - "name": "NetworkInterfaces", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, @@ -2028,11 +2037,11 @@ "reportableChange": 0 }, { - "name": "RebootCount", + "name": "SecurityType", "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2044,75 +2053,75 @@ "reportableChange": 0 }, { - "name": "UpTime", + "name": "WiFiVersion", "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TotalOperationalHours", + "name": "ChannelNumber", "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BootReason", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", - "type": "BootReasonEnum", + "type": "int8s", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "BeaconLostCount", + "code": 5, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "BeaconRxCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2124,11 +2133,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "PacketMulticastRxCount", + "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2140,11 +2149,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "PacketMulticastTxCount", + "code": 8, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2156,11 +2165,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "PacketUnicastRxCount", + "code": 9, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2172,11 +2181,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "PacketUnicastTxCount", + "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2188,11 +2197,11 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentMaxRate", + "code": 11, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2202,168 +2211,69 @@ "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ], - "events": [ - { - "name": "BootReason", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Wi-Fi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "BSSID", - "code": 0, + "name": "OverrunCount", + "code": 12, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "SecurityTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "WiFiVersionEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "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": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentMaxRate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3373,128 +3283,6 @@ } ] }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Binding", - "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": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Fixed Label", "code": 64, @@ -4005,12 +3793,18 @@ "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "code": 145, + "code": 25, "profileId": 259, - "label": "MA-thread-border-router", - "name": "MA-thread-border-router" + "label": "MA-secondary-network-interface", + "name": "MA-secondary-network-interface" }, "deviceTypes": [ + { + "code": 25, + "profileId": 259, + "label": "MA-secondary-network-interface", + "name": "MA-secondary-network-interface" + }, { "code": 145, "profileId": 259, @@ -4019,13 +3813,15 @@ } ], "deviceVersions": [ + 1, 1 ], "deviceIdentifiers": [ + 25, 145 ], - "deviceTypeName": "MA-thread-border-router", - "deviceTypeCode": 145, + "deviceTypeName": "MA-secondary-network-interface", + "deviceTypeCode": 25, "deviceTypeProfileId": 259, "clusters": [ { @@ -4041,7 +3837,743 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedThreadFeatures", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 10, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4053,11 +4585,11 @@ "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "ChildRoleCount", + "code": 15, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4069,11 +4601,11 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "RouterRoleCount", + "code": 16, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4085,11 +4617,11 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "LeaderRoleCount", + "code": 17, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4101,11 +4633,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AttachAttemptCount", + "code": 18, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4117,11 +4649,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "PartitionIdChangeCount", + "code": 19, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4133,11 +4665,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "BetterPartitionAttachAttemptCount", + "code": 20, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4149,11 +4681,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ParentChangeCount", + "code": 21, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4165,11 +4697,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "TxTotalCount", + "code": 22, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4181,11 +4713,11 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "TxUnicastCount", + "code": 23, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4195,23 +4727,13 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "Channel", - "code": 0, + "name": "TxBroadcastCount", + "code": 24, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4223,11 +4745,11 @@ "reportableChange": 0 }, { - "name": "RoutingRole", - "code": 1, + "name": "TxAckRequestedCount", + "code": 25, "mfgCode": null, "side": "server", - "type": "RoutingRoleEnum", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4239,11 +4761,11 @@ "reportableChange": 0 }, { - "name": "NetworkName", - "code": 2, + "name": "TxAckedCount", + "code": 26, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4255,11 +4777,11 @@ "reportableChange": 0 }, { - "name": "PanId", - "code": 3, + "name": "TxNoAckRequestedCount", + "code": 27, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4271,11 +4793,11 @@ "reportableChange": 0 }, { - "name": "ExtendedPanId", - "code": 4, + "name": "TxDataCount", + "code": 28, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4287,11 +4809,11 @@ "reportableChange": 0 }, { - "name": "MeshLocalPrefix", - "code": 5, + "name": "TxDataPollCount", + "code": 29, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4303,11 +4825,11 @@ "reportableChange": 0 }, { - "name": "NeighborTable", - "code": 7, + "name": "TxBeaconCount", + "code": 30, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4319,11 +4841,11 @@ "reportableChange": 0 }, { - "name": "RouteTable", - "code": 8, + "name": "TxBeaconRequestCount", + "code": 31, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4335,8 +4857,8 @@ "reportableChange": 0 }, { - "name": "PartitionId", - "code": 9, + "name": "TxOtherCount", + "code": 32, "mfgCode": null, "side": "server", "type": "int32u", @@ -4351,11 +4873,11 @@ "reportableChange": 0 }, { - "name": "Weighting", - "code": 10, + "name": "TxRetryCount", + "code": 33, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4367,11 +4889,11 @@ "reportableChange": 0 }, { - "name": "DataVersion", - "code": 11, + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4383,11 +4905,11 @@ "reportableChange": 0 }, { - "name": "StableDataVersion", - "code": 12, + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4399,11 +4921,11 @@ "reportableChange": 0 }, { - "name": "LeaderRouterId", - "code": 13, + "name": "TxErrCcaCount", + "code": 36, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4415,11 +4937,11 @@ "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "TxErrAbortCount", + "code": 37, "mfgCode": null, "side": "server", - "type": "SecurityPolicy", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4431,11 +4953,11 @@ "reportableChange": 0 }, { - "name": "ChannelPage0Mask", - "code": 60, + "name": "TxErrBusyChannelCount", + "code": 38, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4447,11 +4969,11 @@ "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "RxTotalCount", + "code": 39, "mfgCode": null, "side": "server", - "type": "OperationalDatasetComponents", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4463,11 +4985,11 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "RxUnicastCount", + "code": 40, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4479,11 +5001,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "RxBroadcastCount", + "code": 41, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4495,11 +5017,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RxDataCount", + "code": 42, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4511,11 +5033,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "RxDataPollCount", + "code": 43, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4527,11 +5049,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "RxBeaconCount", + "code": 44, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4543,96 +5065,43 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "RxBeaconRequestCount", + "code": 45, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RxOtherCount", + "code": 46, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Thread Border Router Management", - "code": 1106, - "mfgCode": null, - "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "GetActiveDatasetRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetPendingDatasetRequest", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "DatasetResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "SetActiveDatasetRequest", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 }, { - "name": "SetPendingDatasetRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "BorderRouterName", - "code": 0, + "name": "RxAddressFilteredCount", + "code": 47, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4644,11 +5113,11 @@ "reportableChange": 0 }, { - "name": "BorderAgentID", - "code": 1, + "name": "RxDestAddrFilteredCount", + "code": 48, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4660,11 +5129,11 @@ "reportableChange": 0 }, { - "name": "ThreadVersion", - "code": 2, + "name": "RxDuplicatedCount", + "code": 49, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4676,11 +5145,11 @@ "reportableChange": 0 }, { - "name": "InterfaceEnabled", - "code": 3, + "name": "RxErrNoFrameCount", + "code": 50, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4692,11 +5161,11 @@ "reportableChange": 0 }, { - "name": "ActiveDatasetTimestamp", - "code": 4, + "name": "RxErrUnknownNeighborCount", + "code": 51, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4708,11 +5177,11 @@ "reportableChange": 0 }, { - "name": "PendingDatasetTimestamp", - "code": 5, + "name": "RxErrInvalidSrcAddrCount", + "code": 52, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4724,11 +5193,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "RxErrSecCount", + "code": 53, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4740,11 +5209,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RxErrFcsCount", + "code": 54, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4756,11 +5225,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "RxErrOtherCount", + "code": 55, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4772,11 +5241,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ActiveTimestamp", + "code": 56, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4788,11 +5257,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "PendingTimestamp", + "code": 57, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4804,66 +5273,27 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Delay", + "code": 58, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - } - ] - }, - { - "id": 4, - "name": "Anonymous Endpoint Type", - "deviceTypeRef": { - "code": 25, - "profileId": 259, - "label": "MA-secondary-network-interface", - "name": "MA-secondary-network-interface" - }, - "deviceTypes": [ - { - "code": 25, - "profileId": 259, - "label": "MA-secondary-network-interface", - "name": "MA-secondary-network-interface" - } - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 25 - ], - "deviceTypeName": "MA-secondary-network-interface", - "deviceTypeCode": 25, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "DeviceTypeList", - "code": 0, + "name": "SecurityPolicy", + "code": 59, "mfgCode": null, "side": "server", - "type": "array", + "type": "SecurityPolicy", "included": 1, "storageOption": "External", "singleton": 0, @@ -4875,11 +5305,11 @@ "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "ChannelPage0Mask", + "code": 60, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, @@ -4891,11 +5321,11 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "OperationalDatasetComponents", + "code": 61, "mfgCode": null, "side": "server", - "type": "array", + "type": "OperationalDatasetComponents", "included": 1, "storageOption": "External", "singleton": 0, @@ -4907,8 +5337,8 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "ActiveNetworkFaultsList", + "code": 62, "mfgCode": null, "side": "server", "type": "array", @@ -4993,10 +5423,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5009,27 +5439,44 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "ConnectionStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Thread Border Router Management", + "code": 1106, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "ScanNetworks", + "name": "GetActiveDatasetRequest", "code": 0, "mfgCode": null, "source": "client", @@ -5037,56 +5484,32 @@ "isEnabled": 1 }, { - "name": "ScanNetworksResponse", + "name": "GetPendingDatasetRequest", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "NetworkConfigResponse", - "code": 5, + "name": "DatasetResponse", + "code": 2, "mfgCode": null, "source": "server", "isIncoming": 0, "isEnabled": 1 }, { - "name": "ConnectNetwork", - "code": 6, + "name": "SetActiveDatasetRequest", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "ConnectNetworkResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ReorderNetwork", - "code": 8, + "name": "SetPendingDatasetRequest", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -5095,27 +5518,27 @@ ], "attributes": [ { - "name": "MaxNetworks", + "name": "BorderRouterName", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "char_string", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Networks", + "name": "BorderAgentID", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, @@ -5127,128 +5550,64 @@ "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", + "name": "ThreadVersion", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", + "name": "InterfaceEnabled", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InterfaceEnabled", + "name": "ActiveDatasetTimestamp", "code": 4, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkingStatus", + "name": "PendingDatasetTimestamp", "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": "SupportedThreadFeatures", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "ThreadCapabilitiesBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ThreadVersion", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5325,10 +5684,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5379,14 +5738,6 @@ "endpointId": 2, "networkId": 0, "parentEndpointIdentifier": null - }, - { - "endpointTypeName": "Anonymous Endpoint Type", - "endpointTypeIndex": 3, - "profileId": 259, - "endpointId": 3, - "networkId": 0, - "parentEndpointIdentifier": null } ] } \ No newline at end of file diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index d53a2dda721d28..9794e3672e0be9 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1269,6 +1269,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ cluster ThreadNetworkDiagnostics = 53 { revision 2; @@ -2233,7 +2270,22 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster ThreadNetworkDiagnostics { + emits event ConnectionStatus; + emits event NetworkFaultChange; callback attribute channel; callback attribute routingRole; callback attribute networkName; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 36e6c051158e73..21241a6625c7cb 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -1848,6 +1848,176 @@ } ] }, + { + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Thread Network Diagnostics", "code": 53, @@ -2954,6 +3124,22 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "ConnectionStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index a185b298747570..4e3cd330043f6c 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1269,6 +1269,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set @@ -2143,19 +2180,44 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; callback attribute channelNumber; callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; callback attribute currentMaxRate; + callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; + + handle command ResetCounts; } server cluster AdministratorCommissioning { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 1884f45a5f8b73..9a50852ab54462 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -1832,6 +1832,176 @@ } ] }, + { + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Wi-Fi Network Diagnostics", "code": 54, @@ -1839,6 +2009,16 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { "name": "BSSID", @@ -1920,6 +2100,102 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "CurrentMaxRate", "code": 11, @@ -1936,6 +2212,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2032,6 +2324,29 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.cpp b/src/platform/nxp/common/ConnectivityManagerImpl.cpp index 3473fc7515e640..938dc07f74fa5e 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/common/ConnectivityManagerImpl.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -74,6 +75,10 @@ using namespace ::chip::System; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::DeviceLayer::DeviceEventType; +// Table 9-50 "Status codes" of IEEE 802.11-2020: Unspecified failure +// Temporary default status code before SDK API to map wlan_event_reason to IEEE Status codes +#define WLAN_REFUSED_REASON_UNSPECIFIED 1 + namespace chip { namespace DeviceLayer { @@ -234,6 +239,10 @@ bool ConnectivityManagerImpl::_IsWiFiStationApplicationControlled() void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) { + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + uint8_t associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown); + #if CHIP_DETAIL_LOGGING enum wlan_connection_state state; int result; @@ -270,6 +279,12 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) case WLAN_REASON_CONNECT_FAILED: ChipLogError(DeviceLayer, "WLAN (re)connect failed"); sInstance._SetWiFiStationState(kWiFiStationState_NotConnected); + associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAssociationFailed); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } UpdateInternetConnectivityState(); break; @@ -277,6 +292,12 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) ChipLogError(DeviceLayer, "WLAN network not found"); NetworkCommissioning::NXPWiFiDriver::GetInstance().OnConnectWiFiNetwork(NetworkCommissioning::Status::kNetworkNotFound, CharSpan(), wlanEvent); + associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kSsidNotFound); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } break; case WLAN_REASON_NETWORK_AUTH_FAILED: @@ -284,6 +305,12 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) NetworkCommissioning::NXPWiFiDriver::GetInstance().OnConnectWiFiNetwork(NetworkCommissioning::Status::kAuthFailure, CharSpan(), wlanEvent); ChipLogError(DeviceLayer, "Authentication to WLAN network failed end"); + associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAuthenticationFailed); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } break; case WLAN_REASON_LINK_LOST: @@ -292,6 +319,10 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) { sInstance._SetWiFiStationState(kWiFiStationState_NotConnected); sInstance.OnStationDisconnected(); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } } break; @@ -299,6 +330,10 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) ChipLogProgress(DeviceLayer, "Disconnected from WLAN network"); sInstance._SetWiFiStationState(kWiFiStationState_NotConnected); sInstance.OnStationDisconnected(); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } break; case WLAN_REASON_INITIALIZED: @@ -330,6 +365,13 @@ void ConnectivityManagerImpl::OnStationConnected() /* Update the connectivity state in case the connected event has been received after getting an IP addr */ UpdateInternetConnectivityState(); + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + + if (delegate) + { + delegate->OnConnectionStatusChanged( + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); + } } void ConnectivityManagerImpl::OnStationDisconnected() @@ -340,6 +382,14 @@ void ConnectivityManagerImpl::OnStationDisconnected() event.WiFiConnectivityChange.Result = kConnectivity_Lost; (void) PlatformMgr().PostEvent(&event); + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + + if (delegate) + { + delegate->OnConnectionStatusChanged( + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); + } + /* Update the connectivity state in case the connected event has been received after getting an IP addr */ UpdateInternetConnectivityState(); } @@ -613,7 +663,11 @@ CHIP_ERROR ConnectivityManagerImpl::ProvisionWiFiNetwork(const char * ssid, uint // Need to enable the WIFI interface here when Thread is enabled as a secondary network interface. We don't want to enable // WIFI from the init phase anymore and we will only do it in case the commissioner is provisioning the device with // the WIFI credentials. - StartWiFiManagement(); + if (mWifiManagerInit == false) + { + StartWiFiManagement(); + mWifiManagerInit = true; + } memset(pNetworkData, 0, sizeof(struct wlan_network)); diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.h b/src/platform/nxp/common/ConnectivityManagerImpl.h index a187d0baf39e60..159dff2c72bf10 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.h +++ b/src/platform/nxp/common/ConnectivityManagerImpl.h @@ -138,6 +138,8 @@ class ConnectivityManagerImpl final : public ConnectivityManager, bool mBorderRouterInit = false; #if CHIP_DEVICE_CONFIG_ENABLE_WPA + bool mWifiManagerInit = false; + enum WiFiEventGroup{ kWiFiEventGroup_WiFiStationModeBit = (1 << 0), }; diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp index 93a73d2767b8d3..5158b6ac21f26d 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp @@ -36,10 +36,14 @@ #if CHIP_DEVICE_CONFIG_ENABLE_WPA extern "C" { +#include "wlan.h" #include } #endif +// Not implement into the SDK +// extern "C" void xPortResetHeapMinimumEverFreeHeapSize(void); + namespace chip { namespace DeviceLayer { @@ -49,6 +53,103 @@ DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() return sInstance; } +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) +{ + size_t freeHeapSize; + + freeHeapSize = xPortGetFreeHeapSize(); + currentHeapFree = static_cast(freeHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed) +{ + size_t freeHeapSize; + size_t usedHeapSize; + + freeHeapSize = xPortGetFreeHeapSize(); + usedHeapSize = configTOTAL_HEAP_SIZE - freeHeapSize; + + currentHeapUsed = static_cast(usedHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) +{ + size_t highWatermarkHeapSize; + + highWatermarkHeapSize = configTOTAL_HEAP_SIZE - xPortGetMinimumEverFreeHeapSize(); + currentHeapHighWatermark = static_cast(highWatermarkHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() +{ + // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the + // value of the CurrentHeapUsed. + + // Not implement into the SDK + // xPortResetHeapMinimumEverFreeHeapSize(); + + // return CHIP_NO_ERROR; + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) +{ + /* Obtain all available task information */ + TaskStatus_t * taskStatusArray; + ThreadMetrics * head = nullptr; + unsigned long arraySize, x, dummy; + + arraySize = uxTaskGetNumberOfTasks(); + + taskStatusArray = (TaskStatus_t *) pvPortMalloc(arraySize * sizeof(TaskStatus_t)); + + if (taskStatusArray != NULL) + { + /* Generate raw status information about each task. */ + arraySize = uxTaskGetSystemState(taskStatusArray, arraySize, &dummy); + /* For each populated position in the taskStatusArray array, + format the raw data as human readable ASCII data. */ + + for (x = 0; x < arraySize; x++) + { + ThreadMetrics * thread = (ThreadMetrics *) pvPortMalloc(sizeof(ThreadMetrics)); + + Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); + thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); + thread->id = taskStatusArray[x].xTaskNumber; + + thread->stackFreeMinimum.Emplace(taskStatusArray[x].usStackHighWaterMark); + + /* Unsupported metrics */ + thread->stackFreeCurrent.ClearValue(); + thread->stackSize.ClearValue(); + + thread->Next = head; + head = thread; + } + + *threadMetricsOut = head; + /* The array is no longer needed, free the memory it consumes. */ + vPortFree(taskStatusArray); + } + + return CHIP_NO_ERROR; +} + +void DiagnosticDataProviderImpl::ReleaseThreadMetrics(ThreadMetrics * threadMetrics) +{ + while (threadMetrics) + { + ThreadMetrics * del = threadMetrics; + threadMetrics = threadMetrics->Next; + vPortFree(del); + } +} + CHIP_ERROR DiagnosticDataProviderImpl::GetRebootCount(uint16_t & rebootCount) { uint32_t count = 0; @@ -250,15 +351,14 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) return CHIP_NO_ERROR; } -#if DGWIFI_RESET_COUNTS_SUPPORTED CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - beaconLostCount = stats.bcn_miss_cnt; + beaconLostCount = stats.bcn_miss_cnt - mBeaconLostCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -268,11 +368,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconL CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - beaconRxCount = stats.bcn_rcv_cnt; + beaconRxCount = stats.bcn_rcv_cnt - mBeaconRxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -282,11 +382,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxC CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - packetMulticastRxCount = stats.mcast_rx_frame; + packetMulticastRxCount = stats.mcast_rx_frame - mPacketMulticastRxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -296,11 +396,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - packetMulticastTxCount = stats.mcast_tx_frame; + packetMulticastTxCount = stats.mcast_tx_frame - mPacketMulticastTxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -310,18 +410,69 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); + if (ret == WM_SUCCESS) + { + packetUnicastTxCount = stats.tx_frame - mPacketUnicastTxCount; + return CHIP_NO_ERROR; + } +#endif /* CONFIG_WIFI_GET_LOG */ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +#if SDK_2_16_100 +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) +{ +#ifdef CONFIG_WIFI_GET_LOG + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - packetUnicastTxCount = stats.tx_frame; + packetUnicastRxCount = stats.rx_unicast_cnt - mPacketUnicastRxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -#endif /* DGWIFI_RESET_COUNTS_SUPPORTED */ +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) +{ +#ifdef CONFIG_WIFI_GET_LOG + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); + if (ret == WM_SUCCESS) + { + overrunCount = (stats.tx_overrun_cnt + stats.rx_overrun_cnt) - mOverrunCount; + return CHIP_NO_ERROR; + } +#endif /* CONFIG_WIFI_GET_LOG */ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +#endif + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts(void) +{ +#ifdef CONFIG_WIFI_GET_LOG + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); + if (ret == WM_SUCCESS) + { + mPacketUnicastTxCount = stats.tx_frame; + mPacketMulticastTxCount = stats.mcast_tx_frame; + mPacketMulticastRxCount = stats.mcast_rx_frame; + mBeaconRxCount = stats.bcn_rcv_cnt; + mBeaconLostCount = stats.bcn_miss_cnt; +#if SDK_2_16_100 + mPacketUnicastRxCount = stats.rx_unicast_cnt; + mOverrunCount = stats.tx_overrun_cnt + stats.rx_overrun_cnt; +#endif + return CHIP_NO_ERROR; + } +#endif /* CONFIG_WIFI_GET_LOG */ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} #endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.h b/src/platform/nxp/common/DiagnosticDataProviderImpl.h index 1f6af84e267f34..5b9fc4c9ae894b 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.h +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.h @@ -27,16 +27,6 @@ #include -/** - * DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() is - * currently not supported due to missing reset feature from SDK's wifi driver. - * For this reason, the PKTCNT (beaconRxCount, packetMulticastRxCount, - * packetMulticastTxCount, packetUnicastRxCount, packetUnicastTxCount) - * and ERRCNT (beaconLostCount, overrunCount) features of DGWIFI cluster - * are currently not supported. - */ -#define DGWIFI_RESET_COUNTS_SUPPORTED 0 - namespace chip { namespace DeviceLayer { @@ -49,7 +39,12 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider static DiagnosticDataProviderImpl & GetDefaultInstance(); // ===== Methods that implement the PlatformManager abstract interface. - + CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; + CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; + CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; + CHIP_ERROR ResetWatermarks() override; + CHIP_ERROR GetThreadMetrics(ThreadMetrics ** threadMetricsOut) override; + void ReleaseThreadMetrics(ThreadMetrics * threadMetrics) override; CHIP_ERROR GetRebootCount(uint16_t & rebootCount) override; CHIP_ERROR GetUpTime(uint64_t & upTime) override; CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; @@ -64,18 +59,26 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; -#if DGWIFI_RESET_COUNTS_SUPPORTED CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override; CHIP_ERROR GetWiFiBeaconRxCount(uint32_t & beaconRxCount) override; CHIP_ERROR GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) override; CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override; CHIP_ERROR GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) override; - /** - * TODO : This should reset BeaconLostCount, BeaconRxCount, PacketMulticastRxCount, - * PacketMulticastTxCount, PacketUnicastRxCount, PacketUnicastTxCount - */ - // CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override; -#endif /* DGWIFI_RESET_COUNTS_SUPPORTED */ + CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override; +#if SDK_2_16_100 + CHIP_ERROR GetWiFiOverrunCount(uint64_t & overrunCount) override; + CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastTxCount) override; +#endif + + uint32_t mBeaconRxCount = 0; + uint32_t mBeaconLostCount = 0; + uint32_t mPacketMulticastRxCount = 0; + uint32_t mPacketMulticastTxCount = 0; + uint32_t mPacketUnicastTxCount = 0; +#if SDK_2_16_100 + uint32_t mPacketUnicastRxCount = 0; + uint64_t mOverrunCount = 0; +#endif #endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ }; diff --git a/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp b/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp index e1348f946c1865..f1f35937d8b24e 100644 --- a/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp @@ -142,38 +142,10 @@ Status NXPWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, Mu Status NXPWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) { - int err_code = 0; - outDebugText.reduce_size(0); outNetworkIndex = 0; - VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); - - err_code = wlan_remove_network((char *) networkId.data()); - - switch (err_code) - { - case -WM_E_INVAL: - ChipLogError(DeviceLayer, "Error: Network not found"); - break; - - case WM_SUCCESS: - /* Use empty ssid for representing invalid network */ - mStagingNetwork.ssidLen = 0; - memset(mStagingNetwork.ssid, 0, DeviceLayer::Internal::kMaxWiFiSSIDLength); - memset(mStagingNetwork.credentials, 0, DeviceLayer::Internal::kMaxWiFiKeyLength); - /* Save to persistent memory */ - CommitConfiguration(); - ChipLogProgress(DeviceLayer, "Successfully removed network"); - break; - - case WLAN_ERROR_STATE: - ChipLogError(DeviceLayer, "Error: Can't remove network in this state"); - break; - - default: - ChipLogError(DeviceLayer, "Error: Unable to remove network"); - break; - } + // Use empty ssid for representing invalid network + mStagingNetwork.ssidLen = 0; return Status::kSuccess; } From 57fb2e1793c3a08e29be02b0e6089cd2eb81b1d9 Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:35:43 +0300 Subject: [PATCH 4/9] [NXP] App button manager rework (#35859) * [nxp][examples][common] Rework button manager Create an abstraction over SDK buttons. If an app needs a custom behavior for a specific button: - it can implement the Button interface, similar to the ButtonDefault implementation - it can implement a ButtonWithTimer derived class, to also have access to timer behavior, such as scheduling a delay for a specific action (e.g. factory reset after 6s) The ButtonManager is responsible with registering Button instances. The button callback is common across all buttons because it delegates the proper action handling to the button itself through the provided Button::Handle* API. The ButtonRegistration header provides an API that can be used by other components (e.g. AppTask) to initialize the ButtonManager and register buttons. A default implementation is provided. Some button examples are implemented: - ButtonApp - ButtonBle - ButtonDefault Check the corresponding header for a description of actions. Signed-off-by: marius-alex-tache * [nxp][examples][common] Update register buttons API usage Update AppEvent structure for some apps to take into account a way to pass extra args to App event processing. Signed-off-by: marius-alex-tache * [nxp][examples][mcxw71_k32w1] Rework button manager Update build system files for all impacted applications. Signed-off-by: marius-alex-tache * [nxp][examples][rw61x] Update empty button registration path Signed-off-by: marius-alex-tache * [nxp][examples][common] Add double click button action for ButtonBle Double clicking the ButtonBle will trigger a toggle of SIT mode request through the DSLS mechanism. Signed-off-by: marius-alex-tache * Restyled by gn * Restyled by prettier-markdown --------- Signed-off-by: marius-alex-tache Co-authored-by: Restyled.io --- .../all-clusters-app/nxp/rt/rw61x/BUILD.gn | 2 +- .../nxp/common/include/AppEvent.h | 1 + .../contact-sensor-app/nxp/k32w1/BUILD.gn | 10 +- .../contact-sensor-app/nxp/mcxw71/BUILD.gn | 10 +- .../laundry-washer-app/nxp/rt/rw61x/BUILD.gn | 2 +- .../nxp/common/include/AppEvent.h | 1 + examples/lighting-app/nxp/k32w1/BUILD.gn | 10 +- examples/lighting-app/nxp/k32w1/README.md | 4 +- examples/lighting-app/nxp/mcxw71/BUILD.gn | 10 +- .../nxp/common/main/include/AppEvent.h | 1 + examples/lock-app/nxp/k32w1/BUILD.gn | 10 +- examples/lock-app/nxp/mcxw71/BUILD.gn | 10 +- .../app_task/source/AppTaskFreeRTOS.cpp | 6 +- .../nxp/common/matter_button/include/Button.h | 52 ++++ .../common/matter_button/include/ButtonApp.h | 44 ++++ .../common/matter_button/include/ButtonBle.h | 48 ++++ .../matter_button/include/ButtonDefault.h | 43 +++ .../matter_button/include/ButtonManager.h | 58 ++++ ...AppMatterButton.h => ButtonRegistration.h} | 29 +- .../matter_button/include/ButtonWithTimer.h | 50 ++++ .../matter_button/source/AppMatterButton.cpp | 81 ------ .../common/matter_button/source/ButtonApp.cpp | 57 ++++ .../common/matter_button/source/ButtonBle.cpp | 142 ++++++++++ .../matter_button/source/ButtonDefault.cpp | 48 ++++ .../matter_button/source/ButtonManager.cpp | 67 +++++ .../source/ButtonRegistrationAppAndBle.cpp | 37 +++ .../source/ButtonRegistrationDefault.cpp | 33 +++ ...nEmpty.cpp => ButtonRegistrationEmpty.cpp} | 11 +- .../matter_button/source/ButtonWithTimer.cpp | 86 ++++++ .../nxp/mcxw71_k32w1/button/ButtonManager.cpp | 247 ------------------ .../nxp/mcxw71_k32w1/button/ButtonManager.h | 118 --------- .../platform/nxp/mcxw71_k32w1/rpc/AppRpc.cpp | 15 +- examples/thermostat/nxp/rt/rw61x/BUILD.gn | 2 +- 33 files changed, 837 insertions(+), 508 deletions(-) create mode 100644 examples/platform/nxp/common/matter_button/include/Button.h create mode 100644 examples/platform/nxp/common/matter_button/include/ButtonApp.h create mode 100644 examples/platform/nxp/common/matter_button/include/ButtonBle.h create mode 100644 examples/platform/nxp/common/matter_button/include/ButtonDefault.h create mode 100644 examples/platform/nxp/common/matter_button/include/ButtonManager.h rename examples/platform/nxp/common/matter_button/include/{AppMatterButton.h => ButtonRegistration.h} (60%) create mode 100644 examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h delete mode 100644 examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonApp.cpp create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonBle.cpp create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonManager.cpp create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonRegistrationAppAndBle.cpp create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonRegistrationDefault.cpp rename examples/platform/nxp/common/matter_button/source/{AppMatterButtonEmpty.cpp => ButtonRegistrationEmpty.cpp} (77%) create mode 100644 examples/platform/nxp/common/matter_button/source/ButtonWithTimer.cpp delete mode 100644 examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp delete mode 100644 examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h diff --git a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn index bdc878cc0f5250..19fa822ec24688 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn @@ -170,7 +170,7 @@ rt_executable("all_cluster_app") { "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", "${common_example_dir}/icd/source/ICDUtil.cpp", - "${common_example_dir}/matter_button/source/AppMatterButtonEmpty.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", ] deps = [ diff --git a/examples/contact-sensor-app/nxp/common/include/AppEvent.h b/examples/contact-sensor-app/nxp/common/include/AppEvent.h index b292afaddf8c18..562c0b4df66dcb 100644 --- a/examples/contact-sensor-app/nxp/common/include/AppEvent.h +++ b/examples/contact-sensor-app/nxp/common/include/AppEvent.h @@ -24,4 +24,5 @@ typedef void (*EventHandler)(const AppEvent &); struct AppEvent { EventHandler Handler; + void * extra; }; diff --git a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn index 8e215d4c7d6517..1b57e5f3cf9061 100644 --- a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn @@ -149,6 +149,11 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -193,10 +198,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn index cf22ec5c658509..8bba2393f8fc43 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn +++ b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn @@ -148,6 +148,11 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -192,10 +197,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn index cb0b7ba0a96439..7f22eca6b2c085 100644 --- a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn @@ -171,7 +171,7 @@ rt_executable("laundry-washer") { "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", "${common_example_dir}/icd/source/ICDUtil.cpp", - "${common_example_dir}/matter_button/source/AppMatterButtonEmpty.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", ] deps = [ diff --git a/examples/lighting-app/nxp/common/include/AppEvent.h b/examples/lighting-app/nxp/common/include/AppEvent.h index b292afaddf8c18..562c0b4df66dcb 100644 --- a/examples/lighting-app/nxp/common/include/AppEvent.h +++ b/examples/lighting-app/nxp/common/include/AppEvent.h @@ -24,4 +24,5 @@ typedef void (*EventHandler)(const AppEvent &); struct AppEvent { EventHandler Handler; + void * extra; }; diff --git a/examples/lighting-app/nxp/k32w1/BUILD.gn b/examples/lighting-app/nxp/k32w1/BUILD.gn index 54030a789763ea..57a1b7921fcaf9 100644 --- a/examples/lighting-app/nxp/k32w1/BUILD.gn +++ b/examples/lighting-app/nxp/k32w1/BUILD.gn @@ -156,6 +156,11 @@ mcxw71_k32w1_executable("light_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -180,10 +185,7 @@ mcxw71_k32w1_executable("light_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lighting-app/nxp/k32w1/README.md b/examples/lighting-app/nxp/k32w1/README.md index c47449bf249490..d61ab1e42431d4 100644 --- a/examples/lighting-app/nxp/k32w1/README.md +++ b/examples/lighting-app/nxp/k32w1/README.md @@ -220,8 +220,8 @@ by running: The console should have already been installed in the virtual environment. From the `chip-console`, a user can send specific commands to the device. -For button commands, please run `rpcs.chip.rpc.Button.Event(index)` based on the -table below: +For button commands, please run `rpcs.chip.rpc.Button.Event(idx=index)` based on +the table below: | index | action | | ----- | --------------------------------------------- | diff --git a/examples/lighting-app/nxp/mcxw71/BUILD.gn b/examples/lighting-app/nxp/mcxw71/BUILD.gn index efd3af6fd5e19a..f7e9c42b6e752c 100644 --- a/examples/lighting-app/nxp/mcxw71/BUILD.gn +++ b/examples/lighting-app/nxp/mcxw71/BUILD.gn @@ -156,6 +156,11 @@ mcxw71_k32w1_executable("light_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -183,10 +188,7 @@ mcxw71_k32w1_executable("light_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lock-app/nxp/common/main/include/AppEvent.h b/examples/lock-app/nxp/common/main/include/AppEvent.h index 065078a52e7a72..06522efbee9f70 100644 --- a/examples/lock-app/nxp/common/main/include/AppEvent.h +++ b/examples/lock-app/nxp/common/main/include/AppEvent.h @@ -48,4 +48,5 @@ struct AppEvent }; EventHandler Handler; + void * extra; }; diff --git a/examples/lock-app/nxp/k32w1/BUILD.gn b/examples/lock-app/nxp/k32w1/BUILD.gn index 602398e0d604b4..c10cc05475ffee 100644 --- a/examples/lock-app/nxp/k32w1/BUILD.gn +++ b/examples/lock-app/nxp/k32w1/BUILD.gn @@ -154,6 +154,11 @@ mcxw71_k32w1_executable("lock_app") { sources += [ "${common_example_dir}/app_task/source/AppTaskBase.cpp", "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", #"${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", @@ -221,10 +226,7 @@ mcxw71_k32w1_executable("lock_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lock-app/nxp/mcxw71/BUILD.gn b/examples/lock-app/nxp/mcxw71/BUILD.gn index 6d105f16ffd163..0c34d3d8083a20 100644 --- a/examples/lock-app/nxp/mcxw71/BUILD.gn +++ b/examples/lock-app/nxp/mcxw71/BUILD.gn @@ -154,6 +154,11 @@ mcxw71_k32w1_executable("lock_app") { sources += [ "${common_example_dir}/app_task/source/AppTaskBase.cpp", "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", #"${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", @@ -221,10 +226,7 @@ mcxw71_k32w1_executable("lock_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp b/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp index 5b8e3eab70be40..ec394b4ac40fc4 100644 --- a/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp +++ b/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp @@ -21,7 +21,7 @@ #include #include -#include "AppMatterButton.h" +#include "ButtonRegistration.h" #include "CHIPDeviceManager.h" #include @@ -98,10 +98,10 @@ CHIP_ERROR chip::NXP::App::AppTaskFreeRTOS::AppMatter_Register() #endif /* Register Matter buttons */ - err = AppMatterButton_registerButtons(); + err = chip::NXP::App::RegisterButtons(); if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "Error during AppMatterButton_registerButtons"); + ChipLogError(DeviceLayer, "Error during button registration"); return err; } return err; diff --git a/examples/platform/nxp/common/matter_button/include/Button.h b/examples/platform/nxp/common/matter_button/include/Button.h new file mode 100644 index 00000000000000..7485cf9bd88f76 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/Button.h @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2024 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 "fsl_component_button.h" + +#include + +namespace chip::NXP::App { + +/** + * @brief This class is an abstraction over an SDK button. + * + */ +class Button +{ +public: + using Callback = button_status_t (*)(void * handle, button_callback_message_t * message, void * param); + + virtual ~Button() = default; + + virtual CHIP_ERROR Init() = 0; + virtual void HandleShortPress() = 0; + virtual void HandleLongPress() = 0; + virtual void HandleDoubleClick() = 0; + + /** + * @brief This is an SDK handle for a button. + * + * It should be set in the Init method, based on a newly defined + * handle or an already defined handle owned by the SDK. + */ + button_handle_t handle = nullptr; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonApp.h b/examples/platform/nxp/common/matter_button/include/ButtonApp.h new file mode 100644 index 00000000000000..3ace28f30a4094 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonApp.h @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2024 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 "Button.h" + +namespace chip::NXP::App { +/** + * @brief This class implements a custom app button behavior. + * + * | Action | Effect | + * | ------------ | --------------------------------- | + * | Short press | Switch a cluster attribute state | + * | Long press | Schedule a soft reset taking into | + * | | account Matter shutdown mechanism | + * | Double click | Do nothing | + * + */ +class ButtonApp : public Button +{ +public: + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonBle.h b/examples/platform/nxp/common/matter_button/include/ButtonBle.h new file mode 100644 index 00000000000000..75b35f25d355f1 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonBle.h @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2024 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 "ButtonWithTimer.h" + +namespace chip::NXP::App { + +/** + * @brief This class implements a customized default button behavior. + * + * | Action | Effect | + * | ------------ | -------------------------------------------------- | + * | Short press | If a factory reset is scheduled, cancel it. | + * | | Else if the device is commissioned and a factory | + * | | reset is not scheduled, switch to ICD active mode. | + * | | Otherwise, switch commissioning state. | + * | Long press | Schedule a factory reset | + * | Double click | Toggle SIT mode request through DSLS mechanism | + * + */ +class ButtonBle : public ButtonWithTimer +{ +public: + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; + virtual void HandleTimerExpire() override; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonDefault.h b/examples/platform/nxp/common/matter_button/include/ButtonDefault.h new file mode 100644 index 00000000000000..4241f0465acf25 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonDefault.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2024 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 "Button.h" + +namespace chip::NXP::App { +/** + * @brief This class implements a default button behavior. + * + * | Action | Effect | + * | ------------ | -------------------------- | + * | Short press | Switch commissioning state | + * | Long press | Schedule a factory reset | + * | Double click | Do nothing | + * + */ +class ButtonDefault : public Button +{ +public: + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonManager.h b/examples/platform/nxp/common/matter_button/include/ButtonManager.h new file mode 100644 index 00000000000000..44ad191e2eef12 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonManager.h @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2024 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 "Button.h" + +#include + +namespace chip::NXP::App { + +/** + * @brief This class describes a manager over Button operations. + * + */ +class ButtonManager +{ +public: + static ButtonManager sInstance; + + CHIP_ERROR Init(); + + /** + * @brief API for registering a Button object. + * + */ + CHIP_ERROR RegisterButton(Button & button); + + /** + * @brief Generic callback for all registered buttons. + * + * Event handling is delegated to Button objects. + * + */ + static button_status_t HandleCallbacks(void * buttonHandle, button_callback_message_t * message, void * callbackParam); +}; + +inline ButtonManager & ButtonMgr() +{ + return ButtonManager::sInstance; +} + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/AppMatterButton.h b/examples/platform/nxp/common/matter_button/include/ButtonRegistration.h similarity index 60% rename from examples/platform/nxp/common/matter_button/include/AppMatterButton.h rename to examples/platform/nxp/common/matter_button/include/ButtonRegistration.h index dd00a5c80d719f..c47eeba7acbddc 100644 --- a/examples/platform/nxp/common/matter_button/include/AppMatterButton.h +++ b/examples/platform/nxp/common/matter_button/include/ButtonRegistration.h @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors - * Copyright 2023-2024 NXP + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,29 +16,17 @@ * limitations under the License. */ -#ifndef _MATTER_BUTTON_H_ -#define _MATTER_BUTTON_H_ +#pragma once #include -#ifdef __cplusplus -extern "C" { -#endif +namespace chip::NXP::App { -namespace chip { -namespace NXP { -namespace App { /** - * API allowing to register matter buttons + * @brief API used by app task to register buttons. + * + * The default implementation will register a single ButtonDefault instance. */ -CHIP_ERROR AppMatterButton_registerButtons(void); - -} // namespace App -} // namespace NXP -} // namespace chip - -#ifdef __cplusplus -} -#endif +CHIP_ERROR RegisterButtons(); -#endif /* _MATTER_BUTTON_H_ */ +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h b/examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h new file mode 100644 index 00000000000000..6620bae9ec0288 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h @@ -0,0 +1,50 @@ +/* + * + * Copyright (c) 2024 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 "Button.h" +#include "FreeRTOS.h" +#include "timers.h" + +namespace chip::NXP::App { +/** + * @brief This class implements a default button with timer behavior. + * + * This class provides an API for starting/cancelling the timer. It can + * be used by derived classes to define their own timer handler behavior. + */ +class ButtonWithTimer : public Button +{ +public: + ButtonWithTimer(); + + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; + + virtual void HandleTimerExpire(); + + void CancelTimer(); + void StartTimer(uint32_t aTimeoutInMs); + + TimerHandle_t timer; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp b/examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp deleted file mode 100644 index be5adc975c2f79..00000000000000 --- a/examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp +++ /dev/null @@ -1,81 +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. - */ - -#include "AppMatterButton.h" -#include "AppTaskBase.h" -#include "board_comp.h" -#include "fsl_component_timer_manager.h" -#include "fwk_platform.h" -#include - -static BUTTON_HANDLE_DEFINE(sdkButtonHandle); - -static button_status_t AppMatterButton_ButtonCallback(void * buttonHandle, button_callback_message_t * message, - void * callbackParam) -{ - switch (message->event) - { - case kBUTTON_EventShortPress: - case kBUTTON_EventOneClick: - chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); - break; - case kBUTTON_EventLongPress: - chip::NXP::App::GetAppTask().FactoryResetHandler(); - break; - default: - break; - } - return kStatus_BUTTON_Success; -} - -CHIP_ERROR chip::NXP::App::AppMatterButton_registerButtons(void) -{ - button_config_t buttonConfig; - button_status_t bStatus; - CHIP_ERROR err = CHIP_NO_ERROR; - - do - { - /* Init the Platform Timer Manager */ - if (PLATFORM_InitTimerManager() != 0) - { - err = CHIP_ERROR_UNEXPECTED_EVENT; - ChipLogError(DeviceLayer, "tmr init error"); - break; - } - - /* Init board buttons */ - bStatus = BOARD_InitButton((button_handle_t) sdkButtonHandle); - if (bStatus != kStatus_BUTTON_Success) - { - err = CHIP_ERROR_UNEXPECTED_EVENT; - ChipLogError(DeviceLayer, "button init error"); - break; - } - bStatus = BUTTON_InstallCallback((button_handle_t) sdkButtonHandle, AppMatterButton_ButtonCallback, NULL); - - if (bStatus != kStatus_BUTTON_Success) - { - err = CHIP_ERROR_UNEXPECTED_EVENT; - ChipLogError(DeviceLayer, "button init error"); - break; - } - } while (0); - - return err; -} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp b/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp new file mode 100644 index 00000000000000..3b03b413ec2a93 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp @@ -0,0 +1,57 @@ +/* + * + * Copyright (c) 2024 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 "ButtonApp.h" +#include "AppTaskBase.h" + +extern "C" { +#include "app.h" +#include "board_comp.h" +} + +CHIP_ERROR chip::NXP::App::ButtonApp::Init() +{ + // Button is initialized in otSysInit, when APP_InitServices is called. + // Overwrite the handle to reference the SDK handle. + handle = &g_buttonHandle[1]; + + return CHIP_NO_ERROR; +} + +void chip::NXP::App::ButtonApp::HandleShortPress() +{ + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { + auto status = chip::NXP::App::GetAppTask().ProcessSetStateClusterHandler(); + if (status != CHIP_NO_ERROR) + { + ChipLogProgress(DeviceLayer, "Error when updating cluster attribute"); + } + }, + (intptr_t) nullptr); +} + +void chip::NXP::App::ButtonApp::HandleLongPress() +{ + chip::DeviceLayer::PlatformMgrImpl().CleanReset(); +} + +void chip::NXP::App::ButtonApp::HandleDoubleClick() +{ + /* Currently not mapped to any action */ +} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonBle.cpp b/examples/platform/nxp/common/matter_button/source/ButtonBle.cpp new file mode 100644 index 00000000000000..447b0b04529825 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonBle.cpp @@ -0,0 +1,142 @@ +/* + * + * Copyright (c) 2024 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 "ButtonBle.h" +#include "AppTaskBase.h" +#include "BLEApplicationManager.h" +#include "UserInterfaceFeedback.h" + +extern "C" { +#include "app.h" +#include "board_comp.h" +} + +#include + +/** + * @brief Timeout (ms) for factory data reset action. + * + * During this timeout, the factory reset action can be cancelled by pressing a button. + */ +#ifndef BLE_BUTTON_FACTORY_RESET_TIMEOUT_MS +#define BLE_BUTTON_FACTORY_RESET_TIMEOUT_MS 6000 +#endif + +static void BleHandleLongPress(const AppEvent & event) +{ + auto & button = *static_cast(event.extra); + + if (xTimerIsTimerActive(button.timer)) + { + button.CancelTimer(); +#if CONFIG_ENABLE_FEEDBACK + FeedbackMgr().RestoreState(); +#endif + ChipLogProgress(DeviceLayer, "Factory Reset was cancelled!"); + } + else + { + uint32_t resetTimeout = BLE_BUTTON_FACTORY_RESET_TIMEOUT_MS; + ChipLogProgress(DeviceLayer, "Factory Reset Triggered. Push the RESET button within %lu ms to cancel!", resetTimeout); + +#if CONFIG_ENABLE_FEEDBACK + FeedbackMgr().DisplayOnAction(UserInterfaceFeedback::Action::kFactoryReset); +#endif + button.StartTimer(resetTimeout); + } +} + +static void BleHandleShortPress(const AppEvent & event) +{ + auto & button = *static_cast(event.extra); + if (xTimerIsTimerActive(button.timer)) + { + // If a factory reset is scheduled, pressing the BLE button will cancel it. + BleHandleLongPress(event); + return; + } + +#if CHIP_CONFIG_ENABLE_ICD_LIT + if (chip::DeviceLayer::ConfigurationMgr().IsFullyProvisioned()) + { + // If the device is commissioned and a factory reset is not scheduled, switch to active mode. + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifyNetworkActivityNotification(); }, 0); + return; + } +#endif + + chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); + chip::NXP::App::BleAppMgr().EnableMultipleConnectionsHandler(); +} + +CHIP_ERROR chip::NXP::App::ButtonBle::Init() +{ + // Button is initialized in otSysInit, when APP_InitServices is called. + // Overwrite the handle to reference the SDK handle. + handle = &g_buttonHandle[0]; + + return CHIP_NO_ERROR; +} + +void chip::NXP::App::ButtonBle::HandleShortPress() +{ + AppEvent event; + event.Handler = BleHandleShortPress; + event.extra = this; + chip::NXP::App::GetAppTask().PostEvent(event); +} + +void chip::NXP::App::ButtonBle::HandleLongPress() +{ + AppEvent event; + event.Handler = BleHandleLongPress; + event.extra = this; + chip::NXP::App::GetAppTask().PostEvent(event); +} + +void chip::NXP::App::ButtonBle::HandleDoubleClick() +{ +#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS) + static bool sitModeRequested = false; + + if (chip::DeviceLayer::ConfigurationMgr().IsFullyProvisioned()) + { + if (!sitModeRequested) + { + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestNotification(); }, 0); + sitModeRequested = true; + } + else + { + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestWithdrawal(); }, 0); + sitModeRequested = false; + } + } +#endif +} + +void chip::NXP::App::ButtonBle::HandleTimerExpire() +{ + ChipLogProgress(DeviceLayer, "Device will factory reset..."); + + // Actually trigger Factory Reset + chip::Server::GetInstance().ScheduleFactoryReset(); +} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp b/examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp new file mode 100644 index 00000000000000..526bcd3e8bd5a3 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2024 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 "ButtonDefault.h" +#include "AppTaskBase.h" +#include "board_comp.h" + +BUTTON_HANDLE_DEFINE(sHandle); + +CHIP_ERROR chip::NXP::App::ButtonDefault::Init() +{ + handle = sHandle; + + auto status = BOARD_InitButton(handle); + VerifyOrReturnError(status == kStatus_BUTTON_Success, CHIP_ERROR_UNEXPECTED_EVENT); + + return CHIP_NO_ERROR; +} + +void chip::NXP::App::ButtonDefault::HandleShortPress() +{ + chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); +} + +void chip::NXP::App::ButtonDefault::HandleLongPress() +{ + chip::NXP::App::GetAppTask().FactoryResetHandler(); +} + +void chip::NXP::App::ButtonDefault::HandleDoubleClick() +{ + /* Currently not mapped to any action */ +} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp b/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp new file mode 100644 index 00000000000000..046337397a3c3c --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2024 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 "ButtonManager.h" +#include "fwk_platform.h" + +#include +#include + +chip::NXP::App::ButtonManager chip::NXP::App::ButtonManager::sInstance; + +CHIP_ERROR chip::NXP::App::ButtonManager::Init() +{ + VerifyOrReturnError(PLATFORM_InitTimerManager() >= 0, CHIP_ERROR_UNEXPECTED_EVENT); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::NXP::App::ButtonManager::RegisterButton(Button & button) +{ + ReturnErrorOnFailure(button.Init()); + VerifyOrReturnError(button.handle != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + auto status = BUTTON_InstallCallback(button.handle, ButtonManager::HandleCallbacks, &button); + VerifyOrReturnError(status == kStatus_BUTTON_Success, CHIP_ERROR_UNEXPECTED_EVENT); + + return CHIP_NO_ERROR; +} + +button_status_t chip::NXP::App::ButtonManager::HandleCallbacks(void * buttonHandle, button_callback_message_t * message, + void * callbackParam) +{ + auto * button = static_cast