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

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

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 Unsupported file format
  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

Copy link

github-actions bot commented Jan 29, 2025

PR #35568: Size comparison from 6e8676b to 2612675

Increases above 0.2%:

platform target config section 6e8676b 2612675 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907060 910156 3096 0.3
RAM 142395 142939 544 0.4
nrf7002dk_nrf5340_cpuapp RAM 124739 125279 540 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845788 848808 3020 0.4
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1651732 5472 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1558436 5400 0.3
telink bridge-app tlsr9258a FLASH 681324 684452 3128 0.5
Full report (42 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, psoc6, qpg, stm32, telink)
platform target config section 6e8676b 2612675 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093546 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650158 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828066 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056626 1056626 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888060 888060 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971046 971046 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837968 837968 0 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823388 823388 0 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770612 770612 0 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754856 754856 0 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538413 538413 0 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572277 572277 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679377 679377 0 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699229 699229 0 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699229 699229 0 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656157 656157 0 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615761 615761 0 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635389 635389 0 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635389 635389 0 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635233 635233 0 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654941 654941 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654941 654941 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611677 611677 0 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631537 631537 0 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631537 631537 0 0.0
RAM 71252 71252 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907060 910156 3096 0.3
RAM 142395 142939 544 0.4
nrf7002dk_nrf5340_cpuapp FLASH 901600 902292 692 0.1
RAM 124739 125279 540 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845788 848808 3020 0.4
RAM 141323 141351 28 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1651732 5472 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1558436 5400 0.3
RAM 208376 208400 24 0.0
light cy8ckit_062s2_43012 FLASH 1468716 1468716 0 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466748 1466748 0 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661952 661952 0 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619756 619756 0 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482568 482568 0 0.0
RAM 144672 144672 0 0.0
telink bridge-app tlsr9258a FLASH 681324 684452 3128 0.5
RAM 91084 91116 32 0.0
contact-sensor-app tlsr9528a_retention FLASH 621354 621354 0 0.0
RAM 31484 31484 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 770194 770194 0 0.0
RAM 49344 49344 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 774624 774624 0 0.0
RAM 99648 99648 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708528 708528 0 0.0
RAM 73376 73376 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625626 625626 0 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813006 813006 0 0.0
RAM 99560 99560 0 0.0

Copy link

github-actions bot commented Jan 29, 2025

PR #35568: Size comparison from 6e8676b to bef53be

Increases above 0.2%:

