Skip to content

Commit

Permalink
Add Replaceable Monitoring Cluster Definition (project-chip#26431)
Browse files Browse the repository at this point in the history
* Add Replacable Monitoring Cluster Definition

* Add Cluster Definition to Relevant Lists

* Enable New Clusters in Darvin and Android Clients

* Add Clusters to Cluster List

* Add Generated Code

* Fix Code Formatting for Java Files

When generating the code on macOS the java files cannot be formated due to the missing formatter. This commit regenerated the code inside a linux devcontainer which has the required tools and therefore formats the java files correctly.

* Add Cluster Definition to CI Tests

* Add Missing Cluster in Cluster List

* Fix Java Code Gen

* Revert Parameter Re-Ordering

In order to keep the delta minimal the arguments to that script should not be re-ordered alphabetically.

* Add Cluster Definition to CI Tests

* Revert Re-Ordering

* Add New Cluster

* Revert Re-Ordering

* Add New Cluster

* Re-Add Changes

The changes got lost during pre-re-ordering reconstruction. This commit re-introduces those chanes.

* Revert Re-Sorting

* Revert Re-Ordering

* Re-Add Changes

The changes got lost during pre-re-ordering reconstruction. This commit re-introduces those chanes.

* Add Expected Generated Files

* Update Generated Code

* Update Feature Map Name

* Move Line to Nearly Correct Position 😅

* Fix Attribute Definitions

- Defines need to be the attribute name not the cluster name
- Optionality was missing

* Update Cluster Defines

Defines should match other defines in the SDK. The pattern was missing the _CLUSTER suffix

* Fix ZAP File

ZAP does not really well handle things if cluster defines get renamed 😱
  • Loading branch information
Thomas Hartwig authored and pull[bot] committed Aug 22, 2023
1 parent 9564371 commit 2c39be2
Show file tree
Hide file tree
Showing 51 changed files with 71,649 additions and 11,762 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ jobs:
src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \
src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/replacable-monitoring-cluster.xml \
"
- name: Build Apps
timeout-minutes: 60
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ load "../src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml"
load "../src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml";
load "../src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/replacable-monitoring-cluster.xml";

all endpoints {
// These attributes follow a different code path and do not have to be
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<xi:include href="chip/pump-configuration-and-control-cluster.xml" />
<xi:include href="chip/pwm-cluster.xml" />
<xi:include href="chip/relative-humidity-measurement-cluster.xml" />
<xi:include href="chip/replacable-monitoring-cluster.xml.xml" />
<xi:include href="chip/scene.xml" />
<xi:include href="chip/software-diagnostics-cluster.xml" />
<xi:include href="chip/switch-cluster.xml" />
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"pump-configuration-and-control-cluster.xml",
"pwm-cluster.xml",
"relative-humidity-measurement-cluster.xml",
"replacable-monitoring-cluster.xml",
"scene.xml",
"software-diagnostics-cluster.xml",
"switch-cluster.xml",
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"pump-configuration-and-control-cluster.xml",
"pwm-cluster.xml",
"relative-humidity-measurement-cluster.xml",
"replacable-monitoring-cluster.xml",
"scene.xml",
"software-diagnostics-cluster.xml",
"switch-cluster.xml",
Expand Down
12 changes: 12 additions & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"ACCESS_CONTROL_CLUSTER": [],
"ACCOUNT_LOGIN_CLUSTER": [],
"ACTIONS_CLUSTER": [],
"ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [],
"ADMINISTRATOR_COMMISSIONING_CLUSTER": [],
"ALARM_CLUSTER": [],
"APPLICATION_BASIC_CLUSTER": [],
Expand All @@ -15,6 +16,7 @@
"BINDING_CLUSTER": [],
"BOOLEAN_STATE_CLUSTER": [],
"BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [],
"CERAMIC_FILTER_MONITORING_CLUSTER": [],
"CHANNEL_CLUSTER": [],
"CLIENT_MONITORING_CLUSTER": [],
"COLOR_CONTROL_CLUSTER": [],
Expand All @@ -25,18 +27,23 @@
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ELECTROSTATIC_FILTER_MONITORING_CLUSTER": [],
"ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [],
"FAN_CONTROL_CLUSTER": [],
"FAULT_INJECTION_CLUSTER": [],
"FIXED_LABEL_CLUSTER": [],
"FLOW_MEASUREMENT_CLUSTER": [],
"FUEL_TANK_MONITORING_CLUSTER": [],
"GENERAL_COMMISSIONING_CLUSTER": [],
"GENERAL_DIAGNOSTICS_CLUSTER": [],
"GROUP_KEY_MANAGEMENT_CLUSTER": [],
"GROUPS_CLUSTER": [],
"HEPA_FILTER_MONITORING_CLUSTER": [],
"IAS_ZONE_CLUSTER": [],
"IDENTIFY_CLUSTER": [],
"ILLUMINANCE_MEASUREMENT_CLUSTER": [],
"INK_CARTRIDGE_MONITORING_CLUSTER": [],
"IONIZING_FILTER_MONITORING_CLUSTER": [],
"KEYPAD_INPUT_CLUSTER": [],
"LEVEL_CONTROL_CLUSTER": [],
"LOCALIZATION_CONFIGURATION_CLUSTER": [],
Expand All @@ -52,6 +59,7 @@
"OTA_BOOTLOAD_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [],
"OZONE_FILTER_MONITORING_CLUSTER": [],
"POLL_CONTROL_CLUSTER": [],
"POWER_CONFIG_CLUSTER": [],
"POWER_PROFILE_CLUSTER": [],
Expand All @@ -77,13 +85,17 @@
"TIME_CLUSTER": [],
"TIME_FORMAT_LOCALIZATION_CLUSTER": [],
"TIME_SYNCHRONIZATION_CLUSTER": [],
"TONER_CARTRIDGE_MONITORING_CLUSTER": [],
"TRUSTED_ROOT_CERTIFICATES_CLUSTER": [],
"UNIT_LOCALIZATION_CLUSTER": [],
"UNIT_TESTING_CLUSTER": [],
"USER_LABEL_CLUSTER": [],
"UV_FILTER_MONITORING_CLUSTER": [],
"WAKE_ON_LAN_CLUSTER": [],
"WATER_TANK_MONITORING_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
"WINDOW_COVERING_CLUSTER": [],
"ZEOLITE_FILTER_MONITORING_CLUSTER": [],
"ZLL_COMMISSIONING_CLUSTER": []
},
"ServerDirectories": {
Expand Down
24 changes: 24 additions & 0 deletions src/controller/data_model/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,30 @@ if (current_os == "android" || build_java_matter_controller) {
"jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/UnitTestingClient-ReadImpl.cpp",
"jni/UnitTestingClient-InvokeSubscribeImpl.cpp",
"jni/IonizingFilterMonitoringClient-ReadImpl.cpp",
"jni/IonizingFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-ReadImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/HepaFilterMonitoringClient-ReadImpl.cpp",
"jni/HepaFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ElectrostaticFilterMonitoringClient-ReadImpl.cpp",
"jni/ElectrostaticFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/WaterTankMonitoringClient-ReadImpl.cpp",
"jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/OzoneFilterMonitoringClient-ReadImpl.cpp",
"jni/OzoneFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/InkCartridgeMonitoringClient-ReadImpl.cpp",
"jni/InkCartridgeMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/CeramicFilterMonitoringClient-ReadImpl.cpp",
"jni/CeramicFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ActivatedCarbonFilterMonitoringClient-ReadImpl.cpp",
"jni/ActivatedCarbonFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/FuelTankMonitoringClient-ReadImpl.cpp",
"jni/FuelTankMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/UvFilterMonitoringClient-ReadImpl.cpp",
"jni/UvFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/TonerCartridgeMonitoringClient-ReadImpl.cpp",
"jni/TonerCartridgeMonitoringClient-InvokeSubscribeImpl.cpp",

# Disable CM cluster table tests until update is done
# https://github.com/project-chip/connectedhomeip/issues/24425
Expand Down

0 comments on commit 2c39be2

Please sign in to comment.