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

implement 'ReadAttribute' inside the codegen-data-model IM/DM split #33877

Merged
merged 139 commits into from
Jun 28, 2024

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Jun 12, 2024

This implements ReadAttribute to be compatible with existing ember-compatibility-functions and adds corresponding unit tests.

Given that we use AttributeValueEncoder, I removed the ReadState type and parameter from the reads (the encoder currently contains the state).

image

Implementation notes

This is intended as a drop-in replacement for ember-compatibility-functions.cpp (which would be removed once this is fully integrated and working). As a result, some of the logic is duplicated (e.g. FindAttributeMetadata logic) and simlar handling exists for error reporting for path expansion.

andreilitvin and others added 30 commits May 7, 2024 15:17
…s own state, so we should not duplicate things at this time
@pullapprove pullapprove bot requested a review from ReneJosefsen June 21, 2024 20:10
Copy link

github-actions bot commented Jun 21, 2024

PR #33877: Size comparison from c829a2c to ddc9460

Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section c829a2c ddc9460 change % change
bl602 lighting-app bl602 FLASH 1270550 1270550 0 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1284828 1284828 0 0.0
RAM 95480 95480 0 0.0
bl602+rpc FLASH 1309750 1309750 0 0.0
RAM 103760 103760 0 0.0
bl702 lighting-app bl702 FLASH 1091446 1091446 0 0.0
RAM 14897 14897 0 0.0
bl702+mfd FLASH 1102140 1102140 0 0.0
RAM 15049 15049 0 0.0
bl702+rpc FLASH 1181256 1181256 0 0.0
RAM 23925 23925 0 0.0
bl706-eth FLASH 874790 874790 0 0.0
RAM 27016 27016 0 0.0
bl706-wifi FLASH 1127090 1127090 0 0.0
RAM 14349 14349 0 0.0
bl702l lighting-app bl702l FLASH 1078332 1078332 0 0.0
RAM 21468 21468 0 0.0
bl702l+mfd FLASH 1089594 1089594 0 0.0
RAM 21628 21628 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798004 798004 0 0.0
RAM 103088 103088 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 813768 813768 0 0.0
RAM 113568 113568 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 803292 803292 0 0.0
RAM 107688 107688 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 756068 756068 0 0.0
RAM 101788 101788 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 741732 741732 0 0.0
RAM 102036 102036 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 605766 605766 0 0.0
RAM 204512 204512 0 0.0
lock CC3235SF_LAUNCHXL FLASH 650786 650786 0 0.0
RAM 204772 204772 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 665785 665785 0 0.0
RAM 75100 75100 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 685645 685645 0 0.0
RAM 77732 77732 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 685645 685645 0 0.0
RAM 77732 77732 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 642573 642573 0 0.0
RAM 70168 70168 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608345 608345 0 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 627973 627973 0 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 627973 627973 0 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 623833 623833 0 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 643541 643541 0 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 643541 643541 0 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 592397 592397 0 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 612249 612249 0 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 612249 612249 0 0.0
RAM 70420 70420 0 0.0
efr32 lighting-app BRD4187C FLASH 888136 888128 -8 -0.0
RAM 183424 183424 0 0.0
lock-app BRD4338a FLASH 699864 699864 0 0.0
RAM 242228 242228 0 0.0
window-app BRD4187C FLASH 969748 969748 0 0.0
RAM 167856 167856 0 0.0
esp32 all-clusters-app c3devkit DRAM 88324 88324 0 0.0
FLASH 1468846 1468846 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 114796 114796 0 0.0
FLASH 1537971 1537971 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4592 4592 0 0.0
FLASH 2528240 2528240 0 0.0
RAM 125072 125072 0 0.0
all-clusters-app debug unknown 5368 5368 0 0.0
FLASH 5577966 5577966 0 0.0
RAM 479304 479304 0 0.0
all-clusters-minimal-app debug unknown 5288 5288 0 0.0
FLASH 5050424 5050424 0 0.0
RAM 232856 232856 0 0.0
bridge-app debug unknown 5256 5256 0 0.0
FLASH 4476456 4476456 0 0.0
RAM 212768 212768 0 0.0
chip-tool debug unknown 5728 5728 0 0.0
FLASH 11548279 11548279 0 0.0
RAM 531386 531386 0 0.0
chip-tool-ipv6only arm64 unknown 19816 19816 0 0.0
FLASH 10680468 10680468 0 0.0
RAM 580120 580120 0 0.0
fabric-admin debug unknown 5584 5584 0 0.0
FLASH 10547175 10547175 0 0.0
RAM 525466 525466 0 0.0
fabric-bridge-app debug unknown 5264 5264 0 0.0
FLASH 4346984 4346984 0 0.0
RAM 204896 204896 0 0.0
lighting-app debug+rpc+ui unknown 5904 5904 0 0.0
FLASH 5372466 5372466 0 0.0
RAM 221672 221672 0 0.0
lock-app debug unknown 5192 5192 0 0.0
FLASH 4540056 4540056 0 0.0
RAM 200192 200192 0 0.0
ota-provider-app debug unknown 4576 4576 0 0.0
FLASH 4195816 4195816 0 0.0
RAM 194432 194432 0 0.0
ota-requestor-app debug unknown 4512 4512 0 0.0
FLASH 4321304 4321304 0 0.0
RAM 199088 199088 0 0.0
shell debug unknown 4112 4112 0 0.0
FLASH 2793693 2793693 0 0.0
RAM 150416 150416 0 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4167108 4167108 0 0.0
RAM 235784 235784 0 0.0
tv-app debug unknown 5472 5472 0 0.0
FLASH 5593704 5593704 0 0.0
RAM 341672 341672 0 0.0
tv-casting-app debug unknown 5096 5096 0 0.0
FLASH 9595958 9595958 0 0.0
RAM 348848 348848 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1502084 1502084 0 0.0
RAM 226672 226672 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 880800 880800 0 0.0
RAM 139693 139693 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 951612 951612 0 0.0
RAM 138121 138121 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 826356 826356 0 0.0
RAM 138591 138591 0 0.0
nxp contact k32w0+release FLASH 575620 575620 0 0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 590744 590744 0 0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 609696 609696 0 0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 674240 674240 0 0.0
RAM 82808 82808 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1613348 1613348 0 0.0
RAM 207132 207132 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1534116 1534116 0 0.0
RAM 204036 204036 0 0.0
light cy8ckit_062s2_43012 FLASH 1460996 1460996 0 0.0
RAM 197316 197316 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462860 1462860 0 0.0
RAM 224380 224380 0 0.0
qpg lighting-app qpg6105+debug FLASH 650608 650608 0 0.0
RAM 104556 104556 0 0.0
lock-app qpg6105+debug FLASH 610708 610708 0 0.0
RAM 99232 99232 0 0.0
stm32 light STM32WB5MM-DK FLASH 472048 472048 0 0.0
RAM 141652 141652 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 632146 632146 0 0.0
RAM 50528 50528 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 657038 657038 0 0.0
RAM 145872 145872 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 777102 777102 0 0.0
RAM 110684 110684 0 0.0
bridge-app tlsr9258a FLASH 675130 675130 0 0.0
RAM 95304 95304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 633730 633730 0 0.0
RAM 50572 50572 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 719508 719508 0 0.0
RAM 77148 77148 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612180 612180 0 0.0
RAM 142104 142104 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 799734 799734 0 0.0
RAM 100508 100508 0 0.0
lock-app-dfu tlsr9528a FLASH 665294 665294 0 0.0
RAM 69860 69860 0 0.0
ota-requestor-app tlsr9258a FLASH 694460 694460 0 0.0
RAM 95028 95028 0 0.0
pump-app tlsr9518adk80d FLASH 615994 615994 0 0.0
RAM 56952 56952 0 0.0
pump-controller-app tlsr9518adk80d FLASH 606378 606378 0 0.0
RAM 56752 56752 0 0.0
shell tlsr9518adk80d FLASH 466170 466170 0 0.0
RAM 72484 72484 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 640090 640090 0 0.0
RAM 52200 52200 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 650204 650204 0 0.0
RAM 60388 60388 0 0.0
thermostat tlsr9518adk80d FLASH 625268 625268 0 0.0
RAM 57084 57084 0 0.0
window-covering tlsr9118bdk40d FLASH 518726 518726 0 0.0
RAM 97800 97800 0 0.0
tizen all-clusters-app arm unknown 1560 1560 0 0.0
FLASH 1633100 1633100 0 0.0
RAM 46020 46020 0 0.0
chip-tool-ubsan arm unknown 2364 2364 0 0.0
FLASH 15882050 15882050 0 0.0
RAM 6972112 6972112 0 0.0

