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

add isLastElement in kotlin tlvReader #28617

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yunhanw-google
Copy link
Contributor

add isLastElement in kotlin tlvReader and corresponding test

@github-actions
Copy link

github-actions bot commented Aug 10, 2023

PR #28617: Size comparison from a3c4b48 to 29f0f4f

Increases (11 builds for bl702, mbed, psoc6, telink)
platform target config section a3c4b48 29f0f4f change % change
bl702 lighting-app bl702 (read/write) 1167527 1167531 4 0.0
.debug_info 41507174 41507175 1 0.0
.text 954680 954682 2 0.0
bl702+rpc (read/write) 1266463 1266467 4 0.0
.debug_info 46401873 46401874 1 0.0
.text 1029364 1029366 2 0.0
mbed lock-app-release cy8cproto_062_4343w (read/write) 2522080 2522144 64 0.0
.text 1484764 1484828 64 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 30260557 30260559 2 0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27228620 27228621 1 0.0
telink all-clusters-app tlsr9518adk80d text 730410 730412 2 0.0
all-clusters-minimal-app tlsr9518adk80d text 669782 669784 2 0.0
bridge-app tlsr9518adk80d text 647034 647038 4 0.0
contact-sensor-app tlsr9518adk80d text 590426 590428 2 0.0
lighting-app tlsr9518adk80d text 685792 685794 2 0.0
pump-app tlsr9518adk80d text 596030 596032 2 0.0
Decreases (11 builds for bl702l, efr32, nrfconnect, psoc6, telink)
platform target config section a3c4b48 29f0f4f change % change
bl702l lighting-app bl702l (read/write) 1153396 1153392 -4 -0.0
.debug_info 41508284 41508283 -1 -0.0
.text 943690 943688 -2 -0.0
efr32 lighting-app BRD4187C (read/write) 1036604 1036596 -8 -0.0
.text 869228 869220 -8 -0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 810212 810208 -4 -0.0
psoc6 light cy8ckit_062s2_43012 .debug_info 22370960 22370959 -1 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 907476 907468 -8 -0.0
text 618158 618156 -2 -0.0
lighting-app-factory-data tlsr9518adk80d text 693308 693306 -2 -0.0
lighting-app-shell tlsr9518adk80d text 750830 750826 -4 -0.0
lock-app tlsr9518adk80d text 621100 621098 -2 -0.0
shell tlsr9518adk80d text 478658 478656 -2 -0.0
temperature-measurement-app tlsr9518adk80d text 582142 582140 -2 -0.0
window-covering tlsr9518adk80d text 616776 616774 -2 -0.0
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section a3c4b48 29f0f4f change % change
bl602 lighting-app bl602 (read/write) 1364494 1364494 0 0.0
.bss 73622 73622 0 0.0
.data 9560 9560 0 0.0
.text 1057528 1057528 0 0.0
bl602+rpc (read/write) 1411962 1411962 0 0.0
.bss 81662 81662 0 0.0
.data 9952 9952 0 0.0
.text 1089464 1089464 0 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1167527 1167531 4 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 41285 41285 0 0.0
.bss_psram 43424 43424 0 0.0
.comment 48 48 0 0.0
.data 3544 3544 0 0.0
.debug_abbrev 1567358 1567358 0 0.0
.debug_aranges 140392 140392 0 0.0
.debug_frame 516600 516600 0 0.0
.debug_info 41507174 41507175 1 0.0
.debug_line 5484197 5484197 0 0.0
.debug_loc 3564711 3564711 0 0.0
.debug_ranges 384528 384528 0 0.0
.debug_str 4012409 4012409 0 0.0
.hbn 544 544 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 106920 106920 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 589524 589524 0 0.0
.symtab 175792 175792 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
954680 954682 2 0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1266463 1266467 4 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 49749 49749 0 0.0
.bss_psram 43424 43424 0 0.0
.comment 48 48 0 0.0
.data 4104 4104 0 0.0
.debug_abbrev 1744488 1744488 0 0.0
.debug_aranges 148936 148936 0 0.0
.debug_frame 545504 545504 0 0.0
.debug_info 46401873 46401874 1 0.0
.debug_line 5896719 5896719 0 0.0
.debug_loc 3770867 3770867 0 0.0
.debug_ranges 410280 410280 0 0.0
.debug_str 4432274 4432274 0 0.0
.hbn 544 544 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 121572 121572 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 652487 652487 0 0.0
.symtab 194720 194720 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1029364 1029366 2 0.0
bl702l lighting-app bl702l (read only) 278 278 0 0.0
(read/write) 1153396 1153392 -4 -0.0
.boot2 292 292 0 0.0
.bss 15988 15988 0 0.0
.bss_psram 77840 77840 0 0.0
.comment 48 48 0 0.0
.data 4528 4528 0 0.0
.debug_abbrev 1569577 1569577 0 0.0
.debug_aranges 134896 134896 0 0.0
.debug_frame 496288 496288 0 0.0
.debug_info 41508284 41508283 -1 -0.0
.debug_line 5399891 5399891 0 0.0
.debug_loc 3500836 3500836 0 0.0
.debug_ranges 389736 389736 0 0.0
.debug_str 4024878 4024878 0 0.0
.hbn 3244 3244 0 0.0
.hbn_noinit 308 308 0 0.0
.init 408 408 0 0.0
.init_array 144 144 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 100804 100804 0 0.0
.romdata 3224 3224 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 286 286 0 0.0
.stack 2048 2048 0 0.0
.strtab 589739 589739 0 0.0
.symtab 175344 175344 0 0.0
.tcm_data 692 692 0 0.0
.tcmcode 278 278 0 0.0
.text 0 0 0 0.0
943690 943688 -2 -0.0
cc32xx lock CC3235SF_LAUNCHXL (blank) 0 0 0 0.0
(read only) 615642 615642 0 0.0
(read/write) 207744 207744 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 201184 201184 0 0.0
.comment 206 206 0 0.0
.data 1440 1440 0 0.0
.debug_abbrev 961965 961965 0 0.0
.debug_aranges 109048 109048 0 0.0
.debug_frame 369816 369816 0 0.0
.debug_info 19421380 19421380 0 0.0
.debug_line 2813775 2813775 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1596785 1596785 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 100571 100571 0 0.0
.debug_str 3427024 3427024 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106282 106282 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 496303 496303 0 0.0
.symtab 293312 293312 0 0.0
.text 507240 507240 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 550207 550207 0 0.0
.app_xip_area 441497 441497 0 0.0
.bss 63728 63728 0 0.0
.data 664 664 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 537287 537287 0 0.0
.app_xip_area 423529 423529 0 0.0
.bss 68752 68752 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 573991 573991 0 0.0
.app_xip_area 466361 466361 0 0.0
.bss 62720 62720 0 0.0
.data 592 592 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 548943 548943 0 0.0
.app_xip_area 438305 438305 0 0.0
.bss 65632 65632 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1012028 1012028 0 0.0
.bss 184524 184524 0 0.0
.data 2652 2652 0 0.0
.text 824832 824832 0 0.0
BRD4187C (read/write) 1036604 1036596 -8 -0.0
.bss 164108 164108 0 0.0
.data 3248 3248 0 0.0
.text 869228 869220 -8 -0.0
lock-app BRD4161A+wf200 (read/write) 1088760 1088760 0 0.0
.bss 178580 178580 0 0.0
.data 2672 2672 0 0.0
.text 907488 907488 0 0.0
window-app BRD4187C (read/write) 1108064 1108064 0 0.0
.bss 147148 147148 0 0.0
.data 3132 3132 0 0.0
.text 957764 957764 0 0.0
esp32 all-clusters-app c3devkit (read only) 1150972 1150972 0 0.0
(read/write) 1702092 1702092 0 0.0
.dram0.bss 79048 79048 0 0.0
.dram0.data 13084 13084 0 0.0
.flash.rodata 266216 266216 0 0.0
.flash.text 1150972 1150972 0 0.0
.iram0.text 75262 75262 0 0.0
m5stack (read only) 1192731 1192731 0 0.0
(read/write) 550302 550302 0 0.0
.dram0.bss 85416 85416 0 0.0
.dram0.data 34036 34036 0 0.0
.flash.rodata 297208 297208 0 0.0
.flash.text 1187347 1187347 0 0.0
.iram0.text 123311 123311 0 0.0
k32w contact k32w0+release (read only) 590564 590564 0 0.0
(read/write) 88096 88096 0 0.0
.bss 71344 71344 0 0.0
.data 2128 2128 0 0.0
.text 590028 590028 0 0.0
light k32w0+release (read only) 589364 589364 0 0.0
(read/write) 87748 87748 0 0.0
.bss 71008 71008 0 0.0
.data 2116 2116 0 0.0
.text 588828 588828 0 0.0
lock k32w0+release (read only) 561700 561700 0 0.0
(read/write) 85548 85548 0 0.0
.bss 68864 68864 0 0.0
.data 2060 2060 0 0.0
.text 561164 561164 0 0.0
linux all-clusters-app debug (read only) 5516465 5516465 0 0.0
(read/write) 418144 418144 0 0.0
.bss 130464 130464 0 0.0
.data 4016 4016 0 0.0
.data.rel.ro 276320 276320 0 0.0
.dynamic 624 624 0 0.0
.got 5384 5384 0 0.0
.init 27 27 0 0.0
.init_array 1304 1304 0 0.0
.rodata 335824 335824 0 0.0
.text 4802771 4802771 0 0.0
all-clusters-minimal-app debug (read only) 4901297 4901297 0 0.0
(read/write) 231392 231392 0 0.0
.bss 126016 126016 0 0.0
.data 3856 3856 0 0.0
.data.rel.ro 94376 94376 0 0.0
.dynamic 624 624 0 0.0
.got 5344 5344 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 271910 271910 0 0.0
.text 4399187 4399187 0 0.0
bridge-app debug (read only) 2768993 2768993 0 0.0
(read/write) 132816 132816 0 0.0
.bss 51480 51480 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 71400 71400 0 0.0
.dynamic 624 624 0 0.0
.got 4640 4640 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 214472 214472 0 0.0
.text 2376995 2376995 0 0.0
chip-tool debug (read only) 17605649 17605649 0 0.0
(read/write) 1046144 1046144 0 0.0
.bss 93752 93752 0 0.0
.data 5090 5090 0 0.0
.data.rel.ro 939952 939952 0 0.0
.dynamic 624 624 0 0.0
.got 5880 5880 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 900209 900209 0 0.0
.text 14672035 14672035 0 0.0
chip-tool-ipv6only arm64 (read only) 16838820 16838820 0 0.0
(read/write) 1113528 1113528 0 0.0
.bss 103064 103064 0 0.0
.data 4392 4392 0 0.0
.data.rel.ro 977304 977304 0 0.0
.dynamic 512 512 0 0.0
.got 23272 23272 0 0.0
.init 24 24 0 0.0
.init_array 248 248 0 0.0
.rodata 812400 812400 0 0.0
.text 13808488 13808488 0 0.0
lighting-app debug+rpc+ui (read only) 5240417 5240417 0 0.0
(read/write) 222056 222056 0 0.0
.bss 117712 117712 0 0.0
.data 4528 4528 0 0.0
.data.rel.ro 92240 92240 0 0.0
.dynamic 672 672 0 0.0
.got 5928 5928 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 336948 336948 0 0.0
.text 4661395 4661395 0 0.0
lock-app debug (read only) 4471425 4471425 0 0.0
(read/write) 202808 202808 0 0.0
.bss 113328 113328 0 0.0
.data 3728 3728 0 0.0
.data.rel.ro 78960 78960 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 247814 247814 0 0.0
.text 4014259 4014259 0 0.0
ota-provider-app debug (read only) 4127609 4127609 0 0.0
(read/write) 191872 191872 0 0.0
.bss 113504 113504 0 0.0
.data 4000 4000 0 0.0
.data.rel.ro 68448 68448 0 0.0
.dynamic 624 624 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 200998 200998 0 0.0
.text 3736291 3736291 0 0.0
ota-requestor-app debug (read only) 4221521 4221521 0 0.0
(read/write) 196184 196184 0 0.0
.bss 114560 114560 0 0.0
.data 4240 4240 0 0.0
.data.rel.ro 71448 71448 0 0.0
.dynamic 624 624 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 204390 204390 0 0.0
.text 3822483 3822483 0 0.0
shell debug (read only) 2937481 2937481 0 0.0
(read/write) 150720 150720 0 0.0
.bss 60008 60008 0 0.0
.data 784 784 0 0.0
.data.rel.ro 84056 84056 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 1136 1136 0 0.0
.rodata 212242 212242 0 0.0
.text 2554274 2554274 0 0.0
thermostat-no-ble arm64 (read only) 4450484 4450484 0 0.0
(read/write) 243848 243848 0 0.0
.bss 122280 122280 0 0.0
.data 2880 2880 0 0.0
.data.rel.ro 102232 102232 0 0.0
.dynamic 512 512 0 0.0
.got 11984 11984 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 162012 162012 0 0.0
.text 3950392 3950392 0 0.0
tv-app debug (read only) 5315713 5315713 0 0.0
(read/write) 349856 349856 0 0.0
.bss 241280 241280 0 0.0
.data 5104 5104 0 0.0
.data.rel.ro 96048 96048 0 0.0
.dynamic 624 624 0 0.0
.got 5616 5616 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 272374 272374 0 0.0
.text 4799699 4799699 0 0.0
tv-casting-app debug (read only) 8295121 8295121 0 0.0
(read/write) 210568 210568 0 0.0
.bss 54208 54208 0 0.0
.data 2544 2544 0 0.0
.data.rel.ro 147016 147016 0 0.0
.dynamic 624 624 0 0.0
.got 5096 5096 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 367644 367644 0 0.0
.text 7527315 7527315 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2522080 2522144 64 0.0
.bss 219904 219904 0 0.0
.data 5128 5128 0 0.0
.text 1484764 1484828 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1219848 1219848 0 0.0
bss 154612 154612 0 0.0
rodata 141436 141436 0 0.0
text 844848 844848 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1338184 1338184 0 0.0
bss 140070 140070 0 0.0
rodata 135504 135504 0 0.0
text 771916 771916 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1156764 1156764 0 0.0
bss 154791 154791 0 0.0
rodata 112776 112776 0 0.0
text 810212 810208 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 837688 837688 0 0.0
(read/write) 1768476 1768476 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 193116 193116 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2536 2536 0 0.0
.debug_abbrev 1382361 1382361 0 0.0
.debug_aranges 143936 143936 0 0.0
.debug_frame 479412 479412 0 0.0
.debug_info 30260557 30260559 2 0.0
.debug_line 4149887 4149887 0 0.0
.debug_line_str 957 957 0 0.0
.debug_loclists 2248578 2248578 0 0.0
.debug_rnglists 142379 142379 0 0.0
.debug_str 4124825 4124825 0 0.0
.heap 837688 837688 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 805861 805861 0 0.0
.symtab 501680 501680 0 0.0
.text 0 0 0 0.0
1564436 1564436 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 839648 839648 0 0.0
(read/write) 1674236 1674236 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 191228 191228 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1285068 1285068 0 0.0
.debug_aranges 137200 137200 0 0.0
.debug_frame 462360 462360 0 0.0
.debug_info 27228620 27228621 1 0.0
.debug_line 3961044 3961044 0 0.0
.debug_line_str 981 981 0 0.0
.debug_loclists 2148953 2148953 0 0.0
.debug_rnglists 135480 135480 0 0.0
.debug_str 3979246 3979246 0 0.0
.heap 839648 839648 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 713312 713312 0 0.0
.symtab 465808 465808 0 0.0
.text 1472156 1472156 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 845912 845912 0 0.0
(read/write) 1605732 1605732 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185076 185076 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2352 2352 0 0.0
.debug_abbrev 1125291 1125291 0 0.0
.debug_aranges 127328 127328 0 0.0
.debug_frame 425504 425504 0 0.0
.debug_info 22370960 22370959 -1 -0.0
.debug_line 3526349 3526349 0 0.0
.debug_line_str 942 942 0 0.0
.debug_loclists 1986068 1986068 0 0.0
.debug_rnglists 125250 125250 0 0.0
.debug_str 3787318 3787318 0 0.0
.heap 845912 845912 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 634304 634304 0 0.0
.symtab 430448 430448 0 0.0
.text 1409916 1409916 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 818392 818392 0 0.0
(read/write) 1639236 1639236 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 212580 212580 0 0.0
.comment 212 212 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2368 2368 0 0.0
.debug_abbrev 1116755 1116755 0 0.0
.debug_aranges 126240 126240 0 0.0
.debug_frame 421532 421532 0 0.0
.debug_info 22284511 22284511 0 0.0
.debug_line 3481800 3481800 0 0.0
.debug_line_str 933 933 0 0.0
.debug_loclists 1966477 1966477 0 0.0
.debug_rnglists 123426 123426 0 0.0
.debug_str 3751856 3751856 0 0.0
.heap 818392 818392 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 296 296 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 608204 608204 0 0.0
.symtab 422576 422576 0 0.0
.text 1415900 1415900 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1177860 1177860 0 0.0
.bss 101176 101176 0 0.0
.data 744 744 0 0.0
.text 624704 624704 0 0.0
lock-app qpg6105+debug (read/write) 1134932 1134932 0 0.0
.bss 95896 95896 0 0.0
.data 748 748 0 0.0
.text 581772 581772 0 0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1071692 1071692 0 0.0
bss 107308 107308 0 0.0
text 730410 730412 2 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 976808 976808 0 0.0
bss 105284 105284 0 0.0
text 669782 669784 2 0.0
bridge-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 944208 944208 0 0.0
bss 109660 109660 0 0.0
text 647034 647038 4 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 876172 876172 0 0.0
bss 98840 98840 0 0.0
text 590426 590428 2 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 907476 907468 -8 -0.0
bss 99464 99464 0 0.0
text 618158 618156 -2 -0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 982464 982464 0 0.0
bss 107516 107516 0 0.0
text 685792 685794 2 0.0
lighting-app-factory-data tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 993828 993828 0 0.0
bss 111764 111764 0 0.0
text 693308 693306 -2 -0.0
lighting-app-rpc tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1051996 1051996 0 0.0
bss 109088 109088 0 0.0
text 730726 730726 0 0.0
lighting-app-shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1083316 1083316 0 0.0
bss 120164 120164 0 0.0
text 750830 750826 -4 -0.0
lock-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 933616 933616 0 0.0
bss 99560 99560 0 0.0
text 621100 621098 -2 -0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 898744 898744 0 0.0
bss 100148 100148 0 0.0
text 612268 612268 0 0.0
pump-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 881564 881564 0 0.0
bss 98972 98972 0 0.0
text 596030 596032 2 0.0
pump-controller-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 868744 868744 0 0.0
bss 98772 98772 0 0.0
text 586494 586494 0 0.0
shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 744196 744196 0 0.0
bss 97208 97208 0 0.0
text 478658 478656 -2 -0.0
smoke_co_alarm-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 878656 878656 0 0.0
bss 98952 98952 0 0.0
text 593902 593902 0 0.0
temperature-measurement-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 864924 864924 0 0.0
bss 98680 98680 0 0.0
text 582142 582140 -2 -0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 910756 910756 0 0.0
bss 99224 99224 0 0.0
text 621466 621466 0 0.0
window-covering tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 906544 906544 0 0.0
bss 99560 99560 0 0.0
text 616776 616774 -2 -0.0
Tag.encode(value.toType().encode(), tag).size + value.encode().size

/** Returns true if this reader is currently pointing to the last element in the TLV data. */
fun isLastElement(): Boolean {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use = here since function is trivial?

Copy link
Contributor

Choose a reason for hiding this comment

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

This also seems to rely that decoding and re-encoding is the same size. Likely correct, but needs mental processing for this.

How about using the same logic as in peekElement (i.e. remembering the index) and checking if we reached the end index (i.e. index >= bytes.size)?

Copy link
Contributor

Choose a reason for hiding this comment

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

This also seems to throw if you already read the entire tlv ... I would expect isLastElement to return true if the TLV is pointing to the last element and false otherwise. Instead this also has the case of will throw if reader points to the end/is exhausted which seems inconvenient.

What is the usage of this method? Why don't we have a wasLastElement maybe which is trivial?

@andy31415
Copy link
Contributor

add isLastElement in kotlin tlvReader and corresponding test

@yunhanw-google could you add some description on why we do this rather than just describing that we do it?

It seems trivial to have a wasLastElement (same as checking remaining length being 0) so knowing if we point to the last element before reading it seems not that useful ...

Copy link

stale bot commented Mar 13, 2024

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 stale bot added the stale Stale issue or PR label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants