Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions: Add generic implementation for the actions cluster. #35568

Merged
merged 25 commits into from
Feb 26, 2025

Conversation

jadhavrohit924
Copy link
Contributor

Problem:

  • Generic implementation was missing for the actions cluster.
  • External platforms are broken because it expects cluster related stuff to be handled in the SDK and not by the application.

Changes:

  • Added generic implementation for actions cluster.
  • zap regenerated.
  • Platform changes and delegate implementation.

Testing:

  • Tested all-clusters-app with esp32.

Copy link

semanticdiff-com bot commented Sep 13, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  src/app/zap_cluster_list.json  67% smaller
  examples/all-clusters-app/all-clusters-common/all-clusters-app.matter Unsupported file format
  examples/all-clusters-app/all-clusters-common/all-clusters-app.zap Unsupported file format
  examples/all-clusters-app/all-clusters-common/include/bridged-actions-stub.h Unsupported file format
  examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp Unsupported file format
  examples/all-clusters-app/esp32/main/main.cpp Unsupported file format
  examples/all-clusters-app/linux/main-common.cpp Unsupported file format
  examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults Unsupported file format
  examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults Unsupported file format
  examples/bridge-app/asr/BUILD.gn Unsupported file format
  examples/bridge-app/asr/src/bridged-actions-stub.cpp Unsupported file format
  examples/bridge-app/asr/subdevice/SubDeviceManager.cpp Unsupported file format
  examples/bridge-app/esp32/main/main.cpp Unsupported file format
  examples/bridge-app/linux/bridged-actions-stub.cpp Unsupported file format
  examples/bridge-app/telink/CMakeLists.txt Unsupported file format
  examples/bridge-app/telink/src/AppTask.cpp Unsupported file format
  examples/bridge-app/telink/src/DeviceCallbacks.cpp Unsupported file format
  examples/placeholder/linux/apps/app1/BUILD.gn Unsupported file format
  examples/placeholder/linux/apps/app2/BUILD.gn Unsupported file format
  examples/placeholder/linux/src/bridged-actions-stub.cpp Unsupported file format
  src/app/clusters/actions-server/actions-server.cpp Unsupported file format
  src/app/clusters/actions-server/actions-server.h Unsupported file format
  src/app/common/templates/config-data.yaml  0% smaller
  src/app/tests/BUILD.gn Unsupported file format
  src/app/tests/TestActionsCluster.cpp Unsupported file format
  src/app/util/mock/include/zap-generated/gen_config.h Unsupported file format
  zzz_generated/app-common/app-common/zap-generated/callback.h Unsupported file format

jadhavrohit924 and others added 23 commits February 26, 2025 12:29
…of MatterActionsPluginServerInitCallback in example
…dify* to a notification as suggested in the code review.
Copy link

github-actions bot commented Feb 26, 2025

PR #35568: Size comparison from 392909e to 2e3eb2c

Full report (18 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, qpg, stm32)
platform target config section 392909e6 2e3eb2c change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1096628 1096628 0 0.0
RAM 94842 94842 0 0.0
bl702 lighting-app bl702+eth FLASH 651606 651606 0 0.0
RAM 33509 33509 0 0.0
bl702+wifi FLASH 828878 828878 0 0.0
RAM 22233 22233 0 0.0
bl706+mfd+rpc+littlefs FLASH 1061274 1061274 0 0.0
RAM 32157 32157 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892118 892118 0 0.0
RAM 26896 26896 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 975014 975014 0 0.0
RAM 24644 24644 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 815300 815300 0 0.0
RAM 120256 120256 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824220 824220 0 0.0
RAM 125352 125352 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771080 771080 0 0.0
RAM 113724 113724 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755364 755364 0 0.0
RAM 113932 113932 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538842 538842 0 0.0
RAM 205112 205112 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572998 572998 0 0.0
RAM 205360 205360 0 0.0
efr32 lock-app BRD4187C FLASH 939536 939536 0 0.0
RAM 159920 159920 0 0.0
BRD4338a FLASH 732536 732536 0 0.0
RAM 234828 234828 0 0.0
window-app BRD4187C FLASH 1032000 1032000 0 0.0
RAM 128024 128024 0 0.0
qpg lighting-app qpg6105+debug FLASH 662188 662188 0 0.0
RAM 105116 105116 0 0.0
lock-app qpg6105+debug FLASH 620304 620304 0 0.0
RAM 99664 99664 0 0.0
stm32 light STM32WB5MM-DK FLASH 459832 459832 0 0.0
RAM 141472 141472 0 0.0

Copy link

github-actions bot commented Feb 26, 2025

PR #35568: Size comparison from 5e10345 to 9ec4acf

Increases above 0.2%:

