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

[YAML] Add min commissioning timeout parameters to the start command of the SystemCommand simulated cluster #18038

Conversation

vivien-apple
Copy link
Contributor

Problem

There is no way to specify the min commissioning timeout for testing purposes.

I have updated all the simulated clusters to use TLV encoding. This was done for the response bits of the DiscoveryCommands already, but not when commands are emitted, and it was not done for the others.

While it is adding some templates for generating the right structs, it also makes the usual chip-tool template simpler by not having to deal with commands of different types when it comes to arguments. It also reuses all the previous code that has been done for encoding/decoding clusters commands/responses.

For example examples/chip-tool/templates/tests/partials/command_value.zapt (which is used to encode the right value) is now shared for simulated clusters and clusters, which results into a single logic for using variables.

Change overview

  • Update simulated clusters to use TLV encoding for both input and output params
  • Add minCommissioningTimeout parameter to the optional values of the start method

Testing

I have updated TestSystemCommands.yaml with the new parameter

@vivien-apple vivien-apple force-pushed the YAML_UpdateSimilatedClusterToUseTLVEncoding branch from f470864 to a818ff3 Compare May 4, 2022 17:37
@github-actions
Copy link

github-actions bot commented May 4, 2022

PR #18038: Size comparison from 51d67c4 to a818ff3

Increases above 0.2%:

platform target config section 51d67c4 a818ff3 change % change
linux chip-tool debug .rodata 463733 466741 3008 0.6
chip-tool-no-interactive-ipv6only arm64 .rodata 431460 434044 2584 0.6
Increases (2 builds for linux)
platform target config section 51d67c4 a818ff3 change % change
linux chip-tool debug (read only) 8977829 8990373 12544 0.1
.rodata 463733 466741 3008 0.6
.text 7190901 7200437 9536 0.1
chip-tool-no-interactive-ipv6only arm64 (read only) 8817796 8828620 10824 0.1
.rodata 431460 434044 2584 0.6
.text 6927796 6936068 8272 0.1
Decreases (1 build for linux)
platform target config section 51d67c4 a818ff3 change % change
linux chip-tool-no-interactive-ipv6only arm64 (read/write) 642641 642625 -16 -0.0
.data.rel.ro 581760 581736 -24 -0.0
Full report (34 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 51d67c4 a818ff3 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 688855 688855 0 0.0
(read/write) 163344 163344 0 0.0
.bss 75180 75180 0 0.0
.data 3412 3412 0 0.0
.rodata 102127 102127 0 0.0
.text 586244 586244 0 0.0
lock-ftd LP_CC2652R7 (read only) 676731 676731 0 0.0
(read/write) 166716 166716 0 0.0
.bss 73484 73484 0 0.0
.data 3236 3236 0 0.0
.rodata 94195 94195 0 0.0
.text 582056 582056 0 0.0
lock-mtd LP_CC2652R7 (read only) 625483 625483 0 0.0
(read/write) 146300 146300 0 0.0
.bss 69204 69204 0 0.0
.data 3236 3236 0 0.0
.rodata 94083 94083 0 0.0
.text 530912 530912 0 0.0
pump-app LP_CC2652R7 (read only) 661283 661283 0 0.0
(read/write) 183460 183460 0 0.0
.bss 73756 73756 0 0.0
.data 3268 3268 0 0.0
.rodata 80275 80275 0 0.0
.text 580524 580524 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654215 654215 0 0.0
(read/write) 190328 190328 0 0.0
.bss 73812 73812 0 0.0
.data 3232 3232 0 0.0
.rodata 83231 83231 0 0.0
.text 570500 570500 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 626038 626038 0 0.0
.app_xip_area 528628 528628 0 0.0
.bss 80052 80052 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 624750 624750 0 0.0
.app_xip_area 528804 528804 0 0.0
.bss 78620 78620 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 574266 574266 0 0.0
.app_xip_area 468604 468604 0 0.0
.bss 88040 88040 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 908328 908328 0 0.0
(read/write) 134520 134520 0 0.0
.bss 132456 132456 0 0.0
.data 2064 2064 0 0.0
.text 908320 908320 0 0.0
BRD4161A+rpc (read only) 942672 942672 0 0.0
(read/write) 151208 151208 0 0.0
.bss 148936 148936 0 0.0
.data 2268 2268 0 0.0
.text 942664 942664 0 0.0
BRD4161A+rs911x (read only) 746548 746548 0 0.0
(read/write) 128700 128700 0 0.0
.bss 126708 126708 0 0.0
.data 1992 1992 0 0.0
.text 746540 746540 0 0.0
lock-app BRD4161A+wf200 (read only) 916288 916288 0 0.0
(read/write) 127484 127484 0 0.0
.bss 125532 125532 0 0.0
.data 1948 1948 0 0.0
.text 916280 916280 0 0.0
window-app BRD4161A (read only) 845592 845592 0 0.0
(read/write) 132608 132608 0 0.0
.bss 130632 130632 0 0.0
.data 1976 1976 0 0.0
.text 845584 845584 0 0.0
esp32 all-clusters-app c3devkit (read only) 999640 999640 0 0.0
(read/write) 1474226 1474226 0 0.0
.dram0.bss 68320 68320 0 0.0
.dram0.data 14444 14444 0 0.0
.flash.rodata 207016 207016 0 0.0
.flash.text 999640 999640 0 0.0
.iram0.text 62020 62020 0 0.0
m5stack (read only) 1054847 1054847 0 0.0
(read/write) 476648 476648 0 0.0
.dram0.bss 73832 73832 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 236796 236796 0 0.0
.flash.text 1049463 1049463 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 684032 684032 0 0.0
.bss 81248 81248 0 0.0
.data 2020 2020 0 0.0
.text 599060 599060 0 0.0
lock k32w061+release (read/write) 728712 728712 0 0.0
.bss 81680 81680 0 0.0
.data 1980 1980 0 0.0
.text 643348 643348 0 0.0
linux all-clusters-app debug (read only) 2730137 2730137 0 0.0
(read/write) 173208 173208 0 0.0
.bss 83264 83264 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 81752 81752 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 1008 1008 0 0.0
.rodata 235141 235141 0 0.0
.text 2320514 2320514 0 0.0
bridge-app debug+rpc (read only) 1885473 1885473 0 0.0
(read/write) 120504 120504 0 0.0
.bss 71264 71264 0 0.0
.data 3488 3488 0 0.0
.data.rel.ro 40408 40408 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 160385 160385 0 0.0
.text 1602834 1602834 0 0.0
chip-tool debug (read only) 8977829 8990373 12544 0.1
(read/write) 576496 576496 0 0.0
.bss 22592 22592 0 0.0
.data 1136 1136 0 0.0
.data.rel.ro 546496 546496 0 0.0
.dynamic 624 624 0 0.0
.got 4952 4952 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 463733 466741 3008 0.6
.text 7190901 7200437 9536 0.1
chip-tool-no-interactive-ipv6only arm64 (read only) 8817796 8828620 10824 0.1
(read/write) 642641 642625 -16 -0.0
.bss 40913 40913 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 581760 581736 -24 -0.0
.dynamic 560 560 0 0.0
.got 14960 14960 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 431460 434044 2584 0.6
.text 6927796 6936068 8272 0.1
lighting-app debug+rpc (read only) 2319609 2319609 0 0.0
(read/write) 151424 151424 0 0.0
.bss 73312 73312 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 70328 70328 0 0.0
.dynamic 608 608 0 0.0
.got 4320 4320 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 184585 184585 0 0.0
.text 1968914 1968914 0 0.0
lock-app debug (read only) 2225825 2225825 0 0.0
(read/write) 146040 146040 0 0.0
.bss 71936 71936 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 66856 66856 0 0.0
.dynamic 592 592 0 0.0
.got 4312 4312 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 194321 194321 0 0.0
.text 1871746 1871746 0 0.0
ota-provider-app debug (read only) 2055305 2055305 0 0.0
(read/write) 139152 139152 0 0.0
.bss 71424 71424 0 0.0
.data 1736 1736 0 0.0
.data.rel.ro 60200 60200 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 175323 175323 0 0.0
.text 1722690 1722690 0 0.0
ota-requestor-app debug (read only) 2086361 2086361 0 0.0
(read/write) 141960 141960 0 0.0
.bss 72064 72064 0 0.0
.data 1992 1992 0 0.0
.data.rel.ro 62280 62280 0 0.0
.dynamic 592 592 0 0.0
.got 4320 4320 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 171596 171596 0 0.0
.text 1755986 1755986 0 0.0
shell debug (read only) 2555145 2555145 0 0.0
(read/write) 197104 197104 0 0.0
.bss 113992 113992 0 0.0
.data 1376 1376 0 0.0
.data.rel.ro 76016 76016 0 0.0
.dynamic 592 592 0 0.0
.got 4184 4184 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 216626 216626 0 0.0
.text 2177138 2177138 0 0.0
thermostat-no-ble arm64 (read only) 2361244 2361244 0 0.0
(read/write) 174593 174593 0 0.0
.bss 86193 86193 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79096 79096 0 0.0
.dynamic 560 560 0 0.0
.got 4752 4752 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 145868 145868 0 0.0
.text 1986368 1986368 0 0.0
tv-app debug (read only) 2842081 2842081 0 0.0
(read/write) 276736 276736 0 0.0
.bss 189208 189208 0 0.0
.data 4672 4672 0 0.0
.data.rel.ro 76632 76632 0 0.0
.dynamic 592 592 0 0.0
.got 4696 4696 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 217227 217227 0 0.0
.text 2442802 2442802 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2417836 2417836 0 0.0
.bss 205820 205820 0 0.0
.data 5872 5872 0 0.0
.text 1380436 1380436 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177411 1177411 0 0.0
bss 139532 139532 0 0.0
rodata 150580 150580 0 0.0
text 808568 808568 0 0.0
p6 all-clusters-app default (read/write) 2528592 2528592 0 0.0
.bss 139184 139184 0 0.0
.data 2808 2808 0 0.0
.text 1486856 1486856 0 0.0
light-app default (read/write) 2419160 2419160 0 0.0
.bss 132648 132648 0 0.0
.data 2608 2608 0 0.0
.text 1377424 1377424 0 0.0
lock-app default (read/write) 2428448 2428448 0 0.0
.bss 132472 132472 0 0.0
.data 2568 2568 0 0.0
.text 1386712 1386712 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 804104 804104 0 0.0
bss 72172 72172 0 0.0
noinit 40416 40416 0 0.0
text 571200 571200 0 0.0

@vivien-apple vivien-apple force-pushed the YAML_UpdateSimilatedClusterToUseTLVEncoding branch from a818ff3 to 63e4041 Compare May 9, 2022 14:27
@github-actions
Copy link

github-actions bot commented May 9, 2022

PR #18038: Size comparison from 44dd01b to 63e4041

Increases above 0.2%:

platform target config section 44dd01b 63e4041 change % change
linux chip-tool-no-interactive-ipv6only arm64 .rodata 436164 438748 2584 0.6
Increases (1 build for linux)
platform target config section 44dd01b 63e4041 change % change
linux chip-tool-no-interactive-ipv6only arm64 (read only) 8914548 8924476 9928 0.1
.rodata 436164 438748 2584 0.6
.text 7019108 7026468 7360 0.1
Decreases (1 build for linux)
platform target config section 44dd01b 63e4041 change % change
linux chip-tool-no-interactive-ipv6only arm64 (read/write) 643121 643089 -32 -0.0
.data.rel.ro 582024 582000 -24 -0.0
Full report (23 builds for cc13x2_26x2, cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 44dd01b 63e4041 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 690935 690935 0 0.0
(read/write) 161416 161416 0 0.0
.bss 75332 75332 0 0.0
.data 3412 3412 0 0.0
.rodata 102983 102983 0 0.0
.text 587468 587468 0 0.0
lock-ftd LP_CC2652R7 (read only) 678507 678507 0 0.0
(read/write) 164948 164948 0 0.0
.bss 73492 73492 0 0.0
.data 3236 3236 0 0.0
.rodata 94771 94771 0 0.0
.text 583256 583256 0 0.0
lock-mtd LP_CC2652R7 (read only) 627259 627259 0 0.0
(read/write) 146308 146308 0 0.0
.bss 69212 69212 0 0.0
.data 3236 3236 0 0.0
.rodata 94651 94651 0 0.0
.text 532120 532120 0 0.0
pump-app LP_CC2652R7 (read only) 663035 663035 0 0.0
(read/write) 181708 181708 0 0.0
.bss 73756 73756 0 0.0
.data 3268 3268 0 0.0
.rodata 80971 80971 0 0.0
.text 581580 581580 0 0.0
pump-controller-app LP_CC2652R7 (read only) 655943 655943 0 0.0
(read/write) 188600 188600 0 0.0
.bss 73812 73812 0 0.0
.data 3232 3232 0 0.0
.rodata 83911 83911 0 0.0
.text 571548 571548 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 627586 627586 0 0.0
.app_xip_area 530176 530176 0 0.0
.bss 80052 80052 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 626474 626474 0 0.0
.app_xip_area 530520 530520 0 0.0
.bss 78628 78628 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575234 575234 0 0.0
.app_xip_area 469564 469564 0 0.0
.bss 88048 88048 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 910096 910096 0 0.0
(read/write) 134520 134520 0 0.0
.bss 132456 132456 0 0.0
.data 2064 2064 0 0.0
.text 910088 910088 0 0.0
BRD4161A+rpc (read only) 944440 944440 0 0.0
(read/write) 151208 151208 0 0.0
.bss 148936 148936 0 0.0
.data 2268 2268 0 0.0
.text 944432 944432 0 0.0
BRD4161A+rs911x (read only) 787676 787676 0 0.0
(read/write) 129776 129776 0 0.0
.bss 127708 127708 0 0.0
.data 2068 2068 0 0.0
.text 787668 787668 0 0.0
lock-app BRD4161A+wf200 (read only) 946768 946768 0 0.0
(read/write) 124268 124268 0 0.0
.bss 122244 122244 0 0.0
.data 2024 2024 0 0.0
.text 946760 946760 0 0.0
window-app BRD4161A (read only) 890408 890408 0 0.0
(read/write) 134472 134472 0 0.0
.bss 132416 132416 0 0.0
.data 2052 2052 0 0.0
.text 890400 890400 0 0.0
k32w light k32w061+release (read/write) 685136 685136 0 0.0
.bss 81248 81248 0 0.0
.data 2020 2020 0 0.0
.text 600164 600164 0 0.0
lock k32w061+release (read/write) 730468 730468 0 0.0
.bss 81680 81680 0 0.0
.data 1980 1980 0 0.0
.text 645104 645104 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 8914548 8924476 9928 0.1
(read/write) 643121 643089 -32 -0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582024 582000 -24 -0.0
.dynamic 560 560 0 0.0
.got 14976 14976 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 436164 438748 2584 0.6
.text 7019108 7026468 7360 0.1
thermostat-no-ble arm64 (read only) 2368620 2368620 0 0.0
(read/write) 175121 175121 0 0.0
.bss 86417 86417 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79376 79376 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146844 146844 0 0.0
.text 1992032 1992032 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2420084 2420084 0 0.0
.bss 205820 205820 0 0.0
.data 5872 5872 0 0.0
.text 1382684 1382684 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1179787 1179787 0 0.0
bss 139680 139680 0 0.0
rodata 151532 151532 0 0.0
text 809856 809856 0 0.0
p6 all-clusters-app default (read/write) 2531536 2531536 0 0.0
.bss 139328 139328 0 0.0
.data 2808 2808 0 0.0
.text 1489800 1489800 0 0.0
light-app default (read/write) 2421592 2421592 0 0.0
.bss 132656 132656 0 0.0
.data 2608 2608 0 0.0
.text 1379856 1379856 0 0.0
lock-app default (read/write) 2431096 2431096 0 0.0
.bss 132472 132472 0 0.0
.data 2568 2568 0 0.0
.text 1389360 1389360 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 806024 806024 0 0.0
bss 72176 72176 0 0.0
noinit 40416 40416 0 0.0
text 572426 572426 0 0.0

@vivien-apple vivien-apple force-pushed the YAML_UpdateSimilatedClusterToUseTLVEncoding branch 2 times, most recently from 8593900 to 3f87d6a Compare May 9, 2022 16:44
@vivien-apple vivien-apple force-pushed the YAML_UpdateSimilatedClusterToUseTLVEncoding branch from 3f87d6a to 98bf3cb Compare May 9, 2022 16:45
@vivien-apple
Copy link
Contributor Author

On a side note, this PR should let us turn on TestSystemCommands on chip-tool-darwin in a separate PR without any other changes that removing the line that disabled it.

@bzbarsky-apple
Copy link
Contributor

fast-tracking test changes that have been up for a while.

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.

3 participants