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

Implement event support for switch cluster #13036

Merged
merged 1 commit into from
Dec 15, 2021
Merged

Implement event support for switch cluster #13036

merged 1 commit into from
Dec 15, 2021

Conversation

yufengwangca
Copy link
Contributor

Problem

What is being fixed? Examples:

  • Currently, no event support for Switch cluster in SDK

Change overview

Implement event support for switch cluster

Testing

How was this tested? (at least one bullet point required)

  • In Linux simulation, confirm the SwitchLatched event is correctly logged when event occurs on the platform
[1639584214.918494][45157:45157] CHIP:DL: Caught signal 12
[1639584214.918592][45157:45157] CHIP:DL: PlatformManagerImpl:HandleSwitchEvent
[1639584214.918648][45157:45157] CHIP:ZCL: SwitchDelegate: OnSwitchLatched
[1639584214.918746][45157:45157] CHIP:EVL: LogEvent event number: 0x0000000000060000 schema priority: 1, endpoint id:  0x0 cluster id: 0x0000_003B event id: 0x0 Sys timestamp: 0x0000000003A55321

@github-actions
Copy link

PR #13036: Size comparison from 8f15eea to 03f689e

Increases above 0.2%:

platform target config section 8f15eea 03f689e change % change
k32w lighting-app k32w061+se05x+release (read/write) 688692 691052 2360 0.3
.data 1900 1908 8 0.4
.text 601648 604000 2352 0.4
p6 all-clusters-app default .text 1348944 1352768 3824 0.3
light-app default .data 2376 2384 8 0.3
.text 1289232 1293064 3832 0.3
qpg lighting-app qpg6105+debug (read only) 533384 536064 2680 0.5
.data 996 1004 8 0.8
.text 528064 530744 2680 0.5
Increases (6 builds for k32w, linux, p6, qpg)
platform target config section 8f15eea 03f689e change % change
k32w lighting-app k32w061+se05x+release (read/write) 688692 691052 2360 0.3
.data 1900 1908 8 0.4
.text 601648 604000 2352 0.4
linux chip-tool-ipv6only arm64 (read only) 6978884 6979436 552 0.0
(read/write) 324593 324609 16 0.0
.bss 55889 55905 16 0.0
.got 55512 55520 8 0.0
.rodata 376292 376332 40 0.0
.text 5916548 5917044 496 0.0
thermostat-no-ble arm64 (read only) 2007996 2008532 536 0.0
(read/write) 145281 145297 16 0.0
.bss 65633 65649 16 0.0
.rodata 128012 128068 56 0.0
.text 1668448 1668928 480 0.0
p6 all-clusters-app default (read/write) 2390680 2394504 3824 0.2
.text 1348944 1352768 3824 0.3
light-app default (read/write) 2330968 2334800 3832 0.2
.data 2376 2384 8 0.3
.text 1289232 1293064 3832 0.3
qpg lighting-app qpg6105+debug (read only) 533384 536064 2680 0.5
.data 996 1004 8 0.8
.text 528064 530744 2680 0.5
Decreases (1 build for p6)
platform target config section 8f15eea 03f689e change % change
p6 light-app default .heap 923520 923512 -8 -0.0
Full report (11 builds for k32w, linux, p6, qpg)
platform target config section 8f15eea 03f689e change % change
k32w lock-app k32w061+debug (read/write) 638616 638616 0 0.0
.bss 77496 77496 0 0.0
.data 1860 1860 0 0.0
.text 553460 553460 0 0.0
shell k32w061+debug (read/write) 644020 644020 0 0.0
.bss 79804 79804 0 0.0
.data 1840 1840 0 0.0
.text 556576 556576 0 0.0
lighting-app k32w061+se05x+release (read/write) 688692 691052 2360 0.3
.bss 79344 79344 0 0.0
.data 1900 1908 8 0.4
.text 601648 604000 2352 0.4
linux chip-tool-ipv6only arm64 (read only) 6978884 6979436 552 0.0
(read/write) 324593 324609 16 0.0
.bss 55889 55905 16 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208392 208392 0 0.0
.dynamic 560 560 0 0.0
.got 55512 55520 8 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 376292 376332 40 0.0
.text 5916548 5917044 496 0.0
thermostat-no-ble arm64 (read only) 2007996 2008532 536 0.0
(read/write) 145281 145297 16 0.0
.bss 65633 65649 16 0.0
.data 832 832 0 0.0
.data.rel.ro 72080 72080 0 0.0
.dynamic 560 560 0 0.0
.got 3840 3840 0 0.0
.init 24 24 0 0.0
.init_array 288 288 0 0.0
.rodata 128012 128068 56 0.0
.text 1668448 1668928 480 0.0
p6 all-clusters-app default (read/write) 2390680 2394504 3824 0.2
.bss 118532 118532 0 0.0
.data 2536 2536 0 0.0
.heap 912272 912272 0 0.0
.text 1348944 1352768 3824 0.3
light-app default (read/write) 2330968 2334800 3832 0.2
.bss 107448 107448 0 0.0
.data 2376 2384 8 0.3
.heap 923520 923512 -8 -0.0
.text 1289232 1293064 3832 0.3
lock-app default (read/write) 2307032 2307032 0 0.0
.bss 106328 106328 0 0.0
.data 2336 2336 0 0.0
.heap 924680 924680 0 0.0
.text 1265296 1265296 0 0.0
qpg lighting-app qpg6105+debug (read only) 533384 536064 2680 0.5
(read/write) 146936 146936 0 0.0
.bss 88096 88096 0 0.0
.data 996 1004 8 0.8
.text 528064 530744 2680 0.5
lock-app qpg6105+debug (read only) 507752 507752 0 0.0
(read/write) 146940 146940 0 0.0
.bss 87232 87232 0 0.0
.data 952 952 0 0.0
.text 502432 502432 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0