Copy link

github-actions bot commented Jun 28, 2024

PR #33877: Size comparison from beb2bed to c4e4aa7

Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section beb2bed c4e4aa7 change % change
bl602 lighting-app bl602 FLASH 1270644 1270644 0 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1284902 1284902 0 0.0
RAM 95472 95472 0 0.0
bl602+rpc FLASH 1309860 1309860 0 0.0
RAM 103752 103752 0 0.0
bl702 lighting-app bl702 FLASH 1091790 1091790 0 0.0
RAM 15161 15161 0 0.0
bl702+mfd FLASH 1102484 1102484 0 0.0
RAM 15313 15313 0 0.0
bl702+rpc FLASH 1181600 1181600 0 0.0
RAM 24181 24181 0 0.0
bl706-eth FLASH 874884 874884 0 0.0
RAM 27272 27272 0 0.0
bl706-wifi FLASH 1127216 1127216 0 0.0
RAM 14605 14605 0 0.0
bl702l lighting-app bl702l FLASH 1078676 1078676 0 0.0
RAM 21732 21732 0 0.0
bl702l+mfd FLASH 1089938 1089938 0 0.0
RAM 21892 21892 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798296 798296 0 0.0
RAM 103096 103096 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814052 814052 0 0.0
RAM 113568 113568 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 803568 803568 0 0.0
RAM 107696 107696 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 756360 756360 0 0.0
RAM 101788 101788 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 742040 742040 0 0.0
RAM 102036 102036 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 605842 605842 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 650870 650870 0 0.0
RAM 204780 204780 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 666065 666065 0 0.0
RAM 75100 75100 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 685909 685909 0 0.0
RAM 77732 77732 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 685909 685909 0 0.0
RAM 77732 77732 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 642845 642845 0 0.0
RAM 70168 70168 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608609 608609 0 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 628245 628245 0 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 628245 628245 0 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624113 624113 0 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 643837 643837 0 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 643837 643837 0 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 592677 592677 0 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 612529 612529 0 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 612529 612529 0 0.0
RAM 70420 70420 0 0.0
efr32 lighting-app BRD4187C FLASH 923220 923220 0 0.0
RAM 134996 134996 0 0.0
lock-app BRD4338a FLASH 762148 762148 0 0.0
RAM 174552 174552 0 0.0
window-app BRD4187C FLASH 1012040 1012040 0 0.0
RAM 129616 129616 0 0.0
esp32 all-clusters-app c3devkit DRAM 88332 88332 0 0.0
FLASH 1468744 1468744 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 114796 114796 0 0.0
FLASH 1537959 1537959 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4592 4592 0 0.0
FLASH 2529216 2529216 0 0.0
RAM 125112 125112 0 0.0
all-clusters-app debug unknown 5368 5368 0 0.0
FLASH 5581246 5581246 0 0.0
RAM 487384 487384 0 0.0
all-clusters-minimal-app debug unknown 5288 5288 0 0.0
FLASH 5051432 5051432 0 0.0
RAM 232936 232936 0 0.0
bridge-app debug unknown 5256 5256 0 0.0
FLASH 4477464 4477464 0 0.0
RAM 212832 212832 0 0.0
chip-tool debug unknown 5728 5728 0 0.0
FLASH 11688023 11688023 0 0.0
RAM 542018 542018 0 0.0
chip-tool-ipv6only arm64 unknown 19992 19992 0 0.0
FLASH 10806732 10806732 0 0.0
RAM 590928 590928 0 0.0
fabric-admin debug unknown 5592 5592 0 0.0
FLASH 10653303 10653303 0 0.0
RAM 535658 535658 0 0.0
fabric-bridge-app debug unknown 5264 5264 0 0.0
FLASH 4348008 4348008 0 0.0
RAM 204960 204960 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5373058 5373058 0 0.0
RAM 221640 221640 0 0.0
lock-app debug unknown 5192 5192 0 0.0
FLASH 4541016 4541016 0 0.0
RAM 200248 200248 0 0.0
ota-provider-app debug unknown 4576 4576 0 0.0
FLASH 4196904 4196904 0 0.0
RAM 194544 194544 0 0.0
ota-requestor-app debug unknown 4512 4512 0 0.0
FLASH 4322264 4322264 0 0.0
RAM 199168 199168 0 0.0
shell debug unknown 4112 4112 0 0.0
FLASH 2794525 2794525 0 0.0
RAM 150480 150480 0 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4167580 4167580 0 0.0
RAM 235864 235864 0 0.0
tv-app debug unknown 5472 5472 0 0.0
FLASH 5602984 5602984 0 0.0
RAM 341800 341800 0 0.0
tv-casting-app debug unknown 5096 5096 0 0.0
FLASH 9859646 9859646 0 0.0
RAM 400024 400024 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1502116 1502116 0 0.0
RAM 226656 226656 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 881088 881088 0 0.0
RAM 139693 139693 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 951688 951688 0 0.0
RAM 138121 138121 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 826644 826644 0 0.0
RAM 138591 138591 0 0.0
nxp contact k32w0+release FLASH 575868 575868 0 0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 591032 591032 0 0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 609960 609960 0 0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 674536 674536 0 0.0
RAM 82816 82816 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1613436 1613436 0 0.0
RAM 207148 207148 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1534204 1534204 0 0.0
RAM 204052 204052 0 0.0
light cy8ckit_062s2_43012 FLASH 1461076 1461076 0 0.0
RAM 197332 197332 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462932 1462932 0 0.0
RAM 224396 224396 0 0.0
qpg lighting-app qpg6105+debug FLASH 650876 650876 0 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 611000 611000 0 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 472272 472272 0 0.0
RAM 141652 141652 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 632372 632372 0 0.0
RAM 50528 50528 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 657052 657052 0 0.0
RAM 145872 145872 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 777346 777346 0 0.0
RAM 110684 110684 0 0.0
bridge-app tlsr9258a FLASH 675364 675364 0 0.0
RAM 95304 95304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 633956 633956 0 0.0
RAM 50572 50572 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 719758 719758 0 0.0
RAM 77148 77148 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612186 612186 0 0.0
RAM 142104 142104 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 799966 799966 0 0.0
RAM 100508 100508 0 0.0
lock-app-dfu tlsr9528a FLASH 665528 665528 0 0.0
RAM 69860 69860 0 0.0
ota-requestor-app tlsr9258a FLASH 694694 694694 0 0.0
RAM 95028 95028 0 0.0
pump-app tlsr9518adk80d FLASH 616228 616228 0 0.0
RAM 56952 56952 0 0.0
pump-controller-app tlsr9518adk80d FLASH 606612 606612 0 0.0
RAM 56752 56752 0 0.0
shell tlsr9518adk80d FLASH 466192 466192 0 0.0
RAM 72484 72484 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 640316 640316 0 0.0
RAM 52200 52200 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 650438 650438 0 0.0
RAM 60388 60388 0 0.0
thermostat tlsr9518adk80d FLASH 625502 625502 0 0.0
RAM 57084 57084 0 0.0
window-covering tlsr9118bdk40d FLASH 518734 518734 0 0.0
RAM 97800 97800 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1633324 1633324 0 0.0
RAM 46012 46012 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16110190 16110190 0 0.0
RAM 7079696 7079696 0 0.0

@mergify mergify bot merged commit 28430f1 into project-chip:master Jun 28, 2024
68 checks passed
austina-csa pushed a commit to austina-csa/connectedhomeip that referenced this pull request Jul 10, 2024
…project-chip#33877)

* Initial copy with a clean history

* make linter happy

* Restyle

* Fix typo

* Add nolint: assert will return before we use the underlying value

* 2 more fixes regarding unchecked access

* Switch some asserts to expects, for better test logic

* Start implementing a read ... wip while I switch to a few other tests

* More implementation and we seem to need privilege check as well

* More mock ember functions implemented, to make it at least link for now

* A bit of work on AAI support. Still need to split out global attribute readers

* Split out global AAI...for now

* Add global attribute access interface as part of ember data model definitions ... they seem needed

* Drop RequiredPrivilegeStubs ... those are odd and if you use mock ember you may as well mock these out as well

* Restyle

* Added sufficient overrides for things to compile ... this is a MESS

* Some more changes to compile

* Things link now ... but boy do we have many workarounds...

* Remove double return

* Restyle

* Full ember handling

* Comment updates and slight restyle

* remove commented out code

* Remove read-state from arguments - attributevalueencoder maintains its own state, so we should not duplicate things at this time

* more comments and some logic cleanup on alternatives ... code should be less broken now