platform target config section 5e10345 9ec4acf change % change
esp32 all-clusters-app c3devkit DRAM 98112 98656 544 0.6
FLASH 1584330 1588944 4614 0.3
m5stack DRAM 116900 117436 536 0.5
FLASH 1551754 1556006 4252 0.3
linux all-clusters-app debug FLASH 5921536 5961772 40236 0.7
RAM 513712 514832 1120 0.2
all-clusters-minimal-app debug FLASH 5266570 5296484 29914 0.6
bridge-app debug FLASH 4625212 4648832 23620 0.5
shell debug FLASH 2949196 2978956 29760 1.0
RAM 143672 144344 672 0.5
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907708 911752 4044 0.4
RAM 142323 142859 536 0.4
nrf7002dk_nrf5340_cpuapp RAM 124663 125195 532 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846312 850284 3972 0.5
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646188 1653132 6944 0.4
RAM 211472 212008 536 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552956 1559828 6872 0.4
telink bridge-app tl7218x FLASH 665034 669192 4158 0.6
tizen all-clusters-app arm FLASH 1751016 1766128 15112 0.9
RAM 93260 93844 584 0.6
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 5e10345 9ec4acf change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1096628 1096628 0 0.0
RAM 94842 94842 0 0.0
bl702 lighting-app bl702+eth FLASH 651606 651606 0 0.0
RAM 33509 33509 0 0.0
bl702+wifi FLASH 828878 828878 0 0.0
RAM 22233 22233 0 0.0
bl706+mfd+rpc+littlefs FLASH 1061274 1061274 0 0.0
RAM 32157 32157 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892118 892118 0 0.0
RAM 26896 26896 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 975014 975014 0 0.0
RAM 24644 24644 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 815300 815300 0 0.0
RAM 120256 120256 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824220 824220 0 0.0
RAM 125352 125352 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771080 771080 0 0.0
RAM 113724 113724 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755364 755364 0 0.0
RAM 113932 113932 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538842 538842 0 0.0
RAM 205112 205112 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572998 572998 0 0.0
RAM 205360 205360 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 656429 656429 0 0.0
RAM 75324 75324 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 676289 676289 0 0.0
RAM 77964 77964 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 676289 676289 0 0.0
RAM 77964 77964 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 633213 633213 0 0.0
RAM 70392 70392 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616293 616293 0 0.0
RAM 71532 71532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635929 635929 0 0.0
RAM 74076 74076 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635929 635929 0 0.0
RAM 74076 74076 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635789 635789 0 0.0
RAM 74540 74540 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655513 655513 0 0.0
RAM 77084 77084 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655513 655513 0 0.0
RAM 77084 77084 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612137 612137 0 0.0
RAM 68628 68628 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631997 631997 0 0.0
RAM 71268 71268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631997 631997 0 0.0
RAM 71268 71268 0 0.0
efr32 lock-app BRD4187C FLASH 939536 939536 0 0.0
RAM 159920 159920 0 0.0
BRD4338a FLASH 732536 732536 0 0.0
RAM 234828 234828 0 0.0
window-app BRD4187C FLASH 1032000 1032000 0 0.0
RAM 128024 128024 0 0.0
esp32 all-clusters-app c3devkit DRAM 98112 98656 544 0.6
FLASH 1584330 1588944 4614 0.3
IRAM 83820 83820 0 0.0
m5stack DRAM 116900 117436 536 0.5
FLASH 1551754 1556006 4252 0.3
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4728 4728 0 0.0
FLASH 2650031 2650031 0 0.0
RAM 111088 111088 0 0.0
all-clusters-app debug unknown 5536 5536 0 0.0
FLASH 5921536 5961772 40236 0.7
RAM 513712 514832 1120 0.2
all-clusters-minimal-app debug unknown 5432 5432 0 0.0
FLASH 5266570 5296484 29914 0.6
RAM 221112 221272 160 0.1
bridge-app debug unknown 5448 5448 0 0.0
FLASH 4625212 4648832 23620 0.5
RAM 199816 200144 328 0.2
camera-app debug unknown 5432 5432 0 0.0
FLASH 4671992 4671992 0 0.0
RAM 194592 194592 0 0.0
chip-tool debug unknown 6096 6096 0 0.0
FLASH 13302487 13302487 0 0.0
RAM 603392 603392 0 0.0
chip-tool-ipv6only arm64 unknown 21976 21976 0 0.0
FLASH 11495528 11495528 0 0.0
RAM 656112 656112 0 0.0
fabric-admin debug unknown 5784 5784 0 0.0
FLASH 11567249 11567249 0 0.0
RAM 603176 603176 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4452430 4452430 0 0.0
RAM 187016 187016 0 0.0
fabric-sync debug unknown 4952 4952 0 0.0
FLASH 5569381 5569381 0 0.0
RAM 470400 470400 0 0.0
lighting-app debug+rpc+ui unknown 6160 6160 0 0.0
FLASH 5515665 5515665 0 0.0
RAM 203952 203952 0 0.0
lock-app debug unknown 5400 5400 0 0.0
FLASH 4688680 4688680 0 0.0
RAM 191144 191144 0 0.0
ota-provider-app debug unknown 4736 4736 0 0.0
FLASH 4310860 4310860 0 0.0
RAM 179832 179832 0 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4440986 4440986 0 0.0
RAM 184320 184320 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 2949196 2978956 29760 1.0
RAM 143672 144344 672 0.5
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4138536 4138536 0 0.0
RAM 229016 229016 0 0.0
tv-app debug unknown 5728 5728 0 0.0
FLASH 5908261 5908261 0 0.0
RAM 593832 593832 0 0.0
tv-casting-app debug unknown 5304 5304 0 0.0
FLASH 11472973 11472973 0 0.0
RAM 718656 718656 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907708 911752 4044 0.4
RAM 142323 142859 536 0.4
nrf7002dk_nrf5340_cpuapp FLASH 901788 902528 740 0.1
RAM 124663 125195 532 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846312 850284 3972 0.5
RAM 141251 141271 20 0.0
nxp contact k32w0+release FLASH 585256 585256 0 0.0
RAM 70876 70876 0 0.0
mcxw71+release FLASH 600712 600712 0 0.0
RAM 63096 63096 0 0.0
light k32w0+release FLASH 611196 611196 0 0.0
RAM 70164 70164 0 0.0
k32w1+release FLASH 685680 685680 0 0.0
RAM 48584 48584 0 0.0
lock mcxw71+release FLASH 749536 749536 0 0.0
RAM 67500 67500 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646188 1653132 6944 0.4
RAM 211472 212008 536 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552956 1559828 6872 0.4
RAM 208288 208304 16 0.0
light cy8ckit_062s2_43012 FLASH 1438644 1438644 0 0.0
RAM 197040 197040 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467516 1467516 0 0.0
RAM 224704 224704 0 0.0
qpg lighting-app qpg6105+debug FLASH 662188 662188 0 0.0
RAM 105116 105116 0 0.0
lock-app qpg6105+debug FLASH 620304 620304 0 0.0
RAM 99664 99664 0 0.0
stm32 light STM32WB5MM-DK FLASH 459832 459832 0 0.0
RAM 141472 141472 0 0.0
telink bridge-app tl7218x FLASH 665034 669192 4158 0.6
RAM 90728 90752 24 0.0
contact-sensor-app tlsr9528a_retention FLASH 622078 622078 0 0.0
RAM 31488 31488 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 745218 745218 0 0.0
RAM 40396 40396 0 0.0
tl7218x FLASH 753780 753780 0 0.0
RAM 97540 97540 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680850 680850 0 0.0
RAM 52192 52192 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709412 709412 0 0.0
RAM 73400 73400 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 600592 600592 0 0.0
RAM 138812 138812 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 788820 788820 0 0.0
RAM 96388 96388 0 0.0
tizen all-clusters-app arm unknown 5104 5116 12 0.2
FLASH 1751016 1766128 15112 0.9
RAM 93260 93844 584 0.6
chip-tool-ubsan arm unknown 11492 11492 0 0.0
FLASH 18983950 18983950 0 0.0
RAM 8306328 8306328 0 0.0

@mergify mergify bot merged commit 88e9921 into project-chip:master Feb 26, 2025
70 checks passed
gmarcosb pushed a commit to gmarcosb/connectedhomeip that referenced this pull request Mar 4, 2025
…-chip#35568)

* Regenerate zap for actions cluster

* Add generic implementation for action cluster

* Example changes

* Add documentation and fix pipeline

* Some example changes

* Add comment about scope of name

* Restyled by clang-format

* Add generic struct to copy the ActionStruct and EndpointListStruct along with name buffer and added events

* Address review comments

* Fix CI and apps should use emberAfActionsClusterInitCallback instead of MatterActionsPluginServerInitCallback in example

* Try to fix CI

* Address review changes

* Change implementation to accomodate actions server on multiple endpoints.

* Restructured the storage structs, command handler and removed vector usage.

* Add unit tests for the actions cluster.

* Add API to mark dirty attribute and changed delegate impl.

* Addressed review changes.

* Update the docs, changed API name as suggested, and fix CI for esp32

* Removed the notify delegates API on existing ActionList, EndpointList change.

* Fix API signature in linux/bridge-app.

* Removed public MatterContext APIs, added todo to remove global delegates array.

* Address some minor comments from code review.

* Address review comments.

* Update API docs, command handling to return InvalidCommand, update Modify* to a notification as suggested in the code review.

* Fix clang-tidy validation

---------

Co-authored-by: Restyled.io <commits@restyled.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants