connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Add a way to differentiate between string-like and list-like objects in bridge codegen

Open achaulk-goog opened this issue 3 years ago • 2 comments

Currently there is no way to have a list of bytes, as that is directed into the string encode/decode. This adds AsString and AsList to explicitly specify how the container is to be encoded.

achaulk-goog avatar Oct 07 '22 19:10 achaulk-goog

PR #23078: Size comparison from 32d8e9da0a0e54aaacf997cfc4386de0374986d1 to 644c323bb085d150285a0cb79d7e9583e864d656

Increases (3 builds for bl702, cc13x2_26x2, nrfconnect)
platform target config section 32d8e9da 644c323b change % change
bl702 lighting-app bl702 .debug_info 37904657 37904658 1 0.0
.text 956804 956806 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 174736 174744 8 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 815512 815516 4 0.0
Decreases (6 builds for bl602, bl702, cc13x2_26x2, telink)
platform target config section 32d8e9da 644c323b change % change
bl602 lighting-app bl602+rpc .text 1100184 1100182 -2 -0.0
bl702 lighting-app bl702+rpc .debug_info 41811272 41811270 -2 -0.0
.text 1030510 1030506 -4 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 676799 -8 -0.0
.text 586888 586880 -8 -0.0
telink light-switch-app tlsr9518adk80d text 552954 552952 -2 -0.0
lighting-app tlsr9518adk80d text 571176 571174 -2 -0.0
ota-requestor-app tlsr9518adk80d text 577360 577356 -4 -0.0
Full report (29 builds for bl602, bl702, cc13x2_26x2, efr32, k32w, linux, mbed, nrfconnect, qpg, telink)
platform target config section 32d8e9da 644c323b change % change
bl602 lighting-app bl602 (read/write) 1389242 1389242 0 0.0
.bss 90729 90729 0 0.0
.data 9928 9928 0 0.0
.text 1068834 1068834 0 0.0
bl602+rpc (read/write) 1434454 1434454 0 0.0
.bss 98161 98161 0 0.0
.data 10312 10312 0 0.0
.text 1100184 1100182 -2 -0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1188243 1188243 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67102 67102 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4272 4272 0 0.0
.debug_abbrev 1506865 1506865 0 0.0
.debug_aranges 133128 133128 0 0.0
.debug_frame 486580 486580 0 0.0
.debug_info 37904657 37904658 1 0.0
.debug_line 5256255 5256255 0 0.0
.debug_loc 3366594 3366594 0 0.0
.debug_ranges 359272 359272 0 0.0
.debug_str 3457767 3457767 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116552 116552 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565071 565071 0 0.0
.symtab 171664 171664 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
956804 956806 2 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1284163 1284163 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75150 75150 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4800 4800 0 0.0
.debug_abbrev 1644410 1644410 0 0.0
.debug_aranges 140632 140632 0 0.0
.debug_frame 511956 511956 0 0.0
.debug_info 41811272 41811270 -2 -0.0
.debug_line 5630790 5630790 0 0.0
.debug_loc 3559254 3559254 0 0.0
.debug_ranges 381728 381728 0 0.0
.debug_str 3853667 3853667 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 129944 129944 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 624244 624244 0 0.0
.symtab 189472 189472 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1030510 1030506 -4 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 676799 -8 -0.0
(read/write) 174736 174744 8 0.0
.bss 81236 81236 0 0.0
.data 3380 3380 0 0.0
.rodata 89607 89607 0 0.0
.text 586888 586880 -8 -0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641055 641055 0 0.0
(read/write) 158004 158004 0 0.0
.bss 80508 80508 0 0.0
.data 3380 3380 0 0.0
.rodata 78743 78743 0 0.0
.text 561992 561992 0 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675491 0 0.0
(read/write) 173204 173204 0 0.0
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77131 77131 0 0.0
.text 597880 597880 0 0.0
lock-mtd LP_CC2652R7 (read only) 659247 659247 0 0.0
(read/write) 185136 185136 0 0.0
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 102951 102951 0 0.0
.text 555816 555816 0 0.0
pump-app LP_CC2652R7 (read only) 687543 687543 0 0.0
(read/write) 161872 161872 0 0.0
.bss 78428 78428 0 0.0
.data 3296 3296 0 0.0
.rodata 90543 90543 0 0.0
.text 596516 596516 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672043 0 0.0
(read/write) 177484 177484 0 0.0
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86099 86099 0 0.0
.text 585464 585464 0 0.0
shell LP_CC2652R7 (read only) 667830 667830 0 0.0
(read/write) 186032 186032 0 0.0
.bss 83556 83556 0 0.0
.data 3376 3376 0 0.0
.rodata 86318 86318 0 0.0
.text 581196 581196 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973512 0 0.0
.bss 152252 152252 0 0.0
.data 2248 2248 0 0.0
.text 818992 818992 0 0.0
BRD4161A+rs911x (read/write) 1030736 1030736 0 0.0
.bss 186656 186656 0 0.0
.data 2092 2092 0 0.0
.text 841968 841968 0 0.0
BRD4187C (read/write) 1145476 1145476 0 0.0
.bss 138640 138640 0 0.0
.data 2596 2596 0 0.0
.text 979644 979644 0 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1156792 0 0.0
.bss 158208 158208 0 0.0
.data 2100 2100 0 0.0
.text 996460 996460 0 0.0
window-app BRD4187C (read/write) 1138912 1138912 0 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 971616 971616 0 0.0
k32w contact k32w0+release (read/write) 665944 665944 0 0.0
.bss 77048 77048 0 0.0
.data 2108 2108 0 0.0
.text 567676 567676 0 0.0
light k32w0+release (read/write) 641620 641620 0 0.0
.bss 74824 74824 0 0.0
.data 2064 2064 0 0.0
.text 562004 562004 0 0.0
lock k32w0+release (read/write) 632948 632948 0 0.0
.bss 75600 75600 0 0.0
.data 2080 2080 0 0.0
.text 552540 552540 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10428964 0 0.0
(read/write) 706321 706321 0 0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650608 650608 0 0.0
.dynamic 560 560 0 0.0
.got 13896 13896 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518004 518004 0 0.0
.text 8255412 8255412 0 0.0
thermostat-no-ble arm64 (read only) 2389468 2389468 0 0.0
(read/write) 143617 143617 0 0.0
.bss 55377 55377 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77232 77232 0 0.0
.dynamic 560 560 0 0.0
.got 5176 5176 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144244 144244 0 0.0
.text 2002336 2002336 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2451856 2451856 0 0.0
.bss 215028 215028 0 0.0
.data 5872 5872 0 0.0
.text 1414500 1414500 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183083 0 0.0
bss 144441 144441 0 0.0
rodata 144220 144220 0 0.0
text 815512 815516 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1161767 0 0.0
bss 143668 143668 0 0.0
rodata 135792 135792 0 0.0
text 803412 803412 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148280 0 0.0
.bss 110556 110556 0 0.0
.data 832 832 0 0.0
.text 595380 595380 0 0.0
lock-app qpg6105+debug (read/write) 1113344 1113344 0 0.0
.bss 106372 106372 0 0.0
.data 836 836 0 0.0
.text 560440 560440 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 789000 789000 0 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 552954 552952 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 811112 811112 0 0.0
bss 73328 73328 0 0.0
noinit 43520 43520 0 0.0
text 571176 571174 -2 -0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819048 0 0.0
bss 74236 74236 0 0.0
noinit 43520 43520 0 0.0
text 577360 577356 -4 -0.0

github-actions[bot] avatar Oct 07 '22 20:10 github-actions[bot]

PR #23078: Size comparison from 32d8e9da0a0e54aaacf997cfc4386de0374986d1 to e40dc3e0b050111dda526fddddf3b0592b63e5c7

Decreases (1 build for bl702)
platform target config section 32d8e9da e40dc3e0 change % change
bl702 lighting-app bl702+rpc .debug_info 41811272 41811270 -2 -0.0
.text 1030510 1030506 -4 -0.0
Full report (2 builds for bl702)
platform target config section 32d8e9da e40dc3e0 change % change
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3262 3262 0 0.0
(read/write) 1188243 1188243 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67102 67102 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4272 4272 0 0.0
.debug_abbrev 1506865 1506865 0 0.0
.debug_aranges 133128 133128 0 0.0
.debug_frame 486580 486580 0 0.0
.debug_info 37904657 37904657 0 0.0
.debug_line 5256255 5256255 0 0.0
.debug_loc 3366594 3366594 0 0.0
.debug_ranges 359272 359272 0 0.0
.debug_str 3457767 3457767 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116552 116552 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565071 565071 0 0.0
.symtab 171664 171664 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 956804 956804 0 0.0
bl702+rpc 0 0 0 0.0
(read only) 3262 3262 0 0.0
(read/write) 1284163 1284163 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75150 75150 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4800 4800 0 0.0
.debug_abbrev 1644410 1644410 0 0.0
.debug_aranges 140632 140632 0 0.0
.debug_frame 511956 511956 0 0.0
.debug_info 41811272 41811270 -2 -0.0
.debug_line 5630790 5630790 0 0.0
.debug_loc 3559254 3559254 0 0.0
.debug_ranges 381728 381728 0 0.0
.debug_str 3853667 3853667 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 129944 129944 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 624244 624244 0 0.0
.symtab 189472 189472 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 1030510 1030506 -4 -0.0

github-actions[bot] avatar Oct 07 '22 21:10 github-actions[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Dec 14 '22 04:12 stale[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Feb 17 '23 06:02 stale[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 19 '23 14:04 stale[bot]

dynamic bridge was deleted.

andy31415 avatar Jun 09 '23 01:06 andy31415