platform target config section 6e8676b bef53be change % change
esp32 all-clusters-app c3devkit DRAM 97296 97848 552 0.6
m5stack DRAM 116092 116636 544 0.5
linux all-clusters-app debug FLASH 5973890 6009588 35698 0.6
RAM 531616 532848 1232 0.2
all-clusters-minimal-app debug FLASH 5322576 5347608 25032 0.5
bridge-app debug FLASH 4680764 4699612 18848 0.4
shell debug FLASH 3003981 3028829 24848 0.8
RAM 160504 161272 768 0.5
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907060 910156 3096 0.3
RAM 142395 142939 544 0.4
nrf7002dk_nrf5340_cpuapp RAM 124739 125279 540 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845788 848808 3020 0.4
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1651732 5472 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1558436 5400 0.3
telink bridge-app tlsr9258a FLASH 681324 684452 3128 0.5
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink)
platform target config section 6e8676b bef53be change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093546 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650158 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828066 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056626 1056626 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888060 888060 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971046 971046 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837968 837968 0 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823388 823388 0 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770612 770612 0 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754856 754856 0 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538413 538413 0 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572277 572277 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679377 679377 0 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699229 699229 0 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699229 699229 0 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656157 656157 0 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615761 615761 0 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635389 635389 0 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635389 635389 0 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635233 635233 0 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654941 654941 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654941 654941 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611677 611677 0 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631537 631537 0 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631537 631537 0 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936200 936200 0 0.0
RAM 159904 159904 0 0.0
BRD4338a FLASH 729788 729780 -8 -0.0
RAM 234764 234764 0 0.0
window-app BRD4187C FLASH 1029128 1029120 -8 -0.0
RAM 128040 128040 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97848 552 0.6
FLASH 1576990 1580572 3582 0.2
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116636 544 0.5
FLASH 1544926 1548238 3312 0.2
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2707835 2707835 0 0.0
RAM 132800 132800 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5973890 6009588 35698 0.6
RAM 531616 532848 1232 0.2
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5322576 5347608 25032 0.5
RAM 242728 242968 240 0.1
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4680764 4699612 18848 0.4
RAM 221464 221872 408 0.2
chip-tool debug unknown 5984 5984 0 0.0
FLASH 13041802 13041802 0 0.0
RAM 596178 596178 0 0.0
chip-tool-ipv6only arm64 unknown 21776 21776 0 0.0
FLASH 11118672 11118672 0 0.0
RAM 647920 647920 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11387883 11387883 0 0.0
RAM 596522 596522 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4505362 4505362 0 0.0
RAM 208648 208648 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5611605 5611605 0 0.0
RAM 483520 483520 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5623521 5623521 0 0.0
RAM 231744 231744 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4729814 4729814 0 0.0
RAM 207712 207712 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4358390 4358390 0 0.0
RAM 201352 201352 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4495894 4495894 0 0.0
RAM 205936 205936 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3003981 3028829 24848 0.8
RAM 160504 161272 768 0.5
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4097984 4097984 0 0.0
RAM 246136 246136 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5951237 5951237 0 0.0
RAM 606920 606920 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11268605 11268605 0 0.0
RAM 710864 710864 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907060 910156 3096 0.3
RAM 142395 142939 544 0.4
nrf7002dk_nrf5340_cpuapp FLASH 901600 902292 692 0.1
RAM 124739 125279 540 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845788 848808 3020 0.4
RAM 141323 141351 28 0.0
nxp contact k32w0+release FLASH 584256 584256 0 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599600 599600 0 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610684 610684 0 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685160 685160 0 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748632 748632 0 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1651732 5472 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1558436 5400 0.3
RAM 208376 208400 24 0.0
light cy8ckit_062s2_43012 FLASH 1468716 1468716 0 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466748 1466748 0 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661952 661952 0 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619756 619756 0 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482568 482568 0 0.0
RAM 144672 144672 0 0.0
telink bridge-app tlsr9258a FLASH 681324 684452 3128 0.5
RAM 91084 91116 32 0.0
contact-sensor-app tlsr9528a_retention FLASH 621354 621354 0 0.0
RAM 31484 31484 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 770194 770194 0 0.0
RAM 49344 49344 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 774624 774624 0 0.0
RAM 99648 99648 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708528 708528 0 0.0
RAM 73376 73376 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625626 625626 0 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813006 813006 0 0.0
RAM 99560 99560 0 0.0

examples/bridge-app/linux/bridged-actions-stub.cpp Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.h Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.h Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.h Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.h Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.cpp Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.cpp Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.cpp Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.cpp Outdated Show resolved Hide resolved
src/app/clusters/actions-server/actions-server.cpp Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Feb 3, 2025

PR #35568: Size comparison from dd0ce89 to 0a99a10

Increases above 0.2%:

platform target config section dd0ce89 0a99a10 change % change
esp32 all-clusters-app c3devkit DRAM 97296 97848 552 0.6
FLASH 1577062 1580588 3526 0.2
m5stack DRAM 116092 116636 544 0.5
FLASH 1544978 1548226 3248 0.2
linux all-clusters-app debug FLASH 5974968 6010250 35282 0.6
RAM 531632 532800 1168 0.2
all-clusters-minimal-app debug FLASH 5323654 5348662 25008 0.5
bridge-app debug FLASH 4681842 4700666 18824 0.4
shell debug FLASH 3004877 3029693 24816 0.8
RAM 160504 161240 736 0.5
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906992 910016 3024 0.3
RAM 142395 142935 540 0.4
nrf7002dk_nrf5340_cpuapp RAM 124739 125275 536 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845716 848668 2952 0.3
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646356 1651876 5520 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553148 1558580 5432 0.3
telink bridge-app tl7218x FLASH 664774 667842 3068 0.5
tizen all-clusters-app arm unknown 5116 5132 16 0.3
FLASH 1751916 1764848 12932 0.7
RAM 93524 94136 612 0.7
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section dd0ce89 0a99a10 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093546 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650158 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828066 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056626 1056626 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888060 888060 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971046 971046 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838032 838032 0 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823436 823436 0 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770676 770676 0 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754920 754920 0 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538461 538461 0 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572325 572325 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679433 679433 0 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699285 699285 0 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699285 699285 0 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656213 656213 0 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615817 615817 0 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635445 635445 0 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635445 635445 0 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635289 635289 0 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654997 654997 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654997 654997 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611725 611725 0 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631585 631585 0 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631585 631585 0 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936232 936232 0 0.0
RAM 159872 159872 0 0.0
BRD4338a FLASH 729884 729876 -8 -0.0
RAM 234700 234700 0 0.0
window-app BRD4187C FLASH 1029256 1029248 -8 -0.0
RAM 127976 127976 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97848 552 0.6
FLASH 1577062 1580588 3526 0.2
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116636 544 0.5
FLASH 1544978 1548226 3248 0.2
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2708945 2708945 0 0.0
RAM 132816 132816 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5974968 6010250 35282 0.6
RAM 531632 532800 1168 0.2
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5323654 5348662 25008 0.5
RAM 242744 242952 208 0.1
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4681842 4700666 18824 0.4
RAM 221480 221856 376 0.2
chip-tool debug unknown 6120 6120 0 0.0
FLASH 13098730 13098730 0 0.0
RAM 596770 596770 0 0.0
chip-tool-ipv6only arm64 unknown 21848 21848 0 0.0
FLASH 11164208 11164208 0 0.0
RAM 648496 648496 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11388203 11388203 0 0.0
RAM 596554 596554 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4506440 4506440 0 0.0
RAM 208664 208664 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5612821 5612821 0 0.0
RAM 483536 483536 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5624593 5624593 0 0.0
RAM 231760 231760 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4730956 4730956 0 0.0
RAM 207728 207728 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4359500 4359500 0 0.0
RAM 201368 201368 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4496972 4496972 0 0.0
RAM 205952 205952 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3004877 3029693 24816 0.8
RAM 160504 161240 736 0.5
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4098768 4098768 0 0.0
RAM 246144 246144 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5952421 5952421 0 0.0
RAM 606936 606936 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11272333 11272333 0 0.0
RAM 710896 710896 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906992 910016 3024 0.3
RAM 142395 142935 540 0.4
nrf7002dk_nrf5340_cpuapp FLASH 901532 902208 676 0.1
RAM 124739 125275 536 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845716 848668 2952 0.3
RAM 141323 141347 24 0.0
nxp contact k32w0+release FLASH 584304 584304 0 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599664 599664 0 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610748 610748 0 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685208 685208 0 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748680 748680 0 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646356 1651876 5520 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553148 1558580 5432 0.3
RAM 208376 208400 24 0.0
light cy8ckit_062s2_43012 FLASH 1468828 1468828 0 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466860 1466860 0 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 662016 662016 0 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619804 619804 0 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482624 482624 0 0.0
RAM 144672 144672 0 0.0
telink bridge-app tl7218x FLASH 664774 667842 3068 0.5
RAM 90812 90832 20 0.0
contact-sensor-app tlsr9528a_retention FLASH 621532 621532 0 0.0
RAM 31484 31484 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 770284 770284 0 0.0
RAM 43552 43552 0 0.0
tl7218x FLASH 778816 778816 0 0.0
RAM 98688 98688 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680150 680150 0 0.0
RAM 52176 52176 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708704 708704 0 0.0
RAM 73384 73384 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625618 625618 0 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813000 813000 0 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5132 16 0.3
FLASH 1751916 1764848 12932 0.7
RAM 93524 94136 612 0.7
chip-tool-ubsan arm unknown 11408 11408 0 0.0
FLASH 18698198 18698198 0 0.0
RAM 8183840 8183840 0 0.0

Comment on lines +40 to +45
Delegate * gDelegateTable[kActionsDelegateTableSize] = { nullptr };

Delegate * GetDelegate(EndpointId aEndpoint)
{
return (aEndpoint >= kActionsDelegateTableSize ? nullptr : gDelegateTable[aEndpoint]);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bad pattern to continue. We need to have a better state keeping pattern than constantly using global static arrays.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right solutions in general seem to be:

  1. One cluster instance per endpoint as opposed to having a singleton that handles all endpoint, or
  2. Some way that the cluster instance maps endpoints to delegates that can be configured sanely at compile time if we want to support size caps on it, or that just does dynamic memory (e.g. std::map) if that's OK for the cluster in question.

I suspect in most cases item 1 is a better idea....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even with item 1, we would need to map endpoints with the delegates in the server implementations?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With item 1 each cluster instance is a separate object which just has a pointer to its delegate; there is nothing to "map".

Copy link

github-actions bot commented Feb 4, 2025

PR #35568: Size comparison from dd0ce89 to 717440f

Increases above 0.2%:

platform target config section dd0ce89 717440f change % change
esp32 all-clusters-app c3devkit DRAM 97296 97848 552 0.6
m5stack DRAM 116092 116636 544 0.5
linux all-clusters-app debug FLASH 5974968 6010250 35282 0.6
RAM 531632 532800 1168 0.2
all-clusters-minimal-app debug FLASH 5323654 5348662 25008 0.5
bridge-app debug FLASH 4681842 4700698 18856 0.4
shell debug FLASH 3004877 3029693 24816 0.8
RAM 160504 161240 736 0.5
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906992 910012 3020 0.3
RAM 142395 142935 540 0.4
nrf7002dk_nrf5340_cpuapp RAM 124739 125275 536 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845716 848664 2948 0.3
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646356 1651876 5520 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553148 1558580 5432 0.3
telink bridge-app tl7218x FLASH 664774 667840 3066 0.5
tizen all-clusters-app arm unknown 5116 5132 16 0.3
FLASH 1751916 1764840 12924 0.7
RAM 93524 94136 612 0.7
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section dd0ce89 717440f change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093542 -4 -0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650154 -4 -0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828062 -4 -0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056626 1056622 -4 -0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888060 888056 -4 -0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971046 971042 -4 -0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838032 838032 0 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823436 823436 0 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770676 770676 0 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754920 754920 0 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538461 538461 0 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572325 572317 -8 -0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679433 679433 0 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699285 699277 -8 -0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699285 699277 -8 -0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656213 656213 0 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615817 615809 -8 -0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635445 635437 -8 -0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635445 635437 -8 -0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635289 635289 0 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654997 654997 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654997 654997 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611725 611725 0 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631585 631585 0 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631585 631585 0 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936232 936232 0 0.0
RAM 159872 159872 0 0.0
BRD4338a FLASH 729884 729876 -8 -0.0
RAM 234700 234700 0 0.0
window-app BRD4187C FLASH 1029256 1029248 -8 -0.0
RAM 127976 127976 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97848 552 0.6
FLASH 1577062 1580586 3524 0.2
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116636 544 0.5
FLASH 1544978 1548230 3252 0.2
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2708945 2708945 0 0.0
RAM 132816 132816 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5974968 6010250 35282 0.6
RAM 531632 532800 1168 0.2
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5323654 5348662 25008 0.5
RAM 242744 242952 208 0.1
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4681842 4700698 18856 0.4
RAM 221480 221856 376 0.2
chip-tool debug unknown 6120 6120 0 0.0
FLASH 13098730 13098730 0 0.0
RAM 596770 596770 0 0.0
chip-tool-ipv6only arm64 unknown 21848 21848 0 0.0
FLASH 11164208 11164224 16 0.0
RAM 648496 648496 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11388203 11388203 0 0.0
RAM 596554 596554 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4506440 4506440 0 0.0
RAM 208664 208664 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5612821 5612821 0 0.0
RAM 483536 483536 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5624593 5624593 0 0.0
RAM 231760 231760 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4730956 4730956 0 0.0
RAM 207728 207728 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4359500 4359500 0 0.0
RAM 201368 201368 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4496972 4496972 0 0.0
RAM 205952 205952 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3004877 3029693 24816 0.8
RAM 160504 161240 736 0.5
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4098768 4098784 16 0.0
RAM 246144 246144 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5952421 5952421 0 0.0
RAM 606936 606936 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11272333 11272333 0 0.0
RAM 710896 710896 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906992 910012 3020 0.3
RAM 142395 142935 540 0.4
nrf7002dk_nrf5340_cpuapp FLASH 901532 902208 676 0.1
RAM 124739 125275 536 0.4
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845716 848664 2948 0.3
RAM 141323 141347 24 0.0
nxp contact k32w0+release FLASH 584304 584304 0 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599664 599664 0 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610748 610748 0 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685208 685208 0 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748680 748680 0 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646356 1651876 5520 0.3
RAM 211560 212104 544 0.3
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553148 1558580 5432 0.3
RAM 208376 208400 24 0.0
light cy8ckit_062s2_43012 FLASH 1468828 1468828 0 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466860 1466860 0 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 662016 662016 0 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619804 619796 -8 -0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482624 482624 0 0.0
RAM 144672 144672 0 0.0
telink bridge-app tl7218x FLASH 664774 667840 3066 0.5
RAM 90812 90832 20 0.0
contact-sensor-app tlsr9528a_retention FLASH 621532 621530 -2 -0.0
RAM 31484 31484 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 770284 770282 -2 -0.0
RAM 43552 43552 0 0.0
tl7218x FLASH 778816 778814 -2 -0.0
RAM 98688 98688 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680150 680148 -2 -0.0
RAM 52176 52176 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708704 708702 -2 -0.0
RAM 73384 73384 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625618 625616 -2 -0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813000 812998 -2 -0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5132 16 0.3
FLASH 1751916 1764840 12924 0.7
RAM 93524 94136 612 0.7
chip-tool-ubsan arm unknown 11408 11408 0 0.0
FLASH 18698198 18698190 -8 -0.0
RAM 8183840 8183840 0 0.0

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