diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 6d65f102b01e54..4814e7bc04dbdb 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2999,11 +2999,86 @@ server cluster WindowCovering = 258 { endpoint 0 { + instantiate cluster AccessControl; + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSourceConfiguration; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BooleanState; + instantiate cluster BridgedActions; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster ElectricalMeasurement; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster Groups; + instantiate cluster IasZone; + instantiate cluster Identify; + instantiate cluster IlluminanceMeasurement; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster ModeSelect; + instantiate cluster NetworkCommissioning; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; + instantiate cluster PowerSource; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster ThermostatUserInterfaceConfiguration; + instantiate cluster UserLabel; + instantiate cluster WakeOnLan; + instantiate cluster WindowCovering; } endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster Groups; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 72cca6fb8b43ce..53348e5d62f835 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -895,8 +895,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FixedLabel; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Switch; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index 54a14fed6332a2..d137693236d139 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -1103,8 +1103,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster PowerSource; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 461a111a27d381..51fed51a17869b 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1381,11 +1381,37 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster Switch; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster ColorControl; + instantiate cluster Descriptor; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; } endpoint 2 { + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 61a02536946a64..beb8de0a6679a1 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -799,8 +799,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster OnOff; + instantiate cluster PowerSource; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 2ff85bdc39da00..e3ee6a58863a98 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -312,5 +312,10 @@ server cluster OperationalCredentials = 62 { endpoint 0 { + instantiate cluster DiagnosticLogs; + instantiate cluster DiagnosticLogs; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; } diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 6dfbaa9bc6520e..e09ed393b072f5 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -356,5 +356,12 @@ server cluster UserLabel = 65 { endpoint 0 { + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster UserLabel; } diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 75059fb5f29a1e..0766042f5b83fb 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -467,5 +467,14 @@ server cluster UserLabel = 65 { endpoint 0 { + instantiate cluster Basic; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster UserLabel; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index c41fee332c6dca..2d47e74b46e946 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -710,8 +710,22 @@ server cluster TemperatureMeasurement = 1026 { endpoint 0 { + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; } endpoint 1 { + instantiate cluster Basic; + instantiate cluster ColorControl; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Scenes; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index c41fee332c6dca..2d47e74b46e946 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -710,8 +710,22 @@ server cluster TemperatureMeasurement = 1026 { endpoint 0 { + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; } endpoint 1 { + instantiate cluster Basic; + instantiate cluster ColorControl; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Scenes; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index fe7a71b3c83ec1..36ffee5ef6b96a 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -895,8 +895,31 @@ server cluster UserLabel = 65 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FlowMeasurement; + instantiate cluster FlowMeasurement; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; } diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 487d37b67de362..4cb2a32f5458f2 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -944,8 +944,30 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FlowMeasurement; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster TemperatureMeasurement; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index fd6cf4bd1894ce..089ceac43d49eb 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -598,8 +598,24 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster TemperatureMeasurement; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 03e8d4678679fe..3698f8ea617aa3 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1172,8 +1172,33 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Identify; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Basic; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster Identify; + instantiate cluster Scenes; + instantiate cluster Thermostat; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 922d24260d8f23..dcd7680a42a88e 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1783,20 +1783,67 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster OperationalCredentials; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster ApplicationLauncher; + instantiate cluster Channel; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster KeypadInput; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster OnOff; + instantiate cluster TargetNavigator; + instantiate cluster WakeOnLan; } endpoint 2 { + instantiate cluster AudioOutput; + instantiate cluster Descriptor; + instantiate cluster LevelControl; + instantiate cluster OnOff; } endpoint 3 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster MediaPlayback; } endpoint 4 { + instantiate cluster ApplicationBasic; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; } endpoint 5 { + instantiate cluster ApplicationBasic; + instantiate cluster Descriptor; } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 09849ef9e8a3bf..0a05c4a5cb976d 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2459,11 +2459,66 @@ server cluster WindowCovering = 258 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster Groups; + instantiate cluster IasZone; + instantiate cluster Identify; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster WakeOnLan; + instantiate cluster WindowCovering; } endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 03e7017883cf34..c24cfbc31c2a4d 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -837,11 +837,31 @@ server cluster WindowCovering = 258 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster Identify; + instantiate cluster WindowCovering; } endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster WindowCovering; } diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index 5199808eeba921..ecafa3eb7c3eee 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -87,12 +87,39 @@ function loadStructs(packageId) .then(structs => Promise.all(structs.map(struct => loadStructItems.call(this, struct, packageId)))); } -function loadClusters() +/** + * Loads endpoint data, specifically what endpoints are available and what clusters + * are defined within those endpoints. + */ +async function loadEndpoints() { + let result = []; + const { db, sessionId } = this.global; - return queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes)) - .then(clusters => clusters.filter(cluster => cluster.enabled == 1)); + + const endpoints = await queryEndpoint.selectAllEndpoints(db, sessionId); + + // Selection is one by one since existing API does not seem to provide + // linkage between cluster and what endpoint it belongs to. + // + // TODO: there should be a better way + for (const endpoint of endpoints) { + const endpointClusters + = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, [ { endpointTypeId : endpoint.endpointTypeRef } ]); + result.push({...endpoint, clusters : endpointClusters.filter(c => c.enabled == 1) }); + } + + return result; +} + +async function loadClusters() +{ + const { db, sessionId } = this.global; + + const endpointTypes = await queryEndpointType.selectEndpointTypeIds(db, sessionId); + const clusters = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes); + + return clusters.filter(cluster => cluster.enabled == 1); } function loadCommandResponse(command, packageId) @@ -594,6 +621,7 @@ Clusters.init = async function(context) { const promises = [ Promise.all(loadTypes), + loadEndpoints.call(context), loadClusters.call(context), loadCommands.call(context, packageId), loadAttributes.call(context, packageId), @@ -601,8 +629,9 @@ Clusters.init = async function(context) { loadEvents.call(context, packageId), ]; - let [types, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); + let [types, endpoints, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); + this._endpoints = endpoints; this._clusters = clusters; this._commands = enhancedCommands(commands, types); this._attributes = enhancedAttributes(attributes, globalAttributes, types); @@ -658,6 +687,11 @@ Clusters.getClusters = function() return this.ensureReady().then(() => this._clusters); } +Clusters.getEndPoints = function() +{ + return this.ensureReady().then(() => this._endpoints); +} + Clusters.getCommands = function() { return this.ensureReady().then(() => this._commands.filter(kResponseFilter.bind(null, false))); diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 1d6d49f9025f8b..1407583f775b14 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -79,9 +79,11 @@ {{/all_user_clusters}} -{{#user_endpoints}} +{{#chip_endpoints}} endpoint {{endpointId}} { - {{!TODO: report device types and cluster instantionation. }} + {{#chip_endpoint_clusters}} + instantiate cluster {{asUpperCamelCase name}}; + {{/chip_endpoint_clusters}} } -{{/user_endpoints}} +{{/chip_endpoints}} diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index dbc201a6a76110..c7f9ea859b6a02 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -420,6 +420,18 @@ async function chip_shared_structs(options) return templateUtil.collectBlocks(structs, options, this); } +async function chip_endpoints(options) +{ + const endpoints = await ensureClusters(this).getEndPoints(); + return templateUtil.collectBlocks(endpoints, options, this); +} + +async function chip_endpoint_clusters(options) +{ + const clusters = this.clusters; + return templateUtil.collectBlocks(clusters, options, this); +} + /** * Checks whether a type is an enum for purposes of its chipType. That includes * both spec-defined enum types and types that we map to enum types in our code. @@ -461,6 +473,8 @@ exports.chip_server_cluster_attributes = chip_server_clust exports.chip_server_cluster_events = chip_server_cluster_events; exports.chip_server_has_list_attributes = chip_server_has_list_attributes; exports.chip_available_cluster_commands = chip_available_cluster_commands; +exports.chip_endpoints = chip_endpoints; +exports.chip_endpoint_clusters = chip_endpoint_clusters; exports.if_chip_enum = if_chip_enum; exports.if_in_global_responses = if_in_global_responses; exports.chip_cluster_specific_structs = chip_cluster_specific_structs; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 02323171533ef5..4fed146169f4b1 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3316,5 +3316,66 @@ client cluster WindowCovering = 258 { endpoint 1 { + instantiate cluster AccessControl; + instantiate cluster AccountLogin; + instantiate cluster AdministratorCommissioning; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster Basic; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BooleanState; + instantiate cluster BridgedActions; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster DoorLock; + instantiate cluster ElectricalMeasurement; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster IlluminanceMeasurement; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster ModeSelect; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster SoftwareDiagnostics; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster ThermostatUserInterfaceConfiguration; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WakeOnLan; + instantiate cluster WiFiNetworkDiagnostics; + instantiate cluster WindowCovering; }