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

Chip tool add wait parameter to reportable attribute #11527

Conversation

vivien-apple
Copy link
Contributor

Problem

chip-tool report command does not work properly since "reports" has been updated to use IM. For instance it does not wait for the first generated report to comes, and so the failure/success of the command is not reported accurately.

This PR also add a wait parameter to the report command in order to have a mechanism to listen for reports on the configured attribute.

Change overview

  • Update the report command to match how it works now with IM
  • Add a wait parameter in case the command needs to continue listening after the first report
  • Update generated code

Testing

It was tested locally using: ./out/debug/standalone/chip-tool onoff report on-off 1 3 1 0x12345 1

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

PR #11527: Size comparison from 3f82de1 to e479a40

Increases (2 builds for esp32, linux)
platform target config section 3f82de1 e479a40 change % change
esp32 all-clusters-app m5stack (read only) 913623 913639 16 0.0
.flash.text 913623 913639 16 0.0
linux chip-tool debug (read only) 4931485 4938749 7264 0.1
.text 4429077 4436341 7264 0.2
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 3f82de1 e479a40 change % change
efr32 lighting-app BRD4161A (read only) 745848 745848 0 0.0
(read/write) 115740 115740 0 0.0
.bss 113964 113964 0 0.0
.data 1776 1776 0 0.0
.text 745840 745840 0 0.0
BRD4161A+rpc (read only) 733384 733384 0 0.0
(read/write) 132364 132364 0 0.0
.bss 130468 130468 0 0.0
.data 1892 1892 0 0.0
.text 733376 733376 0 0.0
lock-app BRD4161A (read only) 725136 725136 0 0.0
(read/write) 113556 113556 0 0.0
.bss 111820 111820 0 0.0
.data 1736 1736 0 0.0
.text 725128 725128 0 0.0
window-app BRD4161A (read only) 726032 726032 0 0.0
(read/write) 113884 113884 0 0.0
.bss 112140 112140 0 0.0
.data 1740 1740 0 0.0
.text 726024 726024 0 0.0
esp32 all-clusters-app c3devkit (read only) 882786 882786 0 0.0
(read/write) 1306040 1306040 0 0.0
.dram0.bss 57608 57608 0 0.0
.dram0.data 16472 16472 0 0.0
.flash.rodata 198712 198712 0 0.0
.flash.text 882786 882786 0 0.0
.iram0.text 57624 57624 0 0.0
m5stack (read only) 913623 913639 16 0.0
(read/write) 423336 423336 0 0.0
.dram0.bss 60112 60112 0 0.0
.dram0.data 32108 32108 0 0.0
.flash.rodata 204952 204952 0 0.0
.flash.text 913623 913639 16 0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 699560 699560 0 0.0
.bss 77808 77808 0 0.0
.data 1908 1908 0 0.0
.text 614044 614044 0 0.0
lock-app k32w061+debug (read/write) 592364 592364 0 0.0
.bss 68340 68340 0 0.0
.data 1876 1876 0 0.0
.text 516348 516348 0 0.0
shell k32w061+debug (read/write) 657860 657860 0 0.0
.bss 78980 78980 0 0.0
.data 1844 1844 0 0.0
.text 571236 571236 0 0.0
linux all-clusters-app debug (read only) 1704225 1704225 0 0.0
(read/write) 119232 119232 0 0.0
.bss 50608 50608 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 62304 62304 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 139221 139221 0 0.0
.text 1431586 1431586 0 0.0
bridge-app debug+rpc (read only) 1292261 1292261 0 0.0
(read/write) 69808 69808 0 0.0
.bss 35536 35536 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 27736 27736 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111028 111028 0 0.0
.text 1085365 1085365 0 0.0
chip-tool debug (read only) 4931485 4938749 7264 0.1
(read/write) 126664 126664 0 0.0
.bss 18736 18736 0 0.0
.data 2224 2224 0 0.0
.data.rel.ro 100288 100288 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 432 432 0 0.0
.rodata 233488 233488 0 0.0
.text 4429077 4436341 7264 0.2
lighting-app debug+rpc (read only) 1553257 1553257 0 0.0
(read/write) 102776 102776 0 0.0
.bss 41176 41176 0 0.0
.data 1170 1170 0 0.0
.data.rel.ro 55136 55136 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129649 129649 0 0.0
.text 1290050 1290050 0 0.0
ota-provider-app debug (read only) 1251465 1251465 0 0.0
(read/write) 67976 67976 0 0.0
.bss 37600 37600 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24536 24536 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 112232 112232 0 0.0
.text 1043154 1043154 0 0.0
ota-requestor-app debug (read only) 1329761 1329761 0 0.0
(read/write) 77232 77232 0 0.0
.bss 45728 45728 0 0.0
.data 816 816 0 0.0
.data.rel.ro 25544 25544 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 124208 124208 0 0.0
.text 1107522 1107522 0 0.0
shell debug (read only) 788041 788041 0 0.0
(read/write) 58184 58184 0 0.0
.bss 16648 16648 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36784 36784 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 77935 77935 0 0.0
.text 608642 608642 0 0.0
tv-app debug (read only) 1817233 1817233 0 0.0
(read/write) 290400 290400 0 0.0
.bss 223248 223248 0 0.0
.data 2704 2704 0 0.0
.data.rel.ro 58792 58792 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 155304 155304 0 0.0
.text 1519666 1519666 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2291640 2291640 0 0.0
.bss 178924 178924 0 0.0
.data 5224 5224 0 0.0
.heap 852296 852296 0 0.0
.text 1254240 1254240 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2271800 2271800 0 0.0
.bss 171980 171980 0 0.0
.data 5576 5576 0 0.0
.heap 858888 858888 0 0.0
.text 1234400 1234400 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2249456 2249456 0 0.0
.bss 170876 170876 0 0.0
.data 5560 5560 0 0.0
.heap 860008 860008 0 0.0
.text 1212056 1212056 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048912 2048912 0 0.0
.bss 156256 156256 0 0.0
.data 4968 4968 0 0.0
.heap 875224 875224 0 0.0
.text 1011512 1011512 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 861635 861635 0 0.0
bss 111280 111280 0 0.0
rodata 96932 96932 0 0.0
text 577804 577804 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 823983 823983 0 0.0
bss 107632 107632 0 0.0
rodata 88112 88112 0 0.0
text 551952 551952 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 786678 786678 0 0.0
bss 112652 112652 0 0.0
rodata 92192 92192 0 0.0
text 507264 507264 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838359 838359 0 0.0
bss 110312 110312 0 0.0
rodata 93304 93304 0 0.0
text 559284 559284 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 763654 763654 0 0.0
bss 111724 111724 0 0.0
rodata 88608 88608 0 0.0
text 488836 488836 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497323 497323 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844451 844451 0 0.0
bss 110452 110452 0 0.0
rodata 95012 95012 0 0.0
text 563448 563448 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838215 838215 0 0.0
bss 110348 110348 0 0.0
rodata 93304 93304 0 0.0
text 559020 559020 0 0.0
shell nrf52840dk_nrf52840 (read/write) 776231 776231 0 0.0
bss 109100 109100 0 0.0
rodata 72540 72540 0 0.0
text 519988 519988 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691270 691270 0 0.0
bss 110084 110084 0 0.0
rodata 67184 67184 0 0.0
text 440584 440584 0 0.0
p6 all-clusters-app default (read/write) 2301136 2301136 0 0.0
.bss 106872 106872 0 0.0
.data 2528 2528 0 0.0
.heap 923944 923944 0 0.0
.text 1259400 1259400 0 0.0
lock-app default (read/write) 2213848 2213848 0 0.0
.bss 95680 95680 0 0.0
.data 2400 2400 0 0.0
.heap 935264 935264 0 0.0
.text 1172112 1172112 0 0.0
qpg lighting-app qpg6100+debug (read only) 490896 490896 0 0.0
(read/write) 114144 114144 0 0.0
.bss 50968 50968 0 0.0
.data 1008 1008 0 0.0
.text 485576 485576 0 0.0
lock-app qpg6100+debug (read only) 467236 467236 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49912 49912 0 0.0
.data 964 964 0 0.0
.text 461916 461916 0 0.0
persistent-storage-app qpg6100+debug (read only) 153316 153316 0 0.0
(read/write) 114144 114144 0 0.0
.bss 19448 19448 0 0.0
.data 360 360 0 0.0
.text 147996 147996 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 663242 663242 0 0.0
bss 69092 69092 0 0.0
noinit 33216 33216 0 0.0
text 458250 458250 0 0.0

@mrjerryjohns
Copy link
Contributor

Couldn't quite tell where mWait is actually used to wait for a report?

@woody-apple
Copy link
Contributor

woody-apple commented Nov 9, 2021

Fast tracking, given this is unblock testing and in a test tool

@woody-apple woody-apple merged commit 94c5144 into project-chip:master Nov 9, 2021
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
)

* [chip-tool] Add a wait parameter for the report command

* Update generated code
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