From 759b686c4a1e8c80361294ebf5073bb1195c4d0a Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Thu, 26 Sep 2024 15:38:36 -0600
Subject: [PATCH 1/9] Generated using ./alchemy zap --attribute="in-progress"
... Chime.adoc
---
.github/workflows/tests.yaml | 1 +
scripts/rules.matterlint | 1 +
.../zcl/zcl-with-test-extensions.json | 112 ++++--
src/app/zap-templates/zcl/zcl.json | 118 ++++--
src/app/zap_cluster_list.json | 340 +++++++++++++-----
5 files changed, 442 insertions(+), 130 deletions(-)
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index d14d188a2fb6e4..71761ce3b56075 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -91,6 +91,7 @@ jobs:
--no-print \
--log-level info \
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
+ src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint
index e7bd644249a13e..c1e2e48cde9498 100644
--- a/scripts/rules.matterlint
+++ b/scripts/rules.matterlint
@@ -15,6 +15,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml";
load "../src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml";
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";
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index bc1a29c4b4aa3b..38b74ff15dcc86 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -27,6 +27,7 @@
"boolean-state-configuration-cluster.xml",
"actions-cluster.xml",
"bridged-device-basic-information.xml",
+ "chime-cluster.xml",
"chip-ota.xml",
"channel-cluster.xml",
"clusters-extensions.xml",
@@ -142,9 +143,15 @@
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
"options": {
"text": {
- "defaultResponsePolicy": ["Always", "Conditional", "Never"]
+ "defaultResponsePolicy": [
+ "Always",
+ "Conditional",
+ "Never"
+ ]
},
- "bool": ["commandDiscovery"]
+ "bool": [
+ "commandDiscovery"
+ ]
},
"defaults": {
"text": {
@@ -190,8 +197,13 @@
"SpecificationVersion",
"MaxPathsPerInvoke"
],
- "Bridged Device Basic Information": ["ProductAppearance"],
- "Descriptor": ["ClusterRevision", "FeatureMap"],
+ "Bridged Device Basic Information": [
+ "ProductAppearance"
+ ],
+ "Descriptor": [
+ "ClusterRevision",
+ "FeatureMap"
+ ],
"Device Energy Management": [
"ESAType",
"ESACanGenerate",
@@ -243,7 +255,11 @@
"SessionEnergyDischarged",
"FeatureMap"
],
- "Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "Energy EVSE Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
"Ethernet Network Diagnostics": [
"PHYRate",
"FullDuplex",
@@ -288,7 +304,11 @@
"ClientsSupportedPerFabric",
"MaximumCheckInBackOff"
],
- "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
+ "Occupancy Sensing": [
+ "HoldTimeLimits",
+ "HoldTime",
+ "FeatureMap"
+ ],
"Operational Credentials": [
"SupportedFabrics",
"CommissionedFabrics",
@@ -395,14 +415,21 @@
"CurrentMaxRate",
"OverrunCount"
],
- "Channel": ["Lineup", "CurrentChannel"],
+ "Channel": [
+ "Lineup",
+ "CurrentChannel"
+ ],
"Media Playback": [
"SampledPosition",
"ActiveAudioTrack",
"ActiveTextTrack"
],
- "Application Launcher": ["CurrentApp"],
- "Application Basic": ["Application"],
+ "Application Launcher": [
+ "CurrentApp"
+ ],
+ "Application Basic": [
+ "Application"
+ ],
"Time Synchronization": [
"TrustedTimeSource",
"DefaultNTP",
@@ -414,7 +441,9 @@
"TimeZoneListMaxSize",
"DSTOffsetListMaxSize"
],
- "Temperature Control": ["SupportedTemperatureLevels"],
+ "Temperature Control": [
+ "SupportedTemperatureLevels"
+ ],
"Dishwasher Mode": [
"SupportedModes",
"CurrentMode",
@@ -422,7 +451,11 @@
"OnMode",
"FeatureMap"
],
- "Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "Microwave Oven Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
"Microwave Oven Control": [
"CookTime",
"MaxCookTime",
@@ -449,8 +482,16 @@
"OnMode",
"FeatureMap"
],
- "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
- "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "RVC Clean Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
+ "RVC Run Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
"Operational State": [
"OperationalState",
"OperationalError",
@@ -627,7 +668,10 @@
"LevelValue",
"FeatureMap"
],
- "Air Quality": ["AirQuality", "FeatureMap"],
+ "Air Quality": [
+ "AirQuality",
+ "FeatureMap"
+ ],
"Electrical Energy Measurement": [
"Accuracy",
"CumulativeEnergyImported",
@@ -659,9 +703,15 @@
"NeutralCurrent",
"FeatureMap"
],
- "Power Topology": ["FeatureMap"],
- "Valve Configuration and Control": ["RemainingDuration"],
- "Boolean State Configuration": ["CurrentSensitivityLevel"],
+ "Power Topology": [
+ "FeatureMap"
+ ],
+ "Valve Configuration and Control": [
+ "RemainingDuration"
+ ],
+ "Boolean State Configuration": [
+ "CurrentSensitivityLevel"
+ ],
"Water Heater Management": [
"HeaterTypes",
"HeatDemand",
@@ -672,17 +722,35 @@
"FeatureMap",
"ClusterRevision"
],
- "Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
- "Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
+ "Water Heater Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
+ "Wi-Fi Network Management": [
+ "SSID",
+ "PassphraseSurrogate"
+ ],
"Thread Network Directory": [
"PreferredExtendedPanID",
"ThreadNetworks",
"ThreadNetworkTableSize"
],
- "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"]
+ "Service Area": [
+ "CurrentArea",
+ "EstimatedEndTime",
+ "FeatureMap"
+ ]
},
"defaultReportingPolicy": "mandatory",
- "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
+ "ZCLDataTypes": [
+ "ARRAY",
+ "BITMAP",
+ "ENUM",
+ "NUMBER",
+ "STRING",
+ "STRUCT"
+ ],
"fabricHandling": {
"automaticallyCreateFields": true,
"indexFieldId": 254,
@@ -692,4 +760,4 @@
"uiOptions": {
"showProfileId": false
}
-}
+}
\ No newline at end of file
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index db4526e39cbbde..eec9804fe01d36 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -3,7 +3,11 @@
"category": "matter",
"version": 1,
"requiredFeatureLevel": 102,
- "xmlRoot": [".", "./data-model/chip/", "./data-model/silabs/"],
+ "xmlRoot": [
+ ".",
+ "./data-model/chip/",
+ "./data-model/silabs/"
+ ],
"_comment": "Ensure access-control-definitions.xml is first in xmlFile array",
"xmlFile": [
"access-control-definitions.xml",
@@ -22,6 +26,7 @@
"boolean-state-configuration-cluster.xml",
"actions-cluster.xml",
"bridged-device-basic-information.xml",
+ "chime-cluster.xml",
"chip-ota.xml",
"channel-cluster.xml",
"clusters-extensions.xml",
@@ -136,9 +141,15 @@
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
"options": {
"text": {
- "defaultResponsePolicy": ["Always", "Conditional", "Never"]
+ "defaultResponsePolicy": [
+ "Always",
+ "Conditional",
+ "Never"
+ ]
},
- "bool": ["commandDiscovery"]
+ "bool": [
+ "commandDiscovery"
+ ]
},
"defaults": {
"text": {
@@ -184,8 +195,13 @@
"SpecificationVersion",
"MaxPathsPerInvoke"
],
- "Bridged Device Basic Information": ["ProductAppearance"],
- "Descriptor": ["ClusterRevision", "FeatureMap"],
+ "Bridged Device Basic Information": [
+ "ProductAppearance"
+ ],
+ "Descriptor": [
+ "ClusterRevision",
+ "FeatureMap"
+ ],
"Device Energy Management": [
"ESAType",
"ESACanGenerate",
@@ -237,7 +253,11 @@
"SessionEnergyDischarged",
"FeatureMap"
],
- "Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "Energy EVSE Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
"Ethernet Network Diagnostics": [
"PHYRate",
"FullDuplex",
@@ -282,7 +302,11 @@
"ClientsSupportedPerFabric",
"MaximumCheckInBackOff"
],
- "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
+ "Occupancy Sensing": [
+ "HoldTimeLimits",
+ "HoldTime",
+ "FeatureMap"
+ ],
"Operational Credentials": [
"SupportedFabrics",
"CommissionedFabrics",
@@ -389,14 +413,21 @@
"CurrentMaxRate",
"OverrunCount"
],
- "Channel": ["Lineup", "CurrentChannel"],
+ "Channel": [
+ "Lineup",
+ "CurrentChannel"
+ ],
"Media Playback": [
"SampledPosition",
"ActiveAudioTrack",
"ActiveTextTrack"
],
- "Application Launcher": ["CurrentApp"],
- "Application Basic": ["Application"],
+ "Application Launcher": [
+ "CurrentApp"
+ ],
+ "Application Basic": [
+ "Application"
+ ],
"Time Synchronization": [
"TrustedTimeSource",
"DefaultNTP",
@@ -408,7 +439,9 @@
"TimeZoneListMaxSize",
"DSTOffsetListMaxSize"
],
- "Temperature Control": ["SupportedTemperatureLevels"],
+ "Temperature Control": [
+ "SupportedTemperatureLevels"
+ ],
"Dishwasher Mode": [
"SupportedModes",
"CurrentMode",
@@ -416,7 +449,11 @@
"OnMode",
"FeatureMap"
],
- "Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "Microwave Oven Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
"Microwave Oven Control": [
"CookTime",
"MaxCookTime",
@@ -443,8 +480,16 @@
"OnMode",
"FeatureMap"
],
- "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
- "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "RVC Clean Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
+ "RVC Run Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
"Operational State": [
"OperationalState",
"OperationalError",
@@ -621,7 +666,10 @@
"LevelValue",
"FeatureMap"
],
- "Air Quality": ["AirQuality", "FeatureMap"],
+ "Air Quality": [
+ "AirQuality",
+ "FeatureMap"
+ ],
"Electrical Energy Measurement": [
"Accuracy",
"CumulativeEnergyImported",
@@ -653,9 +701,15 @@
"NeutralCurrent",
"FeatureMap"
],
- "Power Topology": ["FeatureMap"],
- "Valve Configuration and Control": ["RemainingDuration"],
- "Boolean State Configuration": ["CurrentSensitivityLevel"],
+ "Power Topology": [
+ "FeatureMap"
+ ],
+ "Valve Configuration and Control": [
+ "RemainingDuration"
+ ],
+ "Boolean State Configuration": [
+ "CurrentSensitivityLevel"
+ ],
"Water Heater Management": [
"HeaterTypes",
"HeatDemand",
@@ -666,17 +720,35 @@
"FeatureMap",
"ClusterRevision"
],
- "Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
- "Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
+ "Water Heater Mode": [
+ "SupportedModes",
+ "CurrentMode",
+ "FeatureMap"
+ ],
+ "Wi-Fi Network Management": [
+ "SSID",
+ "PassphraseSurrogate"
+ ],
"Thread Network Directory": [
"PreferredExtendedPanID",
"ThreadNetworks",
"ThreadNetworkTableSize"
],
- "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"]
+ "Service Area": [
+ "CurrentArea",
+ "EstimatedEndTime",
+ "FeatureMap"
+ ]
},
"defaultReportingPolicy": "mandatory",
- "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
+ "ZCLDataTypes": [
+ "ARRAY",
+ "BITMAP",
+ "ENUM",
+ "NUMBER",
+ "STRING",
+ "STRUCT"
+ ],
"fabricHandling": {
"automaticallyCreateFields": true,
"indexFieldId": 254,
@@ -686,4 +758,4 @@
"uiOptions": {
"showProfileId": false
}
-}
+}
\ No newline at end of file
diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json
index a047340147ece5..76115ce4348c32 100644
--- a/src/app/zap_cluster_list.json
+++ b/src/app/zap_cluster_list.json
@@ -19,6 +19,7 @@
"CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"CHANNEL_CLUSTER": [],
+ "CHIME_CLUSTER": [],
"CLIENT_MONITORING_CLUSTER": [],
"COLOR_CONTROL_CLUSTER": [],
"COMMISSIONER_CONTROL_CLUSTER": [],
@@ -110,7 +111,9 @@
"TARGET_NAVIGATOR_CLUSTER": [],
"TEMPERATURE_CONTROL_CLUSTER": [],
"TEMPERATURE_MEASUREMENT_CLUSTER": [],
- "THERMOSTAT_CLUSTER": ["thermostat-client"],
+ "THERMOSTAT_CLUSTER": [
+ "thermostat-client"
+ ],
"THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [],
"THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER": [],
"THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [],
@@ -134,8 +137,12 @@
"WINDOW_COVERING_CLUSTER": []
},
"ServerDirectories": {
- "ACCESS_CONTROL_CLUSTER": ["access-control-server"],
- "ACCOUNT_LOGIN_CLUSTER": ["account-login-server"],
+ "ACCESS_CONTROL_CLUSTER": [
+ "access-control-server"
+ ],
+ "ACCOUNT_LOGIN_CLUSTER": [
+ "account-login-server"
+ ],
"ACTIONS_CLUSTER": [],
"ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [
"resource-monitoring-server"
@@ -143,14 +150,26 @@
"ADMINISTRATOR_COMMISSIONING_CLUSTER": [
"administrator-commissioning-server"
],
- "AIR_QUALITY_CLUSTER": ["air-quality-server"],
+ "AIR_QUALITY_CLUSTER": [
+ "air-quality-server"
+ ],
"ALARM_CLUSTER": [],
- "APPLICATION_BASIC_CLUSTER": ["application-basic-server"],
- "APPLICATION_LAUNCHER_CLUSTER": ["application-launcher-server"],
- "AUDIO_OUTPUT_CLUSTER": ["audio-output-server"],
+ "APPLICATION_BASIC_CLUSTER": [
+ "application-basic-server"
+ ],
+ "APPLICATION_LAUNCHER_CLUSTER": [
+ "application-launcher-server"
+ ],
+ "AUDIO_OUTPUT_CLUSTER": [
+ "audio-output-server"
+ ],
"BALLAST_CONFIGURATION_CLUSTER": [],
- "BASIC_INFORMATION_CLUSTER": ["basic-information"],
- "BINDING_CLUSTER": ["bindings"],
+ "BASIC_INFORMATION_CLUSTER": [
+ "basic-information"
+ ],
+ "BINDING_CLUSTER": [
+ "bindings"
+ ],
"BOOLEAN_STATE_CLUSTER": [],
"BOOLEAN_STATE_CONFIGURATION_CLUSTER": [
"boolean-state-configuration-server"
@@ -164,78 +183,177 @@
"CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
- "CHANNEL_CLUSTER": ["channel-server"],
- "COLOR_CONTROL_CLUSTER": ["color-control-server"],
- "COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"],
+ "CHANNEL_CLUSTER": [
+ "channel-server"
+ ],
+ "CHIME_CLUSTER": [],
+ "COLOR_CONTROL_CLUSTER": [
+ "color-control-server"
+ ],
+ "COMMISSIONER_CONTROL_CLUSTER": [
+ "commissioner-control-server"
+ ],
"COMMISSIONING_CLUSTER": [],
- "CONTENT_LAUNCHER_CLUSTER": ["content-launch-server"],
- "CONTENT_CONTROL_CLUSTER": ["content-control-server"],
- "CONTENT_APP_OBSERVER_CLUSTER": ["content-app-observer"],
- "DESCRIPTOR_CLUSTER": ["descriptor"],
- "DEVICE_ENERGY_MANAGEMENT_CLUSTER": ["device-energy-management-server"],
- "DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER": ["mode-base-server"],
+ "CONTENT_LAUNCHER_CLUSTER": [
+ "content-launch-server"
+ ],
+ "CONTENT_CONTROL_CLUSTER": [
+ "content-control-server"
+ ],
+ "CONTENT_APP_OBSERVER_CLUSTER": [
+ "content-app-observer"
+ ],
+ "DESCRIPTOR_CLUSTER": [
+ "descriptor"
+ ],
+ "DEVICE_ENERGY_MANAGEMENT_CLUSTER": [
+ "device-energy-management-server"
+ ],
+ "DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
"DEVICE_TEMP_CLUSTER": [],
- "DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"],
- "DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"],
- "DISHWASHER_MODE_CLUSTER": ["mode-base-server"],
- "MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"],
- "DOOR_LOCK_CLUSTER": ["door-lock-server"],
- "ECOSYSTEM_INFORMATION_CLUSTER": ["ecosystem-information-server"],
+ "DIAGNOSTIC_LOGS_CLUSTER": [
+ "diagnostic-logs-server"
+ ],
+ "DISHWASHER_ALARM_CLUSTER": [
+ "dishwasher-alarm-server"
+ ],
+ "DISHWASHER_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
+ "MICROWAVE_OVEN_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
+ "DOOR_LOCK_CLUSTER": [
+ "door-lock-server"
+ ],
+ "ECOSYSTEM_INFORMATION_CLUSTER": [
+ "ecosystem-information-server"
+ ],
"ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [
"electrical-energy-measurement-server"
],
"ELECTRICAL_POWER_MEASUREMENT_CLUSTER": [
"electrical-power-measurement-server"
],
- "ENERGY_EVSE_CLUSTER": ["energy-evse-server"],
- "ENERGY_EVSE_MODE_CLUSTER": ["mode-base-server"],
+ "ENERGY_EVSE_CLUSTER": [
+ "energy-evse-server"
+ ],
+ "ENERGY_EVSE_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
"ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [
"ethernet-network-diagnostics-server"
],
- "ENERGY_PREFERENCE_CLUSTER": ["energy-preference-server"],
- "FAN_CONTROL_CLUSTER": ["fan-control-server"],
- "FAULT_INJECTION_CLUSTER": ["fault-injection-server"],
- "FIXED_LABEL_CLUSTER": ["fixed-label-server"],
+ "ENERGY_PREFERENCE_CLUSTER": [
+ "energy-preference-server"
+ ],
+ "FAN_CONTROL_CLUSTER": [
+ "fan-control-server"
+ ],
+ "FAULT_INJECTION_CLUSTER": [
+ "fault-injection-server"
+ ],
+ "FIXED_LABEL_CLUSTER": [
+ "fixed-label-server"
+ ],
"FLOW_MEASUREMENT_CLUSTER": [],
"FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
- "GENERAL_COMMISSIONING_CLUSTER": ["general-commissioning-server"],
- "GENERAL_DIAGNOSTICS_CLUSTER": ["general-diagnostics-server"],
- "GROUPS_CLUSTER": ["groups-server"],
- "HEPA_FILTER_MONITORING_CLUSTER": ["resource-monitoring-server"],
- "GROUP_KEY_MANAGEMENT_CLUSTER": ["group-key-mgmt-server"],
- "ICD_MANAGEMENT_CLUSTER": ["icd-management-server"],
- "IDENTIFY_CLUSTER": ["identify-server"],
+ "GENERAL_COMMISSIONING_CLUSTER": [
+ "general-commissioning-server"
+ ],
+ "GENERAL_DIAGNOSTICS_CLUSTER": [
+ "general-diagnostics-server"
+ ],
+ "GROUPS_CLUSTER": [
+ "groups-server"
+ ],
+ "HEPA_FILTER_MONITORING_CLUSTER": [
+ "resource-monitoring-server"
+ ],
+ "GROUP_KEY_MANAGEMENT_CLUSTER": [
+ "group-key-mgmt-server"
+ ],
+ "ICD_MANAGEMENT_CLUSTER": [
+ "icd-management-server"
+ ],
+ "IDENTIFY_CLUSTER": [
+ "identify-server"
+ ],
"ILLUMINANCE_MEASUREMENT_CLUSTER": [],
- "KEYPAD_INPUT_CLUSTER": ["keypad-input-server"],
- "LAUNDRY_WASHER_MODE_CLUSTER": ["mode-base-server"],
- "LEVEL_CONTROL_CLUSTER": ["level-control"],
+ "KEYPAD_INPUT_CLUSTER": [
+ "keypad-input-server"
+ ],
+ "LAUNDRY_WASHER_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
+ "LEVEL_CONTROL_CLUSTER": [
+ "level-control"
+ ],
"LOCALIZATION_CONFIGURATION_CLUSTER": [
"localization-configuration-server"
],
- "LOW_POWER_CLUSTER": ["low-power-server"],
- "MEDIA_INPUT_CLUSTER": ["media-input-server"],
- "MEDIA_PLAYBACK_CLUSTER": ["media-playback-server"],
- "MICROWAVE_OVEN_CONTROL_CLUSTER": ["microwave-oven-control-server"],
- "MESSAGES_CLUSTER": ["messages-server"],
- "MODE_SELECT_CLUSTER": ["mode-select-server"],
- "NETWORK_COMMISSIONING_CLUSTER": ["network-commissioning"],
+ "LOW_POWER_CLUSTER": [
+ "low-power-server"
+ ],
+ "MEDIA_INPUT_CLUSTER": [
+ "media-input-server"
+ ],
+ "MEDIA_PLAYBACK_CLUSTER": [
+ "media-playback-server"
+ ],
+ "MICROWAVE_OVEN_CONTROL_CLUSTER": [
+ "microwave-oven-control-server"
+ ],
+ "MESSAGES_CLUSTER": [
+ "messages-server"
+ ],
+ "MODE_SELECT_CLUSTER": [
+ "mode-select-server"
+ ],
+ "NETWORK_COMMISSIONING_CLUSTER": [
+ "network-commissioning"
+ ],
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
- "SAMPLE_MEI_CLUSTER": ["sample-mei-server"],
- "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"],
- "ON_OFF_CLUSTER": ["on-off-server"],
- "POWER_TOPOLOGY_CLUSTER": ["power-topology-server"],
- "OPERATIONAL_CREDENTIALS_CLUSTER": ["operational-credentials-server"],
- "OPERATIONAL_STATE_CLUSTER": ["operational-state-server"],
- "OPERATIONAL_STATE_OVEN_CLUSTER": ["operational-state-server"],
- "OPERATIONAL_STATE_RVC_CLUSTER": ["operational-state-server"],
+ "SAMPLE_MEI_CLUSTER": [
+ "sample-mei-server"
+ ],
+ "OCCUPANCY_SENSING_CLUSTER": [
+ "occupancy-sensor-server"
+ ],
+ "ON_OFF_CLUSTER": [
+ "on-off-server"
+ ],
+ "POWER_TOPOLOGY_CLUSTER": [
+ "power-topology-server"
+ ],
+ "OPERATIONAL_CREDENTIALS_CLUSTER": [
+ "operational-credentials-server"
+ ],
+ "OPERATIONAL_STATE_CLUSTER": [
+ "operational-state-server"
+ ],
+ "OPERATIONAL_STATE_OVEN_CLUSTER": [
+ "operational-state-server"
+ ],
+ "OPERATIONAL_STATE_RVC_CLUSTER": [
+ "operational-state-server"
+ ],
"OTA_BOOTLOAD_CLUSTER": [],
- "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"],
- "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"],
- "OVEN_MODE_CLUSTER": ["mode-base-server"],
+ "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [
+ "ota-provider"
+ ],
+ "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [
+ "ota-requestor"
+ ],
+ "OVEN_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
"OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
@@ -251,7 +369,9 @@
"POLL_CONTROL_CLUSTER": [],
"POWER_CONFIG_CLUSTER": [],
"POWER_PROFILE_CLUSTER": [],
- "POWER_SOURCE_CLUSTER": ["power-source-server"],
+ "POWER_SOURCE_CLUSTER": [
+ "power-source-server"
+ ],
"POWER_SOURCE_CONFIGURATION_CLUSTER": [
"power-source-configuration-server"
],
@@ -266,22 +386,44 @@
"RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
- "REFRIGERATOR_ALARM_CLUSTER": ["refrigerator-alarm-server"],
+ "REFRIGERATOR_ALARM_CLUSTER": [
+ "refrigerator-alarm-server"
+ ],
"REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER": [
"mode-base-server"
],
"RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [],
- "RVC_CLEAN_MODE_CLUSTER": ["mode-base-server"],
- "RVC_RUN_MODE_CLUSTER": ["mode-base-server"],
- "SCENES_CLUSTER": ["scenes-server"],
- "SERVICE_AREA_CLUSTER": ["service-area-server"],
- "SMOKE_CO_ALARM_CLUSTER": ["smoke-co-alarm-server"],
- "SOFTWARE_DIAGNOSTICS_CLUSTER": ["software-diagnostics-server"],
- "SWITCH_CLUSTER": ["switch-server"],
- "TARGET_NAVIGATOR_CLUSTER": ["target-navigator-server"],
- "TEMPERATURE_CONTROL_CLUSTER": ["temperature-control-server"],
+ "RVC_CLEAN_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
+ "RVC_RUN_MODE_CLUSTER": [
+ "mode-base-server"
+ ],
+ "SCENES_CLUSTER": [
+ "scenes-server"
+ ],
+ "SERVICE_AREA_CLUSTER": [
+ "service-area-server"
+ ],
+ "SMOKE_CO_ALARM_CLUSTER": [
+ "smoke-co-alarm-server"
+ ],
+ "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_CLUSTER": [
+ "thermostat-server"
+ ],
"THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [
"thermostat-user-interface-configuration-server"
],
@@ -291,27 +433,55 @@
"THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [
"thread-network-diagnostics-server"
],
- "THREAD_NETWORK_DIRECTORY_CLUSTER": ["thread-network-directory-server"],
+ "THREAD_NETWORK_DIRECTORY_CLUSTER": [
+ "thread-network-directory-server"
+ ],
"TIME_CLUSTER": [],
- "TIME_FORMAT_LOCALIZATION_CLUSTER": ["time-format-localization-server"],
- "TIME_SYNCHRONIZATION_CLUSTER": ["time-synchronization-server"],
- "TIMER_CLUSTER": ["timer-server"],
+ "TIME_FORMAT_LOCALIZATION_CLUSTER": [
+ "time-format-localization-server"
+ ],
+ "TIME_SYNCHRONIZATION_CLUSTER": [
+ "time-synchronization-server"
+ ],
+ "TIMER_CLUSTER": [
+ "timer-server"
+ ],
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
"UNIT_LOCALIZATION_CLUSTER": [],
- "UNIT_TESTING_CLUSTER": ["test-cluster-server"],
- "USER_LABEL_CLUSTER": ["user-label-server"],
+ "UNIT_TESTING_CLUSTER": [
+ "test-cluster-server"
+ ],
+ "USER_LABEL_CLUSTER": [
+ "user-label-server"
+ ],
"VALVE_CONFIGURATION_AND_CONTROL_CLUSTER": [
"valve-configuration-and-control-server"
],
- "WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"],
- "LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"],
- "LAUNDRY_DRYER_CONTROLS_CLUSTER": ["laundry-dryer-controls-server"],
- "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
- "WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"],
- "WINDOW_COVERING_CLUSTER": ["window-covering-server"],
- "WATER_HEATER_MANAGEMENT_CLUSTER": ["water-heater-management-server"],
- "WATER_HEATER_MODE_CLUSTER": ["mode-base-server"]
+ "WAKE_ON_LAN_CLUSTER": [
+ "wake-on-lan-server"
+ ],
+ "LAUNDRY_WASHER_CONTROLS_CLUSTER": [
+ "laundry-washer-controls-server"
+ ],
+ "LAUNDRY_DRYER_CONTROLS_CLUSTER": [
+ "laundry-dryer-controls-server"
+ ],
+ "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [
+ "wifi-network-diagnostics-server"
+ ],
+ "WIFI_NETWORK_MANAGEMENT_CLUSTER": [
+ "wifi-network-management-server"
+ ],
+ "WINDOW_COVERING_CLUSTER": [
+ "window-covering-server"
+ ],
+ "WATER_HEATER_MANAGEMENT_CLUSTER": [
+ "water-heater-management-server"
+ ],
+ "WATER_HEATER_MODE_CLUSTER": [
+ "mode-base-server"
+ ]
}
-}
+}
\ No newline at end of file
From 4ccc06e23d1eb59601ab302d2660d5cf95ecc298 Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Thu, 26 Sep 2024 15:42:42 -0600
Subject: [PATCH 2/9] Generated using ./alchemy zap --attribute="in-progress"
... Chime.adoc
---
.../zcl/data-model/chip/chime-cluster.xml | 48 +++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml
diff --git a/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml
new file mode 100644
index 00000000000000..1a9e9bad409fc1
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Chime
+ 0x0556
+ CHIME_CLUSTER
+
+ true
+ true
+
+ InstalledChimeSounds
+ ActiveChimeSoundId
+ Enabled
+
+
+
+
+
+
From 89ffcb252ba5799059209cf9ad58011be4e92b41 Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Thu, 26 Sep 2024 15:44:29 -0600
Subject: [PATCH 3/9] Generated using ./alchemy zap --attribute="in-progress"
... Chime.adoc
---
docs/zap_clusters.md | 1 +
.../data_model/controller-clusters.matter | 22 +
.../chip/devicecontroller/ChipClusters.java | 312 +++++
.../chip/devicecontroller/ChipStructs.java | 61 +
.../devicecontroller/ClusterIDMapping.java | 107 ++
.../devicecontroller/ClusterInfoMapping.java | 126 ++
.../devicecontroller/ClusterReadMapping.java | 104 ++
.../devicecontroller/ClusterWriteMapping.java | 46 +
.../chip/devicecontroller/cluster/files.gni | 1 +
.../structs/ChimeClusterChimeSoundStruct.kt | 56 +
.../cluster/clusters/ChimeCluster.kt | 1009 +++++++++++++++++
.../java/matter/controller/cluster/files.gni | 2 +
.../structs/ChimeClusterChimeSoundStruct.kt | 56 +
.../CHIPAttributeTLVValueDecoder.cpp | 225 ++++
.../CHIPEventTLVValueDecoder.cpp | 10 +
.../python/chip/clusters/CHIPClusters.py | 72 ++
.../python/chip/clusters/Objects.py | 204 ++++
.../MTRAttributeSpecifiedCheck.mm | 39 +
.../MTRAttributeTLVValueDecoder.mm | 70 ++
.../CHIP/zap-generated/MTRBaseClusters.h | 92 ++
.../CHIP/zap-generated/MTRBaseClusters.mm | 413 +++++++
.../CHIP/zap-generated/MTRClusterConstants.h | 15 +
.../CHIP/zap-generated/MTRClusterNames.mm | 60 +
.../CHIP/zap-generated/MTRClusters.h | 50 +
.../CHIP/zap-generated/MTRClusters.mm | 102 ++
.../zap-generated/MTRCommandPayloadsObjc.h | 28 +
.../zap-generated/MTRCommandPayloadsObjc.mm | 73 ++
.../MTRCommandPayloads_Internal.h | 6 +
.../zap-generated/MTRCommandTimedCheck.mm | 12 +
.../zap-generated/MTREventTLVValueDecoder.mm | 15 +
.../CHIP/zap-generated/MTRStructsObjc.h | 6 +
.../CHIP/zap-generated/MTRStructsObjc.mm | 30 +
.../zap-generated/attributes/Accessors.cpp | 190 ++++
.../zap-generated/attributes/Accessors.h | 30 +
.../app-common/zap-generated/callback.h | 50 +
.../app-common/zap-generated/cluster-enums.h | 2 +
.../zap-generated/cluster-objects.cpp | 107 ++
.../zap-generated/cluster-objects.h | 165 +++
.../app-common/zap-generated/ids/Attributes.h | 42 +
.../app-common/zap-generated/ids/Clusters.h | 3 +
.../app-common/zap-generated/ids/Commands.h | 10 +
.../zap-generated/cluster/Commands.h | 124 ++
.../cluster/ComplexArgumentParser.cpp | 30 +
.../cluster/ComplexArgumentParser.h | 5 +
.../cluster/logging/DataModelLogger.cpp | 76 ++
.../cluster/logging/DataModelLogger.h | 3 +
.../cluster/logging/EntryToText.cpp | 36 +
.../zap-generated/cluster/Commands.h | 976 ++++++++++++++++
48 files changed, 5274 insertions(+)
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChimeClusterChimeSoundStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ChimeClusterChimeSoundStruct.kt
diff --git a/docs/zap_clusters.md b/docs/zap_clusters.md
index 41679143b5c428..94fe851dcdda21 100644
--- a/docs/zap_clusters.md
+++ b/docs/zap_clusters.md
@@ -129,6 +129,7 @@ Generally regenerate using one of:
| 1294 | 0x50E | AccountLogin |
| 1295 | 0x50F | ContentControl |
| 1296 | 0x510 | ContentAppObserver |
+| 1366 | 0x556 | Chime |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
| 4294048773 | 0xFFF1FC05 | UnitTesting |
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 6c7748e0898737..9502c371cbf23c 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -9408,6 +9408,28 @@ provisional cluster ContentAppObserver = 1296 {
command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0;
}
+/** */
+cluster Chime = 1366 {
+ revision 1;
+
+ struct ChimeSoundStruct {
+ int8u chimeId = 0;
+ char_string<48> name = 1;
+ }
+
+ readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
+ attribute int8u activeChimeSoundId = 1;
+ attribute boolean enabled = 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;
+
+ command PlayChimeSound(): DefaultSuccess = 0;
+}
+
/** Provides extended device information for all the logical devices represented by a Bridged Node. */
provisional cluster EcosystemInformation = 1872 {
revision 1;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index bb92218a4b4b59..c8e56acda2f197 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -59491,6 +59491,318 @@ public void onSuccess(byte[] tlv) {
}
}
+ public static class ChimeCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 1366L;
+
+ private static final long INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID = 0L;
+ private static final long ACTIVE_CHIME_SOUND_ID_ATTRIBUTE_ID = 1L;
+ private static final long ENABLED_ATTRIBUTE_ID = 2L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public ChimeCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void playChimeSound(DefaultClusterCallback callback) {
+ playChimeSound(callback, 0);
+ }
+
+ public void playChimeSound(DefaultClusterCallback callback, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList elements = new ArrayList<>();
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface InstalledChimeSoundsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public void readInstalledChimeSoundsAttribute(
+ InstalledChimeSoundsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeInstalledChimeSoundsAttribute(
+ InstalledChimeSoundsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readActiveChimeSoundIdAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CHIME_SOUND_ID_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACTIVE_CHIME_SOUND_ID_ATTRIBUTE_ID, true);
+ }
+
+ public void writeActiveChimeSoundIdAttribute(DefaultClusterCallback callback, Integer value) {
+ writeActiveChimeSoundIdAttribute(callback, value, 0);
+ }
+
+ public void writeActiveChimeSoundIdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
+ BaseTLVType tlvValue = new UIntType(value);
+ writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_CHIME_SOUND_ID_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
+ }
+
+ public void subscribeActiveChimeSoundIdAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CHIME_SOUND_ID_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACTIVE_CHIME_SOUND_ID_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEnabledAttribute(
+ BooleanAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENABLED_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ENABLED_ATTRIBUTE_ID, true);
+ }
+
+ public void writeEnabledAttribute(DefaultClusterCallback callback, Boolean value) {
+ writeEnabledAttribute(callback, value, 0);
+ }
+
+ public void writeEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) {
+ BaseTLVType tlvValue = new BooleanType(value);
+ writeAttribute(new WriteAttributesCallbackImpl(callback), ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
+ }
+
+ public void subscribeEnabledAttribute(
+ BooleanAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENABLED_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ENABLED_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class EcosystemInformationCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1872L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 7ee8a88f80f64b..ad16b0792b13a3 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -12724,6 +12724,67 @@ public String toString() {
return output.toString();
}
}
+public static class ChimeClusterChimeSoundStruct {
+ public Integer chimeId;
+ public String name;
+ private static final long CHIME_ID_ID = 0L;
+ private static final long NAME_ID = 1L;
+
+ public ChimeClusterChimeSoundStruct(
+ Integer chimeId,
+ String name
+ ) {
+ this.chimeId = chimeId;
+ this.name = name;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CHIME_ID_ID, new UIntType(chimeId)));
+ values.add(new StructElement(NAME_ID, new StringType(name)));
+
+ return new StructType(values);
+ }
+
+ public static ChimeClusterChimeSoundStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer chimeId = null;
+ String name = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CHIME_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ chimeId = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == NAME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ name = castingValue.value(String.class);
+ }
+ }
+ }
+ return new ChimeClusterChimeSoundStruct(
+ chimeId,
+ name
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("ChimeClusterChimeSoundStruct {\n");
+ output.append("\tchimeId: ");
+ output.append(chimeId);
+ output.append("\n");
+ output.append("\tname: ");
+ output.append(name);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class EcosystemInformationClusterDeviceTypeStruct {
public Long deviceType;
public Integer revision;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 8bf4e6d615c358..fb2070787cb1bb 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -379,6 +379,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == ContentAppObserver.ID) {
return new ContentAppObserver();
}
+ if (clusterId == Chime.ID) {
+ return new Chime();
+ }
if (clusterId == EcosystemInformation.ID) {
return new EcosystemInformation();
}
@@ -16878,6 +16881,110 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
+ public static class Chime implements BaseCluster {
+ public static final long ID = 1366L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ InstalledChimeSounds(0L),
+ ActiveChimeSoundId(1L),
+ Enabled(2L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ PlayChimeSound(0L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class EcosystemInformation implements BaseCluster {
public static final long ID = 1872L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index d10ce6b823d8d4..3025c268521b80 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -19994,6 +19994,111 @@ public void onError(Exception ex) {
}
}
+ public static class DelegatedChimeClusterInstalledChimeSoundsAttributeCallback implements ChipClusters.ChimeCluster.InstalledChimeSoundsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedChimeClusterGeneratedCommandListAttributeCallback implements ChipClusters.ChimeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedChimeClusterAcceptedCommandListAttributeCallback implements ChipClusters.ChimeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedChimeClusterEventListAttributeCallback implements ChipClusters.ChimeCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedChimeClusterAttributeListAttributeCallback implements ChipClusters.ChimeCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedEcosystemInformationClusterDeviceDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.DeviceDirectoryAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -22330,6 +22435,10 @@ public Map initializeClusterMap() {
(ptr, endpointId) -> new ChipClusters.ContentAppObserverCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("contentAppObserver", contentAppObserverClusterInfo);
+ ClusterInfo chimeClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.ChimeCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("chime", chimeClusterInfo);
+
ClusterInfo ecosystemInformationClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.EcosystemInformationCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("ecosystemInformation", ecosystemInformationClusterInfo);
@@ -22471,6 +22580,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("contentAppObserver", contentAppObserverClusterInteractionInfoMap);
+ Map chimeClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map chimeplayChimeSoundCommandParams = new LinkedHashMap();
+ InteractionInfo chimeplayChimeSoundInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster)
+ .playChimeSound((DefaultClusterCallback) callback
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ chimeplayChimeSoundCommandParams
+ );
+ chimeClusterInteractionInfoMap.put("playChimeSound", chimeplayChimeSoundInteractionInfo);
+
+ commandMap.put("chime", chimeClusterInteractionInfoMap);
+
Map ecosystemInformationClusterInteractionInfoMap = new LinkedHashMap<>();
commandMap.put("ecosystemInformation", ecosystemInformationClusterInteractionInfoMap);
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index 7de9e8cdc25d2f..76df1318c2cc1d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -18236,6 +18236,109 @@ private static Map readContentAppObserverInteractionInf
return result;
}
+ private static Map readChimeInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readChimeInstalledChimeSoundsCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeInstalledChimeSoundsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readInstalledChimeSoundsAttribute(
+ (ChipClusters.ChimeCluster.InstalledChimeSoundsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedChimeClusterInstalledChimeSoundsAttributeCallback(),
+ readChimeInstalledChimeSoundsCommandParams
+ );
+ result.put("readInstalledChimeSoundsAttribute", readChimeInstalledChimeSoundsAttributeInteractionInfo);
+ Map readChimeActiveChimeSoundIdCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeActiveChimeSoundIdAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readActiveChimeSoundIdAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readChimeActiveChimeSoundIdCommandParams
+ );
+ result.put("readActiveChimeSoundIdAttribute", readChimeActiveChimeSoundIdAttributeInteractionInfo);
+ Map readChimeEnabledCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeEnabledAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readEnabledAttribute(
+ (ChipClusters.BooleanAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(),
+ readChimeEnabledCommandParams
+ );
+ result.put("readEnabledAttribute", readChimeEnabledAttributeInteractionInfo);
+ Map readChimeGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.ChimeCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedChimeClusterGeneratedCommandListAttributeCallback(),
+ readChimeGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readChimeGeneratedCommandListAttributeInteractionInfo);
+ Map readChimeAcceptedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.ChimeCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedChimeClusterAcceptedCommandListAttributeCallback(),
+ readChimeAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readChimeAcceptedCommandListAttributeInteractionInfo);
+ Map readChimeEventListCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readEventListAttribute(
+ (ChipClusters.ChimeCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedChimeClusterEventListAttributeCallback(),
+ readChimeEventListCommandParams
+ );
+ result.put("readEventListAttribute", readChimeEventListAttributeInteractionInfo);
+ Map readChimeAttributeListCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.ChimeCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedChimeClusterAttributeListAttributeCallback(),
+ readChimeAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readChimeAttributeListAttributeInteractionInfo);
+ Map readChimeFeatureMapCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readChimeFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readChimeFeatureMapAttributeInteractionInfo);
+ Map readChimeClusterRevisionCommandParams = new LinkedHashMap();
+ InteractionInfo readChimeClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readChimeClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readChimeClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map readEcosystemInformationInteractionInfo() {
Map result = new LinkedHashMap<>();Map readEcosystemInformationDeviceDirectoryCommandParams = new LinkedHashMap();
InteractionInfo readEcosystemInformationDeviceDirectoryAttributeInteractionInfo = new InteractionInfo(
@@ -19686,6 +19789,7 @@ public Map> getReadAttributeMap() {
put("accountLogin", readAccountLoginInteractionInfo());
put("contentControl", readContentControlInteractionInfo());
put("contentAppObserver", readContentAppObserverInteractionInfo());
+ put("chime", readChimeInteractionInfo());
put("ecosystemInformation", readEcosystemInformationInteractionInfo());
put("commissionerControl", readCommissionerControlInteractionInfo());
put("unitTesting", readUnitTestingInteractionInfo());
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index b61658cc4ef211..1e8e72762bcd09 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -3472,6 +3472,52 @@ public Map> getWriteAttributeMap() {
writeAttributeMap.put("contentControl", writeContentControlInteractionInfo);
Map writeContentAppObserverInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("contentAppObserver", writeContentAppObserverInteractionInfo);
+ Map writeChimeInteractionInfo = new LinkedHashMap<>();
+ Map writeChimeActiveChimeSoundIdCommandParams = new LinkedHashMap();
+ CommandParameterInfo chimeactiveChimeSoundIdCommandParameterInfo =
+ new CommandParameterInfo(
+ "value",
+ Integer.class,
+ Integer.class
+ );
+ writeChimeActiveChimeSoundIdCommandParams.put(
+ "value",
+ chimeactiveChimeSoundIdCommandParameterInfo
+ );
+ InteractionInfo writeChimeActiveChimeSoundIdAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).writeActiveChimeSoundIdAttribute(
+ (DefaultClusterCallback) callback,
+ (Integer) commandArguments.get("value")
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
+ writeChimeActiveChimeSoundIdCommandParams
+ );
+ writeChimeInteractionInfo.put("writeActiveChimeSoundIdAttribute", writeChimeActiveChimeSoundIdAttributeInteractionInfo);
+ Map writeChimeEnabledCommandParams = new LinkedHashMap();
+ CommandParameterInfo chimeenabledCommandParameterInfo =
+ new CommandParameterInfo(
+ "value",
+ Boolean.class,
+ Boolean.class
+ );
+ writeChimeEnabledCommandParams.put(
+ "value",
+ chimeenabledCommandParameterInfo
+ );
+ InteractionInfo writeChimeEnabledAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.ChimeCluster) cluster).writeEnabledAttribute(
+ (DefaultClusterCallback) callback,
+ (Boolean) commandArguments.get("value")
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
+ writeChimeEnabledCommandParams
+ );
+ writeChimeInteractionInfo.put("writeEnabledAttribute", writeChimeEnabledAttributeInteractionInfo);
+ writeAttributeMap.put("chime", writeChimeInteractionInfo);
Map writeEcosystemInformationInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("ecosystemInformation", writeEcosystemInformationInteractionInfo);
Map writeCommissionerControlInteractionInfo = new LinkedHashMap<>();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index bbaa6112dd9dea..397c26ee3dc9e5 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -28,6 +28,7 @@ structs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChimeClusterChimeSoundStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChimeClusterChimeSoundStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChimeClusterChimeSoundStruct.kt
new file mode 100644
index 00000000000000..586f6fcc2cb747
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChimeClusterChimeSoundStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class ChimeClusterChimeSoundStruct(val chimeId: UInt, val name: String) {
+ override fun toString(): String = buildString {
+ append("ChimeClusterChimeSoundStruct {\n")
+ append("\tchimeId : $chimeId\n")
+ append("\tname : $name\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CHIME_ID), chimeId)
+ put(ContextSpecificTag(TAG_NAME), name)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CHIME_ID = 0
+ private const val TAG_NAME = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChimeClusterChimeSoundStruct {
+ tlvReader.enterStructure(tlvTag)
+ val chimeId = tlvReader.getUInt(ContextSpecificTag(TAG_CHIME_ID))
+ val name = tlvReader.getString(ContextSpecificTag(TAG_NAME))
+
+ tlvReader.exitContainer()
+
+ return ChimeClusterChimeSoundStruct(chimeId, name)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt
new file mode 100644
index 00000000000000..2d6242b849d6f5
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt
@@ -0,0 +1,1009 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.BooleanSubscriptionState
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UByteSubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.WriteRequest
+import matter.controller.WriteRequests
+import matter.controller.WriteResponse
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class ChimeCluster(private val controller: MatterController, private val endpointId: UShort) {
+ class InstalledChimeSoundsAttribute(val value: List)
+
+ sealed class InstalledChimeSoundsAttributeSubscriptionState {
+ data class Success(val value: List) :
+ InstalledChimeSoundsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : InstalledChimeSoundsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : InstalledChimeSoundsAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun playChimeSound(timedInvokeTimeout: Duration? = null) {
+ val commandId: UInt = 0u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun readInstalledChimeSoundsAttribute(): InstalledChimeSoundsAttribute {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Installedchimesounds attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(ChimeClusterChimeSoundStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return InstalledChimeSoundsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeInstalledChimeSoundsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ InstalledChimeSoundsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Installedchimesounds attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(ChimeClusterChimeSoundStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(InstalledChimeSoundsAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(InstalledChimeSoundsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readActiveChimeSoundIdAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Activechimesoundid attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun writeActiveChimeSoundIdAttribute(value: UByte, timedWriteTimeout: Duration? = null) {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.put(AnonymousTag, value)
+
+ val writeRequests: WriteRequests =
+ WriteRequests(
+ requests =
+ listOf(
+ WriteRequest(
+ attributePath =
+ AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID),
+ tlvPayload = tlvWriter.getEncoded(),
+ )
+ ),
+ timedRequest = timedWriteTimeout,
+ )
+
+ val response: WriteResponse = controller.write(writeRequests)
+
+ when (response) {
+ is WriteResponse.Success -> {
+ logger.log(Level.FINE, "Write command succeeded")
+ }
+ is WriteResponse.PartialWriteFailure -> {
+ val aggregatedErrorMessage =
+ response.failures.joinToString("\n") { failure ->
+ "Error at ${failure.attributePath}: ${failure.ex.message}"
+ }
+
+ response.failures.forEach { failure ->
+ logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}")
+ }
+
+ throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage")
+ }
+ }
+ }
+
+ suspend fun subscribeActiveChimeSoundIdAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Activechimesoundid attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEnabledAttribute(): Boolean {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Enabled attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun writeEnabledAttribute(value: Boolean, timedWriteTimeout: Duration? = null) {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.put(AnonymousTag, value)
+
+ val writeRequests: WriteRequests =
+ WriteRequests(
+ requests =
+ listOf(
+ WriteRequest(
+ attributePath =
+ AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID),
+ tlvPayload = tlvWriter.getEncoded(),
+ )
+ ),
+ timedRequest = timedWriteTimeout,
+ )
+
+ val response: WriteResponse = controller.write(writeRequests)
+
+ when (response) {
+ is WriteResponse.Success -> {
+ logger.log(Level.FINE, "Write command succeeded")
+ }
+ is WriteResponse.PartialWriteFailure -> {
+ val aggregatedErrorMessage =
+ response.failures.joinToString("\n") { failure ->
+ "Error at ${failure.attributePath}: ${failure.ex.message}"
+ }
+
+ response.failures.forEach { failure ->
+ logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}")
+ }
+
+ throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage")
+ }
+ }
+ }
+
+ suspend fun subscribeEnabledAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ BooleanSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Enabled attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag)
+
+ emit(BooleanSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(BooleanSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(ChimeCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 1366u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index d1a3d9681b21bf..42e2b95b02028f 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -28,6 +28,7 @@ matter_structs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramCategoryStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterSeriesInfoStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChimeClusterChimeSoundStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterRatingNameStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt",
@@ -267,6 +268,7 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ChannelCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ColorControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentAppObserverCluster.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ChimeClusterChimeSoundStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ChimeClusterChimeSoundStruct.kt
new file mode 100644
index 00000000000000..adc8cbb0db2d3e
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ChimeClusterChimeSoundStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class ChimeClusterChimeSoundStruct(val chimeId: UByte, val name: String) {
+ override fun toString(): String = buildString {
+ append("ChimeClusterChimeSoundStruct {\n")
+ append("\tchimeId : $chimeId\n")
+ append("\tname : $name\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CHIME_ID), chimeId)
+ put(ContextSpecificTag(TAG_NAME), name)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CHIME_ID = 0
+ private const val TAG_NAME = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChimeClusterChimeSoundStruct {
+ tlvReader.enterStructure(tlvTag)
+ val chimeId = tlvReader.getUByte(ContextSpecificTag(TAG_CHIME_ID))
+ val name = tlvReader.getString(ContextSpecificTag(TAG_NAME))
+
+ tlvReader.exitContainer()
+
+ return ChimeClusterChimeSoundStruct(chimeId, name)
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index fbbb5be261737f..c272e8404c83e7 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -42220,6 +42220,231 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
break;
}
+ case app::Clusters::Chime::Id: {
+ using namespace app::Clusters::Chime;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::InstalledChimeSounds::Id: {
+ using TypeInfo = Attributes::InstalledChimeSounds::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ jobject newElement_0_chimeId;
+ std::string newElement_0_chimeIdClassName = "java/lang/Integer";
+ std::string newElement_0_chimeIdCtorSignature = "(I)V";
+ jint jninewElement_0_chimeId = static_cast(entry_0.chimeId);
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_chimeIdClassName.c_str(),
+ newElement_0_chimeIdCtorSignature.c_str(),
+ jninewElement_0_chimeId, newElement_0_chimeId);
+ jobject newElement_0_name;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name));
+
+ jclass chimeSoundStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$ChimeClusterChimeSoundStruct", chimeSoundStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$ChimeClusterChimeSoundStruct");
+ return nullptr;
+ }
+
+ jmethodID chimeSoundStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(env, chimeSoundStructStructClass_1, "",
+ "(Ljava/lang/Integer;Ljava/lang/String;)V",
+ &chimeSoundStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || chimeSoundStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$ChimeClusterChimeSoundStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0 = env->NewObject(chimeSoundStructStructClass_1, chimeSoundStructStructCtor_1, newElement_0_chimeId,
+ newElement_0_name);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::ActiveChimeSoundId::Id: {
+ using TypeInfo = Attributes::ActiveChimeSoundId::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::Enabled::Id: {
+ using TypeInfo = Attributes::Enabled::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Boolean";
+ std::string valueCtorSignature = "(Z)V";
+ jboolean jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::EventList::Id: {
+ using TypeInfo = Attributes::EventList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::EcosystemInformation::Id: {
using namespace app::Clusters::EcosystemInformation;
switch (aPath.mAttributeId)
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index dd385a777c9276..2dc46ab844d25e 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -8248,6 +8248,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader &
}
break;
}
+ case app::Clusters::Chime::Id: {
+ using namespace app::Clusters::Chime;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::EcosystemInformation::Id: {
using namespace app::Clusters::EcosystemInformation;
switch (aPath.mEventId)
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index af684af705969f..1b5f2e6513fa1c 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -13029,6 +13029,76 @@ class ChipClusters:
},
},
}
+ _CHIME_CLUSTER_INFO = {
+ "clusterName": "Chime",
+ "clusterId": 0x00000556,
+ "commands": {
+ 0x00000000: {
+ "commandId": 0x00000000,
+ "commandName": "PlayChimeSound",
+ "args": {
+ },
+ },
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "InstalledChimeSounds",
+ "attributeId": 0x00000000,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "ActiveChimeSoundId",
+ "attributeId": 0x00000001,
+ "type": "int",
+ "reportable": True,
+ "writable": True,
+ },
+ 0x00000002: {
+ "attributeName": "Enabled",
+ "attributeId": 0x00000002,
+ "type": "bool",
+ "reportable": True,
+ "writable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFA: {
+ "attributeName": "EventList",
+ "attributeId": 0x0000FFFA,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_ECOSYSTEM_INFORMATION_CLUSTER_INFO = {
"clusterName": "EcosystemInformation",
"clusterId": 0x00000750,
@@ -14277,6 +14347,7 @@ class ChipClusters:
0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO,
0x0000050F: _CONTENT_CONTROL_CLUSTER_INFO,
0x00000510: _CONTENT_APP_OBSERVER_CLUSTER_INFO,
+ 0x00000556: _CHIME_CLUSTER_INFO,
0x00000750: _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
0x00000751: _COMMISSIONER_CONTROL_CLUSTER_INFO,
0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO,
@@ -14402,6 +14473,7 @@ class ChipClusters:
"AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO,
"ContentControl": _CONTENT_CONTROL_CLUSTER_INFO,
"ContentAppObserver": _CONTENT_APP_OBSERVER_CLUSTER_INFO,
+ "Chime": _CHIME_CLUSTER_INFO,
"EcosystemInformation": _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
"CommissionerControl": _COMMISSIONER_CONTROL_CLUSTER_INFO,
"UnitTesting": _UNIT_TESTING_CLUSTER_INFO,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 6a9e0b8416fd5a..c70def4c9eb2ec 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -156,6 +156,7 @@
"AccountLogin",
"ContentControl",
"ContentAppObserver",
+ "Chime",
"EcosystemInformation",
"CommissionerControl",
"UnitTesting",
@@ -46505,6 +46506,209 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
value: 'uint' = 0
+@dataclass
+class Chime(Cluster):
+ id: typing.ClassVar[int] = 0x00000556
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="installedChimeSounds", Tag=0x00000000, Type=typing.List[Chime.Structs.ChimeSoundStruct]),
+ ClusterObjectFieldDescriptor(Label="activeChimeSoundId", Tag=0x00000001, Type=uint),
+ ClusterObjectFieldDescriptor(Label="enabled", Tag=0x00000002, Type=bool),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ installedChimeSounds: 'typing.List[Chime.Structs.ChimeSoundStruct]' = None
+ activeChimeSoundId: 'uint' = None
+ enabled: 'bool' = None
+ generatedCommandList: 'typing.List[uint]' = None
+ acceptedCommandList: 'typing.List[uint]' = None
+ eventList: 'typing.List[uint]' = None
+ attributeList: 'typing.List[uint]' = None
+ featureMap: 'uint' = None
+ clusterRevision: 'uint' = None
+
+ class Structs:
+ @dataclass
+ class ChimeSoundStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="chimeId", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str),
+ ])
+
+ chimeId: 'uint' = 0
+ name: 'str' = ""
+
+ class Commands:
+ @dataclass
+ class PlayChimeSound(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000556
+ command_id: typing.ClassVar[int] = 0x00000000
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ])
+
+ class Attributes:
+ @dataclass
+ class InstalledChimeSounds(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[Chime.Structs.ChimeSoundStruct])
+
+ value: 'typing.List[Chime.Structs.ChimeSoundStruct]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class ActiveChimeSoundId(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+ @dataclass
+ class Enabled(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=bool)
+
+ value: 'bool' = False
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class EventList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFA
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000556
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+
@dataclass
class EcosystemInformation(Cluster):
id: typing.ClassVar[int] = 0x00000750
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 6c1548f5159b70..f94445c21d3d3e 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -5912,6 +5912,42 @@ static BOOL AttributeIsSpecifiedInContentAppObserverCluster(AttributeId aAttribu
}
}
}
+static BOOL AttributeIsSpecifiedInChimeCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::Chime;
+ switch (aAttributeId) {
+ case Attributes::InstalledChimeSounds::Id: {
+ return YES;
+ }
+ case Attributes::ActiveChimeSoundId::Id: {
+ return YES;
+ }
+ case Attributes::Enabled::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::EventList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInEcosystemInformationCluster(AttributeId aAttributeId)
{
using namespace Clusters::EcosystemInformation;
@@ -6645,6 +6681,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId)
case Clusters::ContentAppObserver::Id: {
return AttributeIsSpecifiedInContentAppObserverCluster(aAttributeId);
}
+ case Clusters::Chime::Id: {
+ return AttributeIsSpecifiedInChimeCluster(aAttributeId);
+ }
case Clusters::EcosystemInformation::Id: {
return AttributeIsSpecifiedInEcosystemInformationCluster(aAttributeId);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 4affde0367f59a..3b8fff36f2efe3 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -16899,6 +16899,73 @@ static id _Nullable DecodeAttributeValueForContentAppObserverCluster(AttributeId
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::Chime;
+ switch (aAttributeId) {
+ case Attributes::InstalledChimeSounds::Id: {
+ using TypeInfo = Attributes::InstalledChimeSounds::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nonnull value;
+ { // Scope for our temporary variables
+ auto * array_0 = [NSMutableArray new];
+ auto iter_0 = cppValue.begin();
+ while (iter_0.Next()) {
+ auto & entry_0 = iter_0.GetValue();
+ MTRChimeClusterChimeSoundStruct * newElement_0;
+ newElement_0 = [MTRChimeClusterChimeSoundStruct new];
+ newElement_0.chimeId = [NSNumber numberWithUnsignedChar:entry_0.chimeId];
+ newElement_0.name = AsString(entry_0.name);
+ if (newElement_0.name == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ [array_0 addObject:newElement_0];
+ }
+ CHIP_ERROR err = iter_0.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_0;
+ }
+ return value;
+ }
+ case Attributes::ActiveChimeSoundId::Id: {
+ using TypeInfo = Attributes::ActiveChimeSoundId::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedChar:cppValue];
+ return value;
+ }
+ case Attributes::Enabled::Id: {
+ using TypeInfo = Attributes::Enabled::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithBool:cppValue];
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForEcosystemInformationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::EcosystemInformation;
@@ -19008,6 +19075,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T
case Clusters::ContentAppObserver::Id: {
return DecodeAttributeValueForContentAppObserverCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::Chime::Id: {
+ return DecodeAttributeValueForChimeCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::EcosystemInformation::Id: {
return DecodeAttributeValueForEcosystemInformationCluster(aPath.mAttributeId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index bcf76c978cb480..cbc390c337da9e 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -14756,6 +14756,98 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster Chime
+ *
+ *
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterChime : MTRGenericBaseCluster
+
+/**
+ * Command PlayChimeSound
+ *
+ *
+ */
+- (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)playChimeSoundWithCompletion:(MTRStatusCompletion)completion
+ MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeInstalledChimeSoundsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeInstalledChimeSoundsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeInstalledChimeSoundsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeActiveChimeSoundIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeActiveChimeSoundIdWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeActiveChimeSoundIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterChime (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Ecosystem Information
*
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 67025a001ab842..f129e16427af2b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -102085,6 +102085,419 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC
@end
+@implementation MTRBaseClusterChime
+
+- (void)playChimeSoundWithCompletion:(MTRStatusCompletion)completion
+{
+ [self playChimeSoundWithParams:nil completion:completion];
+}
+- (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullable)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRChimeClusterPlayChimeSoundParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = Chime::Commands::PlayChimeSound::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)readAttributeInstalledChimeSoundsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::InstalledChimeSounds::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeInstalledChimeSoundsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::InstalledChimeSounds::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeInstalledChimeSoundsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::InstalledChimeSounds::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeActiveChimeSoundIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::ActiveChimeSoundId::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion
+{
+ [self writeAttributeActiveChimeSoundIdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion];
+}
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion
+{
+ // Make a copy of params before we go async.
+ params = [params copy];
+ value = [value copy];
+
+ auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
+ chip::Optional timedWriteTimeout;
+ if (params != nil) {
+ if (params.timedWriteTimeout != nil){
+ timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue);
+ }
+ }
+
+ ListFreer listFreer;
+ using TypeInfo = Chime::Attributes::ActiveChimeSoundId::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue = value.unsignedCharValue;
+
+ chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue);
+ return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); });
+ std::move(*bridge).DispatchAction(self.device);
+}
+
+- (void)subscribeAttributeActiveChimeSoundIdWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::ActiveChimeSoundId::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeActiveChimeSoundIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::ActiveChimeSoundId::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::Enabled::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion
+{
+ [self writeAttributeEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion];
+}
+- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion
+{
+ // Make a copy of params before we go async.
+ params = [params copy];
+ value = [value copy];
+
+ auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
+ chip::Optional timedWriteTimeout;
+ if (params != nil) {
+ if (params.timedWriteTimeout != nil){
+ timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue);
+ }
+ }
+
+ ListFreer listFreer;
+ using TypeInfo = Chime::Attributes::Enabled::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue = value.boolValue;
+
+ chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue);
+ return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); });
+ std::move(*bridge).DispatchAction(self.device);
+}
+
+- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::Enabled::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::Enabled::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::EventList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::EventList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::EventList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = Chime::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = Chime::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterEcosystemInformation
- (void)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index b86600455521cd..72233c40c81bdc 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -197,6 +197,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) {
MTRClusterIDTypeAccountLoginID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050E,
MTRClusterIDTypeContentControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F,
MTRClusterIDTypeContentAppObserverID MTR_PROVISIONALLY_AVAILABLE = 0x00000510,
+ MTRClusterIDTypeChimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000556,
MTRClusterIDTypeEcosystemInformationID MTR_PROVISIONALLY_AVAILABLE = 0x00000750,
MTRClusterIDTypeCommissionerControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000751,
MTRClusterIDTypeUnitTestingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC05,
@@ -4738,6 +4739,17 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster Chime attributes
+ MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterChimeAttributeActiveChimeSoundIdID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterChimeAttributeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterChimeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterChimeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterChimeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID,
+ MTRAttributeIDTypeClusterChimeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterChimeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterChimeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster EcosystemInformation attributes
MTRAttributeIDTypeClusterEcosystemInformationAttributeDeviceDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRAttributeIDTypeClusterEcosystemInformationAttributeLocationDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
@@ -6931,6 +6943,9 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) {
MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ // Cluster Chime commands
+ MTRCommandIDTypeClusterChimeCommandPlayChimeSoundID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+
// Cluster CommissionerControl commands
MTRCommandIDTypeClusterCommissionerControlCommandRequestCommissioningApprovalID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRCommandIDTypeClusterCommissionerControlCommandCommissionNodeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index 59b10037b32a43..00c2db4a280021 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -369,6 +369,9 @@
case MTRClusterIDTypeContentAppObserverID:
result = @"ContentAppObserver";
break;
+ case MTRClusterIDTypeChimeID:
+ result = @"Chime";
+ break;
case MTRClusterIDTypeEcosystemInformationID:
result = @"EcosystemInformation";
break;
@@ -8136,6 +8139,53 @@
}
break;
+ case MTRClusterIDTypeChimeID:
+
+ switch (attributeID) {
+
+ // Cluster Chime attributes
+ case MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID:
+ result = @"InstalledChimeSounds";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeActiveChimeSoundIdID:
+ result = @"ActiveChimeSoundId";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeEnabledID:
+ result = @"Enabled";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeEventListID:
+ result = @"EventList";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterChimeAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", attributeID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeEcosystemInformationID:
switch (attributeID) {
@@ -10287,6 +10337,16 @@
}
break;
+ case MTRClusterIDTypeChimeID:
+
+ switch (eventID) {
+
+ default:
+ result = [NSString stringWithFormat:@"", eventID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeEcosystemInformationID:
switch (eventID) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 3a761fa7054192..2b329ff43f23fe 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -6824,6 +6824,56 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster Chime
+ *
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterChime : MTRGenericCluster
+
+- (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)playChimeSoundWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+ MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeInstalledChimeSoundsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeActiveChimeSoundIdWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterChime (Availability)
+
+/**
+ * For all instance methods that take a completion (i.e. command invocations),
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Ecosystem Information
* Provides extended device information for all the logical devices represented by a Bridged Node.
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index 2ce4294c736a71..c745143f72507b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -19549,6 +19549,108 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa
@end
+@implementation MTRClusterChime
+
+- (void)playChimeSoundWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+{
+ [self playChimeSoundWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion];
+}
+- (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRChimeClusterPlayChimeSoundParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = Chime::Commands::PlayChimeSound::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (NSDictionary * _Nullable)readAttributeInstalledChimeSoundsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeActiveChimeSoundIdWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeActiveChimeSoundIdID) params:params];
+}
+
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs
+{
+ [self writeAttributeActiveChimeSoundIdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil];
+}
+- (void)writeAttributeActiveChimeSoundIdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params
+{
+ NSNumber * timedWriteTimeout = params.timedWriteTimeout;
+
+ [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeActiveChimeSoundIdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout];
+}
+
+- (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeEnabledID) params:params];
+}
+
+- (void)writeAttributeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs
+{
+ [self writeAttributeEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil];
+}
+- (void)writeAttributeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params
+{
+ NSNumber * timedWriteTimeout = params.timedWriteTimeout;
+
+ [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout];
+}
+
+- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeEventListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeClusterRevisionID) params:params];
+}
+
+@end
+
@implementation MTRClusterEcosystemInformation
- (NSDictionary * _Nullable)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index 7135f3d88d8357..27a21e0b800666 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -10835,6 +10835,34 @@ MTR_PROVISIONALLY_AVAILABLE
error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRChimeClusterPlayChimeSoundParams : NSObject
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
MTR_PROVISIONALLY_AVAILABLE
@interface MTRCommissionerControlClusterRequestCommissioningApprovalParams : NSObject
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index ec90ce4d023543..4783d5b3308c9b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -31337,6 +31337,79 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentA
@end
+@implementation MTRChimeClusterPlayChimeSoundParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRChimeClusterPlayChimeSoundParams alloc] init];
+
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRChimeClusterPlayChimeSoundParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::Chime::Commands::PlayChimeSound::Type encodableStruct;
+ ListFreer listFreer;
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
@implementation MTRCommissionerControlClusterRequestCommissioningApprovalParams
- (instancetype)init
{
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
index 1d5bc86099c258..e7c5f23867e2ac 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
@@ -2032,6 +2032,12 @@ NS_ASSUME_NONNULL_BEGIN
@end
+@interface MTRChimeClusterPlayChimeSoundParams (InternalMethods)
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
@interface MTRCommissionerControlClusterRequestCommissioningApprovalParams (InternalMethods)
- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
index 3724ec038ef00c..6b5fed7921cfc9 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
@@ -1124,6 +1124,15 @@ static BOOL CommandNeedsTimedInvokeInContentAppObserverCluster(AttributeId aAttr
}
}
}
+static BOOL CommandNeedsTimedInvokeInChimeCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::Chime;
+ switch (aAttributeId) {
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL CommandNeedsTimedInvokeInEcosystemInformationCluster(AttributeId aAttributeId)
{
using namespace Clusters::EcosystemInformation;
@@ -1512,6 +1521,9 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn
case Clusters::ContentAppObserver::Id: {
return CommandNeedsTimedInvokeInContentAppObserverCluster(commandID);
}
+ case Clusters::Chime::Id: {
+ return CommandNeedsTimedInvokeInChimeCluster(commandID);
+ }
case Clusters::EcosystemInformation::Id: {
return CommandNeedsTimedInvokeInEcosystemInformationCluster(commandID);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
index 4b493a97a74df6..d3163c2aa1dbec 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
@@ -4543,6 +4543,18 @@ static id _Nullable DecodeEventPayloadForContentAppObserverCluster(EventId aEven
*aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
return nil;
}
+static id _Nullable DecodeEventPayloadForChimeCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::Chime;
+ switch (aEventId) {
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeEventPayloadForEcosystemInformationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::EcosystemInformation;
@@ -5133,6 +5145,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead
case Clusters::ContentAppObserver::Id: {
return DecodeEventPayloadForContentAppObserverCluster(aPath.mEventId, aReader, aError);
}
+ case Clusters::Chime::Id: {
+ return DecodeEventPayloadForChimeCluster(aPath.mEventId, aReader, aError);
+ }
case Clusters::EcosystemInformation::Id: {
return DecodeEventPayloadForEcosystemInformationCluster(aPath.mEventId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index 61aa5161dced29..2aecf40b144cbf 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -2117,6 +2117,12 @@ MTR_PROVISIONALLY_AVAILABLE
@interface MTRContentControlClusterRemainingScreenTimeExpiredEvent : NSObject
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRChimeClusterChimeSoundStruct : NSObject
+@property (nonatomic, copy) NSNumber * _Nonnull chimeId MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE;
+@end
+
MTR_PROVISIONALLY_AVAILABLE
@interface MTREcosystemInformationClusterDeviceTypeStruct : NSObject
@property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_PROVISIONALLY_AVAILABLE;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index 5cb5806c112a69..67b0774cc0f973 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -8768,6 +8768,36 @@ - (NSString *)description
@end
+@implementation MTRChimeClusterChimeSoundStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _chimeId = @(0);
+
+ _name = @"";
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRChimeClusterChimeSoundStruct alloc] init];
+
+ other.chimeId = self.chimeId;
+ other.name = self.name;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: chimeId:%@; name:%@; >", NSStringFromClass([self class]), _chimeId, _name];
+ return descriptionString;
+}
+
+@end
+
@implementation MTREcosystemInformationClusterDeviceTypeStruct
- (instancetype)init
{
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
index 4d9c6b9f545dd1..2ccdf50a187413 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
@@ -36667,6 +36667,196 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value)
} // namespace Attributes
} // namespace ContentAppObserver
+namespace Chime {
+namespace Attributes {
+
+namespace ActiveChimeSoundId {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Chime::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Chime::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::Chime::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ActiveChimeSoundId
+
+namespace Enabled {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Chime::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Chime::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::Chime::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
+}
+
+} // namespace Enabled
+
+namespace FeatureMap {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Chime::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Chime::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::Chime::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+}
+
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Chime::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Chime::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::Chime::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace Chime
+
namespace EcosystemInformation {
namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index c4b83e7920c064..7d60e62564bfac 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -5563,6 +5563,36 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar
} // namespace Attributes
} // namespace ContentAppObserver
+namespace Chime {
+namespace Attributes {
+
+namespace ActiveChimeSoundId {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty);
+} // namespace ActiveChimeSoundId
+
+namespace Enabled {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean
+Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty);
+} // namespace Enabled
+
+namespace FeatureMap {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty);
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace Chime
+
namespace EcosystemInformation {
namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h
index 7e86e92268f703..59e11e3d5ecd61 100644
--- a/zzz_generated/app-common/app-common/zap-generated/callback.h
+++ b/zzz_generated/app-common/app-common/zap-generated/callback.h
@@ -618,6 +618,11 @@ void emberAfContentControlClusterInitCallback(chip::EndpointId endpoint);
*/
void emberAfContentAppObserverClusterInitCallback(chip::EndpointId endpoint);
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfChimeClusterInitCallback(chip::EndpointId endpoint);
+
/**
* @param endpoint Endpoint that is being initialized
*/
@@ -5167,6 +5172,45 @@ chip::Protocols::InteractionModel::Status MatterContentAppObserverClusterServerP
*/
void emberAfContentAppObserverClusterServerTickCallback(chip::EndpointId endpoint);
+//
+// Chime Cluster
+//
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfChimeClusterServerInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void MatterChimeClusterServerShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfChimeClusterClientInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param attributePath Concrete attribute path that changed
+ */
+void MatterChimeClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
+
+/**
+ * @param attributePath Concrete attribute path to be changed
+ * @param attributeType Attribute type
+ * @param size Attribute size
+ * @param value Attribute value
+ */
+chip::Protocols::InteractionModel::Status
+MatterChimeClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
+ EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
+
+/**
+ * @param endpoint Endpoint that is being served
+ */
+void emberAfChimeClusterServerTickCallback(chip::EndpointId endpoint);
+
//
// Ecosystem Information Cluster
//
@@ -6557,6 +6601,12 @@ bool emberAfContentControlClusterSetScheduledContentRatingThresholdCallback(
bool emberAfContentAppObserverClusterContentAppMessageCallback(
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::DecodableType & commandData);
+/**
+ * @brief Chime Cluster PlayChimeSound Command callback (from client)
+ */
+bool emberAfChimeClusterPlayChimeSoundCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
+ const chip::app::Clusters::Chime::Commands::PlayChimeSound::DecodableType & commandData);
/**
* @brief Commissioner Control Cluster RequestCommissioningApproval Command callback (from client)
*/
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
index c55fab3f9ae9fa..206d3da00cdefa 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
@@ -5392,6 +5392,8 @@ enum class StatusEnum : uint8_t
};
} // namespace ContentAppObserver
+namespace Chime {} // namespace Chime
+
namespace EcosystemInformation {} // namespace EcosystemInformation
namespace CommissionerControl {
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
index 3029e317897ca2..9c7cad32717aa8 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
@@ -28476,6 +28476,106 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre
namespace Events {} // namespace Events
} // namespace ContentAppObserver
+namespace Chime {
+namespace Structs {
+
+namespace ChimeSoundStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kChimeId), chimeId);
+ encoder.Encode(to_underlying(Fields::kName), name);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative(__element))
+ {
+ return std::get(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get(__element);
+
+ if (__context_tag == to_underlying(Fields::kChimeId))
+ {
+ err = DataModel::Decode(reader, chimeId);
+ }
+ else if (__context_tag == to_underlying(Fields::kName))
+ {
+ err = DataModel::Decode(reader, name);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace ChimeSoundStruct
+} // namespace Structs
+
+namespace Commands {
+namespace PlayChimeSound {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative(__element))
+ {
+ return std::get(__element);
+ }
+ }
+}
+} // namespace PlayChimeSound.
+} // namespace Commands
+
+namespace Attributes {
+CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path)
+{
+ switch (path.mAttributeId)
+ {
+ case Attributes::InstalledChimeSounds::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, installedChimeSounds);
+ case Attributes::ActiveChimeSoundId::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, activeChimeSoundId);
+ case Attributes::Enabled::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, enabled);
+ case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, generatedCommandList);
+ case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, acceptedCommandList);
+ case Attributes::EventList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, eventList);
+ case Attributes::AttributeList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, attributeList);
+ case Attributes::FeatureMap::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, featureMap);
+ case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, clusterRevision);
+ default:
+ return CHIP_NO_ERROR;
+ }
+}
+} // namespace Attributes
+
+namespace Events {} // namespace Events
+
+} // namespace Chime
namespace EcosystemInformation {
namespace Structs {
@@ -32399,6 +32499,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand)
return false;
}
}
+ case Clusters::Chime::Id: {
+ switch (aCommand)
+ {
+ default:
+ return false;
+ }
+ }
case Clusters::CommissionerControl::Id: {
switch (aCommand)
{
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index 16042f9eeb562f..59d48f7fd11eda 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -41196,6 +41196,171 @@ struct TypeInfo
};
} // namespace Attributes
} // namespace ContentAppObserver
+namespace Chime {
+namespace Structs {
+namespace ChimeSoundStruct {
+enum class Fields : uint8_t
+{
+ kChimeId = 0,
+ kName = 1,
+};
+
+struct Type
+{
+public:
+ uint8_t chimeId = static_cast(0);
+ chip::CharSpan name;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace ChimeSoundStruct
+} // namespace Structs
+
+namespace Commands {
+// Forward-declarations so we can reference these later.
+
+namespace PlayChimeSound {
+struct Type;
+struct DecodableType;
+} // namespace PlayChimeSound
+
+} // namespace Commands
+
+namespace Commands {
+namespace PlayChimeSound {
+enum class Fields : uint8_t
+{
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::PlayChimeSound::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = DataModel::NullObjectType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::PlayChimeSound::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace PlayChimeSound
+} // namespace Commands
+
+namespace Attributes {
+
+namespace InstalledChimeSounds {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::List;
+ using DecodableType = chip::app::DataModel::DecodableList;
+ using DecodableArgType =
+ const chip::app::DataModel::DecodableList &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::InstalledChimeSounds::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace InstalledChimeSounds
+namespace ActiveChimeSoundId {
+struct TypeInfo
+{
+ using Type = uint8_t;
+ using DecodableType = uint8_t;
+ using DecodableArgType = uint8_t;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::ActiveChimeSoundId::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace ActiveChimeSoundId
+namespace Enabled {
+struct TypeInfo
+{
+ using Type = bool;
+ using DecodableType = bool;
+ using DecodableArgType = bool;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::Enabled::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace Enabled
+namespace GeneratedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+};
+} // namespace GeneratedCommandList
+namespace AcceptedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+};
+} // namespace AcceptedCommandList
+namespace EventList {
+struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+};
+} // namespace EventList
+namespace AttributeList {
+struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+};
+} // namespace AttributeList
+namespace FeatureMap {
+struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+};
+} // namespace FeatureMap
+namespace ClusterRevision {
+struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+};
+} // namespace ClusterRevision
+
+struct TypeInfo
+{
+ struct DecodableType
+ {
+ static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
+
+ Attributes::InstalledChimeSounds::TypeInfo::DecodableType installedChimeSounds;
+ Attributes::ActiveChimeSoundId::TypeInfo::DecodableType activeChimeSoundId = static_cast(0);
+ Attributes::Enabled::TypeInfo::DecodableType enabled = static_cast(0);
+ Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
+ Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
+ Attributes::EventList::TypeInfo::DecodableType eventList;
+ Attributes::AttributeList::TypeInfo::DecodableType attributeList;
+ Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0);
+ Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0);
+ };
+};
+} // namespace Attributes
+} // namespace Chime
namespace EcosystemInformation {
namespace Structs {
namespace DeviceTypeStruct = Clusters::detail::Structs::DeviceTypeStruct;
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
index 20e4ea7c9fd82a..a7703bd94c3c36 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
@@ -7313,6 +7313,48 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id;
} // namespace Attributes
} // namespace ContentAppObserver
+namespace Chime {
+namespace Attributes {
+
+namespace InstalledChimeSounds {
+static constexpr AttributeId Id = 0x00000000;
+} // namespace InstalledChimeSounds
+
+namespace ActiveChimeSoundId {
+static constexpr AttributeId Id = 0x00000001;
+} // namespace ActiveChimeSoundId
+
+namespace Enabled {
+static constexpr AttributeId Id = 0x00000002;
+} // namespace Enabled
+
+namespace GeneratedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id;
+} // namespace GeneratedCommandList
+
+namespace AcceptedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id;
+} // namespace AcceptedCommandList
+
+namespace EventList {
+static constexpr AttributeId Id = Globals::Attributes::EventList::Id;
+} // namespace EventList
+
+namespace AttributeList {
+static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id;
+} // namespace AttributeList
+
+namespace FeatureMap {
+static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id;
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id;
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace Chime
+
namespace EcosystemInformation {
namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
index 26dd82c18e704e..688110cd99f66d 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
@@ -376,6 +376,9 @@ static constexpr ClusterId Id = 0x0000050F;
namespace ContentAppObserver {
static constexpr ClusterId Id = 0x00000510;
} // namespace ContentAppObserver
+namespace Chime {
+static constexpr ClusterId Id = 0x00000556;
+} // namespace Chime
namespace EcosystemInformation {
static constexpr ClusterId Id = 0x00000750;
} // namespace EcosystemInformation
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
index b6cd8158f07d94..b6c40f70d2726d 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
@@ -1803,6 +1803,16 @@ static constexpr CommandId Id = 0x00000001;
} // namespace Commands
} // namespace ContentAppObserver
+namespace Chime {
+namespace Commands {
+
+namespace PlayChimeSound {
+static constexpr CommandId Id = 0x00000000;
+} // namespace PlayChimeSound
+
+} // namespace Commands
+} // namespace Chime
+
namespace CommissionerControl {
namespace Commands {
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index 2333130d16c13a..eb8fe2243e37f2 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -152,6 +152,7 @@
| AccountLogin | 0x050E |
| ContentControl | 0x050F |
| ContentAppObserver | 0x0510 |
+| Chime | 0x0556 |
| EcosystemInformation | 0x0750 |
| CommissionerControl | 0x0751 |
| UnitTesting | 0xFFF1FC05|
@@ -13645,6 +13646,62 @@ class ContentAppObserverContentAppMessage : public ClusterCommand
chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type mRequest;
};
+/*----------------------------------------------------------------------------*\
+| Cluster Chime | 0x0556 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+| * PlayChimeSound | 0x00 |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * InstalledChimeSounds | 0x0000 |
+| * ActiveChimeSoundId | 0x0001 |
+| * Enabled | 0x0002 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * EventList | 0xFFFA |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+/*
+ * Command PlayChimeSound
+ */
+class ChimePlayChimeSound : public ClusterCommand
+{
+public:
+ ChimePlayChimeSound(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("play-chime-sound", credsIssuerConfig)
+ {
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::Chime::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::Chime::Commands::PlayChimeSound::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId,
+ commandId, endpointIds.at(0));
+ return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest);
+ }
+
+ CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::Chime::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::Chime::Commands::PlayChimeSound::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId,
+ groupId);
+
+ return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest);
+ }
+
+private:
+ chip::app::Clusters::Chime::Commands::PlayChimeSound::Type mRequest;
+};
+
/*----------------------------------------------------------------------------*\
| Cluster EcosystemInformation | 0x0750 |
|------------------------------------------------------------------------------|
@@ -26166,6 +26223,72 @@ void registerClusterContentAppObserver(Commands & commands, CredentialIssuerComm
commands.RegisterCluster(clusterName, clusterCommands);
}
+void registerClusterChime(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
+{
+ using namespace chip::app::Clusters::Chime;
+
+ const char * clusterName = "Chime";
+
+ commands_list clusterCommands = {
+ //
+ // Commands
+ //
+ make_unique(Id, credsIssuerConfig), //
+ make_unique(credsIssuerConfig), //
+ //
+ // Attributes
+ //
+ make_unique(Id, credsIssuerConfig), //
+ make_unique(Id, "installed-chime-sounds", Attributes::InstalledChimeSounds::Id, credsIssuerConfig), //
+ make_unique(Id, "active-chime-sound-id", Attributes::ActiveChimeSoundId::Id, credsIssuerConfig), //
+ make_unique(Id, "enabled", Attributes::Enabled::Id, credsIssuerConfig), //
+ make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), //
+ make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ make_unique>(Id, credsIssuerConfig), //
+ make_unique<
+ WriteAttributeAsComplex>>(
+ Id, "installed-chime-sounds", Attributes::InstalledChimeSounds::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique>(Id, "active-chime-sound-id", 0, UINT8_MAX, Attributes::ActiveChimeSoundId::Id,
+ WriteCommandType::kWrite, credsIssuerConfig), //
+ make_unique>(Id, "enabled", 0, 1, Attributes::Enabled::Id, WriteCommandType::kWrite,
+ credsIssuerConfig), //
+ make_unique>>(
+ Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique>>(
+ Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique>>(
+ Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique>>(
+ Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique(Id, credsIssuerConfig), //
+ make_unique(Id, "installed-chime-sounds", Attributes::InstalledChimeSounds::Id, credsIssuerConfig), //
+ make_unique