* clean one more comment that seemed odd

* Fix off by one bug for long strin processing

* More generics

* Split out io storage and type conversion as shared functions for ember-compatibility

* Restyle

* Added more comments

* Fix lint errors ... these files are not in libraries since they depend on metadata

* Restyle

* Fix the access denied error logic ... the translation to UnsupportedAccess is to be done by the caller at a later time, since caller may skip

* Shorter code is better

* Some comments, cleaner code

* Fix auto-include

* add some TODO because access control is needed

* Model renames

* Add renamed files

* Add some attribute iteration hint

* Make use of the attribute cache

* Restyle

* Add a cluster iteration hint

* Add a few more hints. Ember code still contains loops though, so this may not be ideal still

* Add some TODO items for using faster iterations for data. Ember index vs value duality still needs some work

* Add a cluster type cache as well. This relies on ember being reasonably static

* Add global attribute handling

* Fix typing u16 vs unsigned

* Unit test preparation: make ACL pass and have an ACL test as well

* Some progress in testability. No mock reads, however at least some progress

* Make some unit tests pass with ember overrides

* Restyle

* Attempt to decode data. It does NOT work yet

* Validation actually passes

* Start splitting into unrelated files ...this is painful

* Restyle

* Better test namespacing - be consistent

* Re-organize a bit ... boilerplate still seems A LOT

* Minor comments to start organizing the code better - I NEED more readable things

* Restyle and re-organize for readability

* More code changes to support testing strings ... however this FAILS right now

* Restyle

* Fix a typo ... still broken though

* one more typo fix ... test passes

* Long octet string test as well

* Restyle

* Fix comment and change the size of the string

* Add several ember-specific tests

* unit tests and working with nullable values

* Fix up the tests

* Restyle

* AAI unit test for read

* Slight comment updates

* Restyle

* Use StringBuilderAdapters to format chip_error nicely

* Format

* More unit tests for lists ... test overflow as well

* Add test support for partially encoded lists

* add missing file

* Fix name shadowing

* Fix auto-added include names

* Test global attribute read via AAI

* More unit test coverage

* Test nullable string reads

* One more test for error pahs

* More failure cases on failure path

* Restyle

* Remove back the initialization and make the comment more obvious

* Undo odd include that got auto-added

* Place files back past renames

* A bit more renaming

* Fix includes

* More updates to the latest code

* Fix unit test merging

* Resolve data model ambiguity

* Restyle

* Do not try to compile ember tests on zephyr as it is not compatible with single large executable

* Update placement and comment for including codegen test into one large binary

* Restyle

* Add static cast for ember calls for span sizes ... we know we are less than 65K

* Fix clang-tidy error report

* Restyle

* Do not try to translate UnsupportedRead

* Typo fixes

* Code review feedback: correct the return code for global attribute missing the cluster

* Some spelling updates and format

* ChipDie if internal logic for read fails

* Fix typo

* Add unit test for invalid global attribute read

* Code review feedback: comment about internal flags and implement path expansion logic for skipping data encoding

* Restyle and unit test for expansion

* Another unit test for AAI this time for unsupported read

* Restyle

* Update src/app/codegen-data-model/tests/TestAttributeReportIBsEncoding.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Rename files to not have a Test prefix when not containing tests

* Add comment as per review comment

* Use macros for error returns

* Fix typo

* Add a macro for dynamic global IM status codes in chip_error

* Reference issue in comment

* Fix comment a bit

* Undo module updates ... this time for real

---------

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
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.

5 participants