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

Update darwin CHIPDevice API #16244

Conversation

kpark-apple
Copy link
Contributor

Problem

Change overview

Update Darwin CHIPDevice generic read/write/command/subscribe API.

  • Use NSNumber parameters instead of NSUInteger params
  • Add CHIPReadParams/CHIPSubscribeParams
  • Fix subscribe interval params
  • Add timedWriteTimeout and timedInvokeTimeout params

Testing

  • Tests were updated to test the modified API.

@github-actions
Copy link

github-actions bot commented Mar 15, 2022

PR #16244: Size comparison from 85b4e5c to d5e2d5c

Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 85b4e5c d5e2d5c change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602562 602562 0 0.0
.app_xip_area 509668 509668 0 0.0
.bss 75648 75648 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560422 560422 0 0.0
.app_xip_area 469056 469056 0 0.0
.bss 74152 74152 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570490 570490 0 0.0
.app_xip_area 469476 469476 0 0.0
.bss 83456 83456 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 919700 919700 0 0.0
(read/write) 128752 128752 0 0.0
.bss 126744 126744 0 0.0
.data 2008 2008 0 0.0
.text 919692 919692 0 0.0
BRD4161A+rpc (read only) 948488 948488 0 0.0
(read/write) 144712 144712 0 0.0
.bss 142520 142520 0 0.0
.data 2188 2188 0 0.0
.text 948480 948480 0 0.0
window-app BRD4161A (read only) 850456 850456 0 0.0
(read/write) 126712 126712 0 0.0
.bss 124848 124848 0 0.0
.data 1864 1864 0 0.0
.text 850448 850448 0 0.0
esp32 all-clusters-app c3devkit (read only) 961466 961466 0 0.0
(read/write) 1394978 1394978 0 0.0
.dram0.bss 64056 64056 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 197816 197816 0 0.0
.flash.text 961466 961466 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1016983 1016983 0 0.0
(read/write) 462188 462188 0 0.0
.dram0.bss 69576 69576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 226760 226760 0 0.0
.flash.text 1011599 1011599 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 699324 699324 0 0.0
.bss 77624 77624 0 0.0
.data 1888 1888 0 0.0
.text 614012 614012 0 0.0
lock k32w061+release (read/write) 699628 699628 0 0.0
.bss 77616 77616 0 0.0
.data 1908 1908 0 0.0
.text 614304 614304 0 0.0
linux all-clusters-app debug (read only) 2465449 2465449 0 0.0
(read/write) 146352 146352 0 0.0
.bss 60640 60640 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78728 78728 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 210757 210757 0 0.0
.text 2091458 2091458 0 0.0
bridge-app debug+rpc (read only) 1750077 1750077 0 0.0
(read/write) 92912 92912 0 0.0
.bss 47752 47752 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 38128 38128 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 143372 143372 0 0.0
.text 1491157 1491157 0 0.0
chip-tool debug (read only) 10095789 10095789 0 0.0
(read/write) 357680 357680 0 0.0
.bss 25696 25696 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 324864 324864 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 515189 515189 0 0.0
.text 8799349 8799349 0 0.0
chip-tool-ipv6only arm64 (read only) 9728724 9728724 0 0.0
(read/write) 475441 475441 0 0.0
.bss 44017 44017 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371232 371232 0 0.0
.dynamic 560 560 0 0.0
.got 55264 55264 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492252 492252 0 0.0
.text 8186596 8186596 0 0.0
door-lock-app debug (read only) 1984609 1984609 0 0.0
(read/write) 119776 119776 0 0.0
.bss 50944 50944 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62456 62456 0 0.0
.dynamic 592 592 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 178460 178460 0 0.0
.text 1657250 1657250 0 0.0
lighting-app debug+rpc (read only) 2116185 2116185 0 0.0
(read/write) 125160 125160 0 0.0
.bss 51776 51776 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 66408 66408 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 171004 171004 0 0.0
.text 1789266 1789266 0 0.0
ota-provider-app debug (read only) 1919673 1919673 0 0.0
(read/write) 115568 115568 0 0.0
.bss 50848 50848 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 57816 57816 0 0.0
.dynamic 608 608 0 0.0
.got 4360 4360 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 164491 164491 0 0.0
.text 1604178 1604178 0 0.0
ota-requestor-app debug (read only) 1949473 1949473 0 0.0
(read/write) 118568 118568 0 0.0
.bss 51840 51840 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 59880 59880 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 160516 160516 0 0.0
.text 1637730 1637730 0 0.0
shell debug (read only) 2411593 2411593 0 0.0
(read/write) 150184 150184 0 0.0
.bss 70600 70600 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73088 73088 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 207538 207538 0 0.0
.text 2047906 2047906 0 0.0
thermostat-no-ble arm64 (read only) 2207484 2207484 0 0.0
(read/write) 149377 149377 0 0.0
.bss 65649 65649 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75368 75368 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 136828 136828 0 0.0
.text 1851344 1851344 0 0.0
tv-app debug (read only) 2656433 2656433 0 0.0
(read/write) 250776 250776 0 0.0
.bss 167840 167840 0 0.0
.data 3104 3104 0 0.0
.data.rel.ro 73800 73800 0 0.0
.dynamic 592 592 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 204277 204277 0 0.0
.text 2278098 2278098 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352692 2352692 0 0.0
.bss 186652 186652 0 0.0
.data 5752 5752 0 0.0
.text 1315292 1315292 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1154071 1154071 0 0.0
bss 146724 146724 0 0.0
rodata 145272 145272 0 0.0
text 786916 786916 0 0.0
p6 all-clusters-app default (read/write) 2492136 2492136 0 0.0
.bss 120080 120080 0 0.0
.data 2632 2632 0 0.0
.text 1450400 1450400 0 0.0
light-app default (read/write) 2395984 2395984 0 0.0
.bss 113544 113544 0 0.0
.data 2488 2488 0 0.0
.text 1354248 1354248 0 0.0
lock-app default (read/write) 2359528 2359528 0 0.0
.bss 113288 113288 0 0.0
.data 2448 2448 0 0.0
.text 1317792 1317792 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 893762 893762 0 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 631860 631860 0 0.0

src/darwin/Framework/CHIP/CHIPAttributeCacheContainer.mm Outdated Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDevice.h Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDevice.mm Outdated Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDevice.mm Outdated Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDevice.mm Outdated Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDevice.mm Outdated Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDevice.mm Outdated Show resolved Hide resolved
src/darwin/Framework/CHIP/CHIPDeviceController+XPC.m Outdated Show resolved Hide resolved
* Use NSNumber parameters instead of NSUInteger params
* Add CHIPReadParams/CHIPSubscribeParams
* Fix subscribe interval params
* Add timedWriteTimeout and timedInvokeTimeout params
@kpark-apple kpark-apple force-pushed the fix/kpark/20220310-chipdevice-request-api branch from d5e2d5c to 196d5d9 Compare March 16, 2022 16:22
@github-actions
Copy link

github-actions bot commented Mar 16, 2022

PR #16244: Size comparison from 645b03b to 196d5d9

Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 645b03b 196d5d9 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603282 603282 0 0.0
.app_xip_area 510380 510380 0 0.0
.bss 75656 75656 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 561070 561070 0 0.0
.app_xip_area 469696 469696 0 0.0
.bss 74160 74160 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570954 570954 0 0.0
.app_xip_area 469932 469932 0 0.0
.bss 83464 83464 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 920740 920740 0 0.0
(read/write) 128752 128752 0 0.0
.bss 126744 126744 0 0.0
.data 2008 2008 0 0.0
.text 920732 920732 0 0.0
BRD4161A+rpc (read only) 949544 949544 0 0.0
(read/write) 144712 144712 0 0.0
.bss 142520 142520 0 0.0
.data 2188 2188 0 0.0
.text 949536 949536 0 0.0
window-app BRD4161A (read only) 851488 851488 0 0.0
(read/write) 126712 126712 0 0.0
.bss 124848 124848 0 0.0
.data 1864 1864 0 0.0
.text 851480 851480 0 0.0
esp32 all-clusters-app c3devkit (read only) 961162 961162 0 0.0
(read/write) 1394690 1394690 0 0.0
.dram0.bss 64048 64048 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 197544 197544 0 0.0
.flash.text 961162 961162 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1017251 1017251 0 0.0
(read/write) 462364 462364 0 0.0
.dram0.bss 69576 69576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 226936 226936 0 0.0
.flash.text 1011867 1011867 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 699960 699960 0 0.0
.bss 77632 77632 0 0.0
.data 1888 1888 0 0.0
.text 614640 614640 0 0.0
lock k32w061+release (read/write) 700256 700256 0 0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 614924 614924 0 0.0
linux all-clusters-app debug (read only) 2471121 2471121 0 0.0
(read/write) 146544 146544 0 0.0
.bss 60736 60736 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78808 78808 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 210853 210853 0 0.0
.text 2096914 2096914 0 0.0
bridge-app debug+rpc (read only) 1747453 1747453 0 0.0
(read/write) 92720 92720 0 0.0
.bss 47784 47784 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 37904 37904 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 143564 143564 0 0.0
.text 1488773 1488773 0 0.0
chip-tool debug (read only) 10127373 10127373 0 0.0
(read/write) 357720 357720 0 0.0
.bss 25728 25728 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 324864 324864 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 515669 515669 0 0.0
.text 8830373 8830373 0 0.0
chip-tool-ipv6only arm64 (read only) 9754132 9754132 0 0.0
(read/write) 475473 475473 0 0.0
.bss 44033 44033 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371256 371256 0 0.0
.dynamic 560 560 0 0.0
.got 55264 55264 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492348 492348 0 0.0
.text 8211892 8211892 0 0.0
door-lock-app debug (read only) 1998585 1998585 0 0.0
(read/write) 120192 120192 0 0.0
.bss 51008 51008 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62808 62808 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 179740 179740 0 0.0
.text 1669282 1669282 0 0.0
lighting-app debug+rpc (read only) 2130201 2130201 0 0.0
(read/write) 125512 125512 0 0.0
.bss 51776 51776 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 66760 66760 0 0.0
.dynamic 608 608 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 172316 172316 0 0.0
.text 1801298 1801298 0 0.0
ota-provider-app debug (read only) 1933633 1933633 0 0.0
(read/write) 116016 116016 0 0.0
.bss 50912 50912 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 58168 58168 0 0.0
.dynamic 608 608 0 0.0
.got 4376 4376 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 165739 165739 0 0.0
.text 1616226 1616226 0 0.0
ota-requestor-app debug (read only) 1963417 1963417 0 0.0
(read/write) 118984 118984 0 0.0
.bss 51904 51904 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 60232 60232 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 161764 161764 0 0.0
.text 1649762 1649762 0 0.0
shell debug (read only) 2421345 2421345 0 0.0
(read/write) 150600 150600 0 0.0
.bss 70664 70664 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73440 73440 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 208850 208850 0 0.0
.text 2055890 2055890 0 0.0
thermostat-no-ble arm64 (read only) 2219868 2219868 0 0.0
(read/write) 149777 149777 0 0.0
.bss 65713 65713 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75696 75696 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 137660 137660 0 0.0
.text 1862240 1862240 0 0.0
tv-app debug (read only) 2669889 2669889 0 0.0
(read/write) 251192 251192 0 0.0
.bss 167904 167904 0 0.0
.data 3104 3104 0 0.0
.data.rel.ro 74152 74152 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 205621 205621 0 0.0
.text 2289538 2289538 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352172 2352172 0 0.0
.bss 186644 186644 0 0.0
.data 5752 5752 0 0.0
.text 1314772 1314772 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1154647 1154647 0 0.0
bss 146724 146724 0 0.0
rodata 145432 145432 0 0.0
text 787340 787340 0 0.0
p6 all-clusters-app default (read/write) 2491392 2491392 0 0.0
.bss 120072 120072 0 0.0
.data 2632 2632 0 0.0
.text 1449656 1449656 0 0.0
light-app default (read/write) 2395248 2395248 0 0.0
.bss 113536 113536 0 0.0
.data 2488 2488 0 0.0
.text 1353512 1353512 0 0.0
lock-app default (read/write) 2358792 2358792 0 0.0
.bss 113280 113280 0 0.0
.data 2448 2448 0 0.0
.text 1317056 1317056 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 894566 894566 0 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 632492 632492 0 0.0

@woody-apple
Copy link
Contributor

Fast tracking platform changes

@woody-apple woody-apple merged commit a72ab9b into project-chip:master Mar 21, 2022
@kpark-apple kpark-apple deleted the fix/kpark/20220310-chipdevice-request-api branch March 21, 2022 19:48
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
* Use NSNumber parameters instead of NSUInteger params
* Add CHIPReadParams/CHIPSubscribeParams
* Fix subscribe interval params
* Add timedWriteTimeout and timedInvokeTimeout params
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