@dhrishi
Copy link
Contributor

dhrishi commented Dec 15, 2021

Hi @yufengwangca Can you please mention the chiptool command used to subscribe to SwitchLatched event in the Testing section?

@github-actions
Copy link

github-actions bot commented Dec 15, 2021

PR #13036: Size comparison from 8f15eea to 7987593

Increases above 0.2%:

platform target config section 8f15eea 7987593 change % change
efr32 lighting-app BRD4161A (read only) 836648 840496 3848 0.5
.data 1868 1876 8 0.4
.text 836640 840488 3848 0.5
BRD4161A+rpc (read only) 824236 828084 3848 0.5
.data 1968 1976 8 0.4
.text 824228 828076 3848 0.5
esp32 all-clusters-app c3devkit (read only) 878096 880034 1938 0.2
.flash.rodata 175104 175912 808 0.5
.flash.text 878096 880034 1938 0.2
m5stack .flash.rodata 211332 212116 784 0.4
k32w lighting-app k32w061+se05x+release (read/write) 688692 691052 2360 0.3
.data 1900 1908 8 0.4
.text 601648 604000 2352 0.4
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 924271 926975 2704 0.3
rodata 103616 104424 808 0.8
text 625200 627076 1876 0.3
nrf52840dk_nrf52840+rpc (read/write) 887311 890015 2704 0.3
rodata 94912 95720 808 0.9
text 599940 601812 1872 0.3
nrf5340dk_nrf5340_cpuapp (read/write) 850286 852966 2680 0.3
rodata 98872 99680 808 0.8
text 555640 557512 1872 0.3
p6 all-clusters-app default .text 1348944 1352768 3824 0.3
light-app default .data 2376 2384 8 0.3
.text 1289232 1293064 3832 0.3
qpg lighting-app qpg6105+debug (read only) 533384 536064 2680 0.5
.data 996 1004 8 0.8
.text 528064 530744 2680 0.5
telink lighting-app tlsr9518adk80d (read/write) 833650 836478 2828 0.3
text 581342 583330 1988 0.3
Increases (20 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8f15eea 7987593 change % change
efr32 lighting-app BRD4161A (read only) 836648 840496 3848 0.5
(read/write) 128632 128640 8 0.0
.data 1868 1876 8 0.4
.text 836640 840488 3848 0.5
BRD4161A+rpc (read only) 824236 828084 3848 0.5
(read/write) 145304 145312 8 0.0
.data 1968 1976 8 0.4
.text 824228 828076 3848 0.5
esp32 all-clusters-app c3devkit (read only) 878096 880034 1938 0.2
(read/write) 1313442 1314250 808 0.1
.flash.rodata 175104 175912 808 0.5
.flash.text 878096 880034 1938 0.2
m5stack (read only) 966023 967775 1752 0.2
(read/write) 454720 455512 792 0.2
.dram0.data 34048 34056 8 0.0
.flash.rodata 211332 212116 784 0.4
.flash.text 960639 962391 1752 0.2
k32w lighting-app k32w061+se05x+release (read/write) 688692 691052 2360 0.3
.data 1900 1908 8 0.4
.text 601648 604000 2352 0.4
linux chip-tool-ipv6only arm64 (read only) 6978884 6979436 552 0.0
(read/write) 324593 324609 16 0.0
.bss 55889 55905 16 0.0
.got 55512 55520 8 0.0
.rodata 376292 376332 40 0.0
.text 5916548 5917044 496 0.0
thermostat-no-ble arm64 (read only) 2007996 2008532 536 0.0
(read/write) 145281 145297 16 0.0
.bss 65633 65649 16 0.0
.rodata 128012 128068 56 0.0
.text 1668448 1668928 480 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2336048 2338688 2640 0.1
.data 5248 5256 8 0.2
.text 1298624 1301264 2640 0.2
lighting-app CY8CPROTO_062_4343W+release (read/write) 2331592 2334256 2664 0.1
.text 1294192 1296856 2664 0.2
lock-app CY8CPROTO_062_4343W+release (read/write) 2304648 2307288 2640 0.1
.data 5528 5536 8 0.1
.text 1267248 1269888 2640 0.2
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 924271 926975 2704 0.3
rodata 103616 104424 808 0.8
text 625200 627076 1876 0.3
nrf52840dk_nrf52840+rpc (read/write) 887311 890015 2704 0.3
bss 116200 116204 4 0.0
rodata 94912 95720 808 0.9
text 599940 601812 1872 0.3
nrf5340dk_nrf5340_cpuapp (read/write) 850286 852966 2680 0.3
bss 121224 121228 4 0.0
rodata 98872 99680 808 0.8
text 555640 557512 1872 0.3
lock-app nrf52840dk_nrf52840 bss 119028 119032 4 0.0
pump-app nrf52840dk_nrf52840 bss 118940 118944 4 0.0
pump-controller-app nrf52840dk_nrf52840 bss 118820 118824 4 0.0
p6 all-clusters-app default (read/write) 2390680 2394504 3824 0.2
.text 1348944 1352768 3824 0.3
light-app default (read/write) 2330968 2334800 3832 0.2
.data 2376 2384 8 0.3
.text 1289232 1293064 3832 0.3
qpg lighting-app qpg6105+debug (read only) 533384 536064 2680 0.5
.data 996 1004 8 0.8
.text 528064 530744 2680 0.5
telink lighting-app tlsr9518adk80d (read/write) 833650 836478 2828 0.3
text 581342 583330 1988 0.3
Decreases (3 builds for mbed, p6)
platform target config section 8f15eea 7987593 change % change
mbed all-clusters-app CY8CPROTO_062_4343W+release .heap 840864 840856 -8 -0.0
lock-app CY8CPROTO_062_4343W+release .heap 849688 849680 -8 -0.0
p6 light-app default .heap 923520 923512 -8 -0.0
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8f15eea 7987593 change % change
efr32 lighting-app BRD4161A (read only) 836648 840496 3848 0.5
(read/write) 128632 128640 8 0.0
.bss 126760 126760 0 0.0
.data 1868 1876 8 0.4
.text 836640 840488 3848 0.5
BRD4161A+rpc (read only) 824236 828084 3848 0.5
(read/write) 145304 145312 8 0.0
.bss 143336 143336 0 0.0
.data 1968 1976 8 0.4
.text 824228 828076 3848 0.5
window-app BRD4161A (read only) 813872 813872 0 0.0
(read/write) 127576 127576 0 0.0
.bss 125744 125744 0 0.0
.data 1832 1832 0 0.0
.text 813864 813864 0 0.0
esp32 all-clusters-app c3devkit (read only) 878096 880034 1938 0.2
(read/write) 1313442 1314250 808 0.1
.dram0.bss 71080 71080 0 0.0
.dram0.data 14212 14212 0 0.0
.flash.rodata 175104 175912 808 0.5
.flash.text 878096 880034 1938 0.2
.iram0.text 62076 62076 0 0.0
m5stack (read only) 966023 967775 1752 0.2
(read/write) 454720 455512 792 0.2
.dram0.bss 77552 77552 0 0.0
.dram0.data 34048 34056 8 0.0
.flash.rodata 211332 212116 784 0.4
.flash.text 960639 962391 1752 0.2
.iram0.text 123451 123451 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 688692 691052 2360 0.3
.bss 79344 79344 0 0.0
.data 1900 1908 8 0.4
.text 601648 604000 2352 0.4
lock-app k32w061+debug (read/write) 638616 638616 0 0.0
.bss 77496 77496 0 0.0
.data 1860 1860 0 0.0
.text 553460 553460 0 0.0
shell k32w061+debug (read/write) 644020 644020 0 0.0
.bss 79804 79804 0 0.0
.data 1840 1840 0 0.0
.text 556576 556576 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6978884 6979436 552 0.0
(read/write) 324593 324609 16 0.0
.bss 55889 55905 16 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208392 208392 0 0.0
.dynamic 560 560 0 0.0
.got 55512 55520 8 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 376292 376332 40 0.0
.text 5916548 5917044 496 0.0
thermostat-no-ble arm64 (read only) 2007996 2008532 536 0.0
(read/write) 145281 145297 16 0.0
.bss 65633 65649 16 0.0
.data 832 832 0 0.0
.data.rel.ro 72080 72080 0 0.0
.dynamic 560 560 0 0.0
.got 3840 3840 0 0.0
.init 24 24 0 0.0
.init_array 288 288 0 0.0
.rodata 128012 128068 56 0.0
.text 1668448 1668928 480 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2336048 2338688 2640 0.1
.bss 190332 190332 0 0.0
.data 5248 5256 8 0.2
.heap 840864 840856 -8 -0.0
.text 1298624 1301264 2640 0.2
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2331592 2334256 2664 0.1
.bss 182192 182192 0 0.0
.data 5544 5544 0 0.0
.heap 848712 848712 0 0.0
.text 1294192 1296856 2664 0.2
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2304648 2307288 2640 0.1
.bss 181232 181232 0 0.0
.data 5528 5536 8 0.1
.heap 849688 849680 -8 -0.0
.text 1267248 1269888 2640 0.2
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.heap 1020320 1020320 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054328 2054328 0 0.0
.bss 156980 156980 0 0.0
.data 4864 4864 0 0.0
.heap 874600 874600 0 0.0
.text 1016928 1016928 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 924271 926975 2704 0.3
bss 119852 119852 0 0.0
rodata 103616 104424 808 0.8
text 625200 627076 1876 0.3
nrf52840dk_nrf52840+rpc (read/write) 887311 890015 2704 0.3
bss 116200 116204 4 0.0
rodata 94912 95720 808 0.9
text 599940 601812 1872 0.3
nrf5340dk_nrf5340_cpuapp (read/write) 850286 852966 2680 0.3
bss 121224 121228 4 0.0
rodata 98872 99680 808 0.8
text 555640 557512 1872 0.3
lock-app nrf52840dk_nrf52840 (read/write) 899011 899011 0 0.0
bss 119028 119032 4 0.0
rodata 99732 99732 0 0.0
text 604844 604844 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 825270 825270 0 0.0
bss 120440 120440 0 0.0
rodata 95024 95024 0 0.0
text 535372 535372 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497447 497447 0 0.0
bss 51820 51820 0 0.0
rodata 45852 45852 0 0.0
text 339488 339488 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 903967 903967 0 0.0
bss 118940 118944 4 0.0
rodata 101088 101088 0 0.0
text 608444 608444 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 897207 897207 0 0.0
bss 118820 118824 4 0.0
rodata 99224 99224 0 0.0
text 603644 603644 0 0.0
shell nrf52840dk_nrf52840 (read/write) 782767 782767 0 0.0
bss 109624 109624 0 0.0
rodata 74396 74396 0 0.0
text 524232 524232 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 697838 697838 0 0.0
bss 110604 110604 0 0.0
rodata 69040 69040 0 0.0
text 444868 444868 0 0.0
p6 all-clusters-app default (read/write) 2390680 2394504 3824 0.2
.bss 118532 118532 0 0.0
.data 2536 2536 0 0.0
.heap 912272 912272 0 0.0
.text 1348944 1352768 3824 0.3
light-app default (read/write) 2330968 2334800 3832 0.2
.bss 107448 107448 0 0.0
.data 2376 2384 8 0.3
.heap 923520 923512 -8 -0.0
.text 1289232 1293064 3832 0.3
lock-app default (read/write) 2307032 2307032 0 0.0
.bss 106328 106328 0 0.0
.data 2336 2336 0 0.0
.heap 924680 924680 0 0.0
.text 1265296 1265296 0 0.0
qpg lighting-app qpg6105+debug (read only) 533384 536064 2680 0.5
(read/write) 146936 146936 0 0.0
.bss 88096 88096 0 0.0
.data 996 1004 8 0.8
.text 528064 530744 2680 0.5
lock-app qpg6105+debug (read only) 507752 507752 0 0.0
(read/write) 146940 146940 0 0.0
.bss 87232 87232 0 0.0
.data 952 952 0 0.0
.text 502432 502432 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 833650 836478 2828 0.3
bss 88336 88336 0 0.0
noinit 37160 37160 0 0.0
text 581342 583330 1988 0.3

@yufengwangca
Copy link
Contributor Author

Hi @yufengwangca Can you please mention the chiptool command used to subscribe to SwitchLatched event in the Testing section?

No support yet, this PR is about event integration on the server side

@yufengwangca yufengwangca merged commit 89aff25 into project-chip:master Dec 15, 2021
@yufengwangca yufengwangca deleted the pr/swtich/event branch December 15, 2021 19:31
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.

4 participants