Skip to content

Commit

Permalink
Add Concentration Measurement Cluster Definition (#26525)
Browse files Browse the repository at this point in the history
* Add Cluster Definition

* Add New Cluster Definition to Required Files

* Add New Clusters to ZAP Cluster List

* Enable New Clusters in Controller

* Update Feature Map Name

* Add Generated Code

* Update Generated Code

* Add Expected Build Files

* Remove Min Max Values for Floating Point Numbers

* Fix Type Names

Should match spec

* Update Cluster Names

Adding „Concentration“ to the cluster name. This naming convention maintains the integrity of the base cluster's name while also specifying the unique substance that the aliased version pertains to.

* Update Generated Code

* Update Expected Files

* Update src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update Generated Code

* Add Missing Expected Generated Files

* Update Generated Code

* Update Data Type

AVG_MEASURED_VALUE_WINDOW and PEAK_MEASURED_VALUE_WINDOW are using elapsed_s as per spec.

* Fix Java Build

* Fix Merge Chaos

Lines were added twice due to poor merging 🙁

* Update Generated Code

* Change Cluster Definition

Rename VOC_CONCENTRATION_MEASUREMENT_CLUSTER to TVOC_CONCENTRATION_MEASUREMENT_CLUSTER

---------

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
2 people authored and pull[bot] committed Aug 22, 2023
1 parent 687d8b6 commit 5366395
Show file tree
Hide file tree
Showing 46 changed files with 303,817 additions and 20,104 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \
src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml";
load "../src/app/zap-templates/zcl/data-model/chip/chip-types.xml";
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml";
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 @@ -17,6 +17,7 @@
<xi:include href="chip/chip-types.xml" />
<xi:include href="chip/clusters-extensions.xml" />
<xi:include href="chip/color-control-cluster.xml" />
<xi:include href="chip/concentration-measurement-cluster.xml" />
<xi:include href="chip/content-launch-cluster.xml" />
<xi:include href="chip/descriptor-cluster.xml" />
<xi:include href="chip/diagnostic-logs-cluster.xml" />
Expand Down
1,028 changes: 1,028 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml

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 @@ -31,6 +31,7 @@
"channel-cluster.xml",
"clusters-extensions.xml",
"color-control-cluster.xml",
"concentration-measurement-cluster.xml",
"content-launch-cluster.xml",
"descriptor-cluster.xml",
"diagnostic-logs-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 @@ -30,6 +30,7 @@
"channel-cluster.xml",
"clusters-extensions.xml",
"color-control-cluster.xml",
"concentration-measurement-cluster.xml",
"content-launch-cluster.xml",
"descriptor-cluster.xml",
"diagnostic-logs-cluster.xml",
Expand Down
45 changes: 41 additions & 4 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"ACTIONS_CLUSTER": [],
"ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [],
"ADMINISTRATOR_COMMISSIONING_CLUSTER": [],
"ALARM_CLUSTER": [],
"AIR_QUALITY_CLUSTER": [],
"ALARM_CLUSTER": [],
"APPLICATION_BASIC_CLUSTER": [],
"APPLICATION_LAUNCHER_CLUSTER": [],
"AUDIO_OUTPUT_CLUSTER": [],
Expand All @@ -17,50 +17,79 @@
"BINDING_CLUSTER": [],
"BOOLEAN_STATE_CLUSTER": [],
"BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [],
"BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CERAMIC_FILTER_MONITORING_CLUSTER": [],
"CHANNEL_CLUSTER": [],
"ICD_MANAGEMENT_CLUSTER": [],
"CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CLIENT_MONITORING_CLUSTER": [],
"COLOR_CONTROL_CLUSTER": [],
"COMMISSIONING_CLUSTER": [],
"CONTENT_LAUNCHER_CLUSTER": [],
"COPPER_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"DESCRIPTOR_CLUSTER": [],
"DEVICE_TEMP_CLUSTER": [],
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ELECTROSTATIC_FILTER_MONITORING_CLUSTER": [],
"ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [],
"ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"FAN_CONTROL_CLUSTER": [],
"FAULT_INJECTION_CLUSTER": [],
"FECAL_COLIFORM_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"FIXED_LABEL_CLUSTER": [],
"FLOW_MEASUREMENT_CLUSTER": [],
"FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"FUEL_TANK_MONITORING_CLUSTER": [],
"GENERAL_COMMISSIONING_CLUSTER": [],
"GENERAL_DIAGNOSTICS_CLUSTER": [],
"GROUP_KEY_MANAGEMENT_CLUSTER": [],
"GROUPS_CLUSTER": [],
"HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"HEPA_FILTER_MONITORING_CLUSTER": [],
"HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"HYDROGEN_SULFIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"IAS_ZONE_CLUSTER": [],
"ICD_MANAGEMENT_CLUSTER": [],
"IDENTIFY_CLUSTER": [],
"ILLUMINANCE_MEASUREMENT_CLUSTER": [],
"INK_CARTRIDGE_MONITORING_CLUSTER": [],
"IONIZING_FILTER_MONITORING_CLUSTER": [],
"KEYPAD_INPUT_CLUSTER": [],
"LEAD_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"LEVEL_CONTROL_CLUSTER": [],
"LOCALIZATION_CONFIGURATION_CLUSTER": [],
"LOW_POWER_CLUSTER": [],
"MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"MEDIA_INPUT_CLUSTER": [],
"MEDIA_PLAYBACK_CLUSTER": [],
"MODE_SELECT_CLUSTER": [],
"NETWORK_COMMISSIONING_CLUSTER": [],
"NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"],
"ON_OFF_CLUSTER": [],
"ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [],
"OPERATIONAL_CREDENTIALS_CLUSTER": [],
"OTA_BOOTLOAD_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [],
"OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"OZONE_FILTER_MONITORING_CLUSTER": [],
"PM10_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"PM1_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"POLL_CONTROL_CLUSTER": [],
"POWER_CONFIG_CLUSTER": [],
"POWER_PROFILE_CLUSTER": [],
Expand All @@ -74,13 +103,18 @@
"pump-configuration-and-control-client"
],
"PWM_CLUSTER": [],
"RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"REFRIGERATOR_ALARM": [],
"RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [],
"SCENES_CLUSTER": [],
"SMOKE_CO_ALARM_CLUSTER": [],
"SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"SOFTWARE_DIAGNOSTICS_CLUSTER": [],
"SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"SWITCH_CLUSTER": [],
"TARGET_NAVIGATOR_CLUSTER": [],
"TEMPERATURE_CONTROL_CLUSTER": [],
"TEMPERATURE_MEASUREMENT_CLUSTER": [],
"THERMOSTAT_CLUSTER": ["thermostat-client"],
"THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [],
Expand All @@ -89,16 +123,19 @@
"TIME_FORMAT_LOCALIZATION_CLUSTER": [],
"TIME_SYNCHRONIZATION_CLUSTER": [],
"TONER_CARTRIDGE_MONITORING_CLUSTER": [],
"TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"TRUSTED_ROOT_CERTIFICATES_CLUSTER": [],
"TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"UNIT_LOCALIZATION_CLUSTER": [],
"UNIT_TESTING_CLUSTER": [],
"USER_LABEL_CLUSTER": [],
"UV_FILTER_MONITORING_CLUSTER": [],
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"WAKE_ON_LAN_CLUSTER": [],
"WATER_TANK_MONITORING_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
"WINDOW_COVERING_CLUSTER": [],
"TEMPERATURE_CONTROL_CLUSTER": [],
"ZEOLITE_FILTER_MONITORING_CLUSTER": [],
"ZLL_COMMISSIONING_CLUSTER": []
},
Expand Down Expand Up @@ -185,6 +222,7 @@
"SOFTWARE_DIAGNOSTICS_CLUSTER": ["software-diagnostics-server"],
"SWITCH_CLUSTER": ["switch-server"],
"TARGET_NAVIGATOR_CLUSTER": ["target-navigator-server"],
"TEMPERATURE_CONTROL_CLUSTER": ["temperature-control-server"],
"TEMPERATURE_MEASUREMENT_CLUSTER": [],
"THERMOSTAT_CLUSTER": ["thermostat-server"],
"THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [
Expand All @@ -202,7 +240,6 @@
"WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
"WINDOW_COVERING_CLUSTER": ["window-covering-server"],
"TEMPERATURE_CONTROL_CLUSTER": ["temperature-control-server"],
"ZLL_COMMISSIONING_CLUSTER": []
}
}
81 changes: 79 additions & 2 deletions src/controller/data_model/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ if (current_os == "android" || build_java_matter_controller) {
"jni/LevelControlClient-ReadImpl.cpp",
"jni/LocalizationConfigurationClient-InvokeSubscribeImpl.cpp",
"jni/LocalizationConfigurationClient-ReadImpl.cpp",
"jni/LowPowerClient-InvokeSubscribeImpl.cpp",
"jni/LowPowerClient-ReadImpl.cpp",
"jni/LowPowerClient-InvokeSubscribeImpl.cpp",
"jni/MediaInputClient-InvokeSubscribeImpl.cpp",
"jni/MediaInputClient-ReadImpl.cpp",
"jni/MediaPlaybackClient-InvokeSubscribeImpl.cpp",
Expand Down Expand Up @@ -218,8 +218,85 @@ if (current_os == "android" || build_java_matter_controller) {
"jni/WiFiNetworkDiagnosticsClient-ReadImpl.cpp",
"jni/WindowCoveringClient-InvokeSubscribeImpl.cpp",
"jni/WindowCoveringClient-ReadImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-ReadImpl.cpp",
"jni/ZeoliteFilterMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/BromateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/BromateConcentrationMeasurementClient-ReadImpl.cpp",
"jni/BromodichloromethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/BromodichloromethaneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/BromoformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/BromoformConcentrationMeasurementClient-ReadImpl.cpp",
"jni/CarbonDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/CarbonDioxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/CarbonMonoxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/CarbonMonoxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChloraminesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChloraminesConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChlorineConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChlorineConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChlorodibromomethaneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChlorodibromomethaneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ChloroformConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ChloroformConcentrationMeasurementClient-ReadImpl.cpp",
"jni/CopperConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/CopperConcentrationMeasurementClient-ReadImpl.cpp",
"jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/DissolvedOxygenConcentrationMeasurementClient-ReadImpl.cpp",
"jni/EthyleneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/EthyleneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/EthyleneOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/EthyleneOxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FecalColiformEColiConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FecalColiformEColiConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FluorideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FluorideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/FormaldehydeConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/FormaldehydeConcentrationMeasurementClient-ReadImpl.cpp",
"jni/HaloaceticAcidsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/HaloaceticAcidsConcentrationMeasurementClient-ReadImpl.cpp",
"jni/HydrogenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/HydrogenConcentrationMeasurementClient-ReadImpl.cpp",
"jni/HydrogenSulfideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/HydrogenSulfideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/LeadConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/LeadConcentrationMeasurementClient-ReadImpl.cpp",
"jni/ManganeseConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/ManganeseConcentrationMeasurementClient-ReadImpl.cpp",
"jni/NitricOxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/NitricOxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/NitrogenDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/NitrogenDioxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/OxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/OxygenConcentrationMeasurementClient-ReadImpl.cpp",
"jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/RadonConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/RadonConcentrationMeasurementClient-ReadImpl.cpp",
"jni/SodiumConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/SodiumConcentrationMeasurementClient-ReadImpl.cpp",
"jni/SulfateConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/SulfateConcentrationMeasurementClient-ReadImpl.cpp",
"jni/SulfurDioxideConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/SulfurDioxideConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TotalColiformBacteriaConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TotalColiformBacteriaConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TotalTrihalomethanesConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TotalTrihalomethanesConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TotalVolatileOrganicCompoundsConcentrationMeasurementClient-ReadImpl.cpp",
"jni/TurbidityConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/TurbidityConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm1ConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm1ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/Pm10ConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/Pm25ConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm25ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",

# Disable CM cluster table tests until update is done
# https://github.com/project-chip/connectedhomeip/issues/24425
#"jni/ClientMonitoringClient-ReadImpl.cpp",
#"jni/ClientMonitoringClient-InvokeSubscribeImpl.cpp",
]

deps = [
Expand Down
Loading

0 comments on commit 5366395

Please sign in to comment.