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 feature map support to window covering cluster #12937

Merged
merged 10 commits into from Dec 14, 2021
Merged

Add feature map support to window covering cluster #12937

merged 10 commits into from Dec 14, 2021

Conversation

ghost
Copy link

@ghost ghost commented Dec 13, 2021

Problem

Currently the HasFeature function in window-covering always returns true. This PR adds real support for feature map

Change overview

  • fix HasFeature
  • fix Features enum
  • fix xml feature map definitions
  • fix impl. for emberAfWindowCoveringClusterStopMotionCallback

Testing

Was not tested yet.

@boring-cyborg boring-cyborg bot added the app label Dec 13, 2021
@ghost ghost requested a review from jmeg-sfy December 13, 2021 13:25
@github-actions
Copy link

github-actions bot commented Dec 13, 2021

PR #12937: Size comparison from c3572d4 to d6cd372

Full report (17 builds for k32w, nrfconnect, qpg, telink)
platform target config section c3572d4 d6cd372 change % change
k32w lighting-app k32w061+se05x+release (read/write) 670436 670436 0 0.0
.bss 73872 73872 0 0.0
.data 1896 1896 0 0.0
.text 588868 588868 0 0.0
lock-app k32w061+debug (read/write) 620372 620372 0 0.0
.bss 72024 72024 0 0.0
.data 1856 1856 0 0.0
.text 540692 540692 0 0.0
shell k32w061+debug (read/write) 625740 625740 0 0.0
.bss 74332 74332 0 0.0
.data 1836 1836 0 0.0
.text 543772 543772 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 907735 907735 0 0.0
bss 116300 116300 0 0.0
rodata 102008 102008 0 0.0
text 613828 613828 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 870803 870803 0 0.0
bss 112648 112648 0 0.0
rodata 93308 93308 0 0.0
text 588572 588572 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 833738 833738 0 0.0
bss 117672 117672 0 0.0
rodata 97268 97268 0 0.0
text 544256 544256 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 880351 880351 0 0.0
bss 113560 113560 0 0.0
rodata 98128 98128 0 0.0
text 593264 593264 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 806606 806606 0 0.0
bss 114972 114972 0 0.0
rodata 93416 93416 0 0.0
text 523784 523784 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497463 497463 0 0.0
bss 51820 51820 0 0.0
rodata 45852 45852 0 0.0
text 339492 339492 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 885303 885303 0 0.0
bss 113472 113472 0 0.0
rodata 99480 99480 0 0.0
text 596868 596868 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 878543 878543 0 0.0
bss 113352 113352 0 0.0
rodata 97616 97616 0 0.0
text 592064 592064 0 0.0
shell nrf52840dk_nrf52840 (read/write) 782427 782427 0 0.0
bss 109624 109624 0 0.0
rodata 74296 74296 0 0.0
text 523996 523996 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 697506 697506 0 0.0
bss 110604 110604 0 0.0
rodata 68940 68940 0 0.0
text 444636 444636 0 0.0
qpg lighting-app qpg6100+debug (read only) 522184 522184 0 0.0
(read/write) 122332 122332 0 0.0
.bss 82712 82712 0 0.0
.data 996 996 0 0.0
.text 516864 516864 0 0.0
lock-app qpg6100+debug (read only) 496564 496564 0 0.0
(read/write) 122336 122336 0 0.0
.bss 81848 81848 0 0.0
.data 952 952 0 0.0
.text 491244 491244 0 0.0
persistent-storage-app qpg6100+debug (read only) 108104 108104 0 0.0
(read/write) 122336 122336 0 0.0
.bss 36160 36160 0 0.0
.data 288 288 0 0.0
.text 102784 102784 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 812282 812282 0 0.0
bss 82864 82864 0 0.0
noinit 37160 37160 0 0.0
text 567284 567284 0 0.0

@github-actions
Copy link

github-actions bot commented Dec 13, 2021

PR #12937: Size comparison from c3572d4 to c3c6487

Increases above 0.2%:

platform target config section c3572d4 c3c6487 change % change
linux thermostat-no-ble arm64 .got 3648 3680 32 0.9
Increases (3 builds for linux, p6)
platform target config section c3572d4 c3c6487 change % change
linux chip-tool-ipv6only arm64 (read only) 6863180 6863300 120 0.0
(read/write) 318737 318881 144 0.0
.bss 51889 51921 32 0.1
.data.rel.ro 208416 208480 64 0.0
.got 53512 53560 48 0.1
.rodata 364988 365028 40 0.0
thermostat-no-ble arm64 (read only) 1954356 1954372 16 0.0
(read/write) 137425 137521 96 0.1
.data.rel.ro 70528 70592 64 0.1
.got 3648 3680 32 0.9
.rodata 125780 125796 16 0.0
p6 all-clusters-app default (read/write) 2361000 2361192 192 0.0
.text 1319264 1319456 192 0.0
Decreases (10 builds for k32w, linux, p6, qpg, telink)
platform target config section c3572d4 c3c6487 change % change
k32w lighting-app k32w061+se05x+release (read/write) 670436 670408 -28 -0.0
.text 588868 588840 -28 -0.0
lock-app k32w061+debug (read/write) 620372 620344 -28 -0.0
.text 540692 540664 -28 -0.0
shell k32w061+debug (read/write) 625740 625712 -28 -0.0
.text 543772 543744 -28 -0.0
linux chip-tool-ipv6only arm64 .text 5817828 5817668 -160 -0.0
thermostat-no-ble arm64 .text 1620464 1620272 -192 -0.0
p6 light-app default (read/write) 2301600 2301568 -32 -0.0
.text 1259864 1259832 -32 -0.0
lock-app default (read/write) 2277672 2277640 -32 -0.0
.text 1235936 1235904 -32 -0.0
qpg lighting-app qpg6100+debug (read only) 522184 522160 -24 -0.0
.text 516864 516840 -24 -0.0
lock-app qpg6100+debug (read only) 496564 496532 -32 -0.0
.text 491244 491212 -32 -0.0
telink lighting-app tlsr9518adk80d (read/write) 812282 812262 -20 -0.0
text 567284 567218 -66 -0.0
Full report (12 builds for k32w, linux, p6, qpg, telink)
platform target config section c3572d4 c3c6487 change % change
k32w lighting-app k32w061+se05x+release (read/write) 670436 670408 -28 -0.0
.bss 73872 73872 0 0.0
.data 1896 1896 0 0.0
.text 588868 588840 -28 -0.0
lock-app k32w061+debug (read/write) 620372 620344 -28 -0.0
.bss 72024 72024 0 0.0
.data 1856 1856 0 0.0
.text 540692 540664 -28 -0.0
shell k32w061+debug (read/write) 625740 625712 -28 -0.0
.bss 74332 74332 0 0.0
.data 1836 1836 0 0.0
.text 543772 543744 -28 -0.0
linux chip-tool-ipv6only arm64 (read only) 6863180 6863300 120 0.0
(read/write) 318737 318881 144 0.0
.bss 51889 51921 32 0.1
.data 1192 1192 0 0.0
.data.rel.ro 208416 208480 64 0.0
.dynamic 560 560 0 0.0
.got 53512 53560 48 0.1
.init 24 24 0 0.0
.init_array 176 176 0 0.0
.rodata 364988 365028 40 0.0
.text 5817828 5817668 -160 -0.0
thermostat-no-ble arm64 (read only) 1954356 1954372 16 0.0
(read/write) 137425 137521 96 0.1
.bss 59537 59537 0 0.0
.data 832 832 0 0.0
.data.rel.ro 70528 70592 64 0.1
.dynamic 560 560 0 0.0
.got 3648 3680 32 0.9
.init 24 24 0 0.0
.init_array 280 280 0 0.0
.rodata 125780 125796 16 0.0
.text 1620464 1620272 -192 -0.0
p6 all-clusters-app default (read/write) 2361000 2361192 192 0.0
.bss 112164 112164 0 0.0
.data 2528 2528 0 0.0
.heap 918648 918648 0 0.0
.text 1319264 1319456 192 0.0
light-app default (read/write) 2301600 2301568 -32 -0.0
.bss 101080 101080 0 0.0
.data 2368 2368 0 0.0
.heap 929896 929896 0 0.0
.text 1259864 1259832 -32 -0.0
lock-app default (read/write) 2277672 2277640 -32 -0.0
.bss 99960 99960 0 0.0
.data 2328 2328 0 0.0
.heap 931056 931056 0 0.0
.text 1235936 1235904 -32 -0.0
qpg lighting-app qpg6100+debug (read only) 522184 522160 -24 -0.0
(read/write) 122332 122332 0 0.0
.bss 82712 82712 0 0.0
.data 996 996 0 0.0
.text 516864 516840 -24 -0.0
lock-app qpg6100+debug (read only) 496564 496532 -32 -0.0
(read/write) 122336 122336 0 0.0
.bss 81848 81848 0 0.0
.data 952 952 0 0.0
.text 491244 491212 -32 -0.0
persistent-storage-app qpg6100+debug (read only) 108104 108104 0 0.0
(read/write) 122336 122336 0 0.0
.bss 36160 36160 0 0.0
.data 288 288 0 0.0
.text 102784 102784 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 812282 812262 -20 -0.0
bss 82864 82864 0 0.0
noinit 37160 37160 0 0.0
text 567284 567218 -66 -0.0

@github-actions
Copy link

github-actions bot commented Dec 13, 2021

PR #12937: Size comparison from c3572d4 to e0fb3c3

Increases above 0.2%:

platform target config section c3572d4 e0fb3c3 change % change
linux thermostat-no-ble arm64 .got 3648 3680 32 0.9
Increases (12 builds for efr32, linux, mbed, nrfconnect, p6)
platform target config section c3572d4 e0fb3c3 change % change
efr32 window-app BRD4161A (read only) 793056 793168 112 0.0
.text 793048 793160 112 0.0
linux chip-tool-ipv6only arm64 (read only) 6863180 6873564 10384 0.2
(read/write) 318737 319201 464 0.1
.bss 51889 51921 32 0.1
.data.rel.ro 208416 208784 368 0.2
.got 53512 53576 64 0.1
.rodata 364988 365692 704 0.2
.text 5817828 5826788 8960 0.2
thermostat-no-ble arm64 (read only) 1954356 1954660 304 0.0
(read/write) 137425 137537 112 0.1
.data.rel.ro 70528 70600 72 0.1
.got 3648 3680 32 0.9
.rodata 125780 125796 16 0.0
.text 1620464 1620512 48 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2314104 2314288 184 0.0
.text 1276680 1276864 184 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 102008 102060 52 0.1
nrf52840dk_nrf52840+rpc rodata 93308 93360 52 0.1
nrf5340dk_nrf5340_cpuapp rodata 97268 97320 52 0.1
lock-app nrf52840dk_nrf52840 rodata 98128 98180 52 0.1
nrf5340dk_nrf5340_cpuapp rodata 93416 93468 52 0.1
pump-app nrf52840dk_nrf52840 rodata 99480 99532 52 0.1
pump-controller-app nrf52840dk_nrf52840 rodata 97616 97668 52 0.1
p6 all-clusters-app default (read/write) 2361000 2361200 200 0.0
.text 1319264 1319464 200 0.0
Decreases (19 builds for efr32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section c3572d4 e0fb3c3 change % change
efr32 lighting-app BRD4161A (read only) 815980 815948 -32 -0.0
.text 815972 815940 -32 -0.0
BRD4161A+rpc (read only) 803612 803580 -32 -0.0
.text 803604 803572 -32 -0.0
k32w lighting-app k32w061+se05x+release (read/write) 670436 670408 -28 -0.0
.text 588868 588840 -28 -0.0
lock-app k32w061+debug (read/write) 620372 620344 -28 -0.0
.text 540692 540664 -28 -0.0
shell k32w061+debug (read/write) 625740 625712 -28 -0.0
.text 543772 543744 -28 -0.0
mbed lighting-app CY8CPROTO_062_4343W+release (read/write) 2309960 2309888 -72 -0.0
.text 1272560 1272488 -72 -0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2283072 2283000 -72 -0.0
.text 1245672 1245600 -72 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 907735 907723 -12 -0.0
text 613828 613756 -72 -0.0
nrf52840dk_nrf52840+rpc (read/write) 870803 870775 -28 -0.0
text 588572 588500 -72 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 833738 833726 -12 -0.0
text 544256 544184 -72 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 880351 880339 -12 -0.0
text 593264 593192 -72 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 806606 806578 -28 -0.0
text 523784 523712 -72 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 885303 885291 -12 -0.0
text 596868 596796 -72 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 878543 878515 -28 -0.0
text 592064 591992 -72 -0.0
p6 light-app default (read/write) 2301600 2301568 -32 -0.0
.text 1259864 1259832 -32 -0.0
lock-app default (read/write) 2277672 2277640 -32 -0.0
.text 1235936 1235904 -32 -0.0
qpg lighting-app qpg6100+debug (read only) 522184 522160 -24 -0.0
.text 516864 516840 -24 -0.0
lock-app qpg6100+debug (read only) 496564 496532 -32 -0.0
.text 491244 491212 -32 -0.0
telink lighting-app tlsr9518adk80d (read/write) 812282 812262 -20 -0.0
text 567284 567218 -66 -0.0
Full report (30 builds for efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section c3572d4 e0fb3c3 change % change
efr32 lighting-app BRD4161A (read only) 815980 815948 -32 -0.0
(read/write) 123152 123152 0 0.0
.bss 121288 121288 0 0.0
.data 1864 1864 0 0.0
.text 815972 815940 -32 -0.0
BRD4161A+rpc (read only) 803612 803580 -32 -0.0
(read/write) 139828 139828 0 0.0
.bss 137864 137864 0 0.0
.data 1964 1964 0 0.0
.text 803604 803572 -32 -0.0
window-app BRD4161A (read only) 793056 793168 112 0.0
(read/write) 122104 122104 0 0.0
.bss 120272 120272 0 0.0
.data 1828 1828 0 0.0
.text 793048 793160 112 0.0
k32w lighting-app k32w061+se05x+release (read/write) 670436 670408 -28 -0.0
.bss 73872 73872 0 0.0
.data 1896 1896 0 0.0
.text 588868 588840 -28 -0.0
lock-app k32w061+debug (read/write) 620372 620344 -28 -0.0
.bss 72024 72024 0 0.0
.data 1856 1856 0 0.0
.text 540692 540664 -28 -0.0
shell k32w061+debug (read/write) 625740 625712 -28 -0.0
.bss 74332 74332 0 0.0
.data 1836 1836 0 0.0
.text 543772 543744 -28 -0.0
linux chip-tool-ipv6only arm64 (read only) 6863180 6873564 10384 0.2
(read/write) 318737 319201 464 0.1
.bss 51889 51921 32 0.1
.data 1192 1192 0 0.0
.data.rel.ro 208416 208784 368 0.2
.dynamic 560 560 0 0.0
.got 53512 53576 64 0.1
.init 24 24 0 0.0
.init_array 176 176 0 0.0
.rodata 364988 365692 704 0.2
.text 5817828 5826788 8960 0.2
thermostat-no-ble arm64 (read only) 1954356 1954660 304 0.0
(read/write) 137425 137537 112 0.1
.bss 59537 59537 0 0.0
.data 832 832 0 0.0
.data.rel.ro 70528 70600 72 0.1
.dynamic 560 560 0 0.0
.got 3648 3680 32 0.9
.init 24 24 0 0.0
.init_array 280 280 0 0.0
.rodata 125780 125796 16 0.0
.text 1620464 1620512 48 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2314104 2314288 184 0.0
.bss 183964 183964 0 0.0
.data 5240 5240 0 0.0
.heap 847240 847240 0 0.0
.text 1276680 1276864 184 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2309960 2309888 -72 -0.0
.bss 175824 175824 0 0.0
.data 5536 5536 0 0.0
.heap 855088 855088 0 0.0
.text 1272560 1272488 -72 -0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2283072 2283000 -72 -0.0
.bss 174864 174864 0 0.0
.data 5528 5528 0 0.0
.heap 856056 856056 0 0.0
.text 1245672 1245600 -72 -0.0
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 4376 4376 0 0.0
.heap 1020312 1020312 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2053944 2053944 0 0.0
.bss 156980 156980 0 0.0
.data 4864 4864 0 0.0
.heap 874600 874600 0 0.0
.text 1016544 1016544 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 907735 907723 -12 -0.0
bss 116300 116300 0 0.0
rodata 102008 102060 52 0.1
text 613828 613756 -72 -0.0
nrf52840dk_nrf52840+rpc (read/write) 870803 870775 -28 -0.0
bss 112648 112648 0 0.0
rodata 93308 93360 52 0.1
text 588572 588500 -72 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 833738 833726 -12 -0.0
bss 117672 117672 0 0.0
rodata 97268 97320 52 0.1
text 544256 544184 -72 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 880351 880339 -12 -0.0
bss 113560 113560 0 0.0
rodata 98128 98180 52 0.1
text 593264 593192 -72 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 806606 806578 -28 -0.0
bss 114972 114972 0 0.0
rodata 93416 93468 52 0.1
text 523784 523712 -72 -0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497463 497463 0 0.0
bss 51820 51820 0 0.0
rodata 45852 45852 0 0.0
text 339492 339492 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 885303 885291 -12 -0.0
bss 113472 113472 0 0.0
rodata 99480 99532 52 0.1
text 596868 596796 -72 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 878543 878515 -28 -0.0
bss 113352 113352 0 0.0
rodata 97616 97668 52 0.1
text 592064 591992 -72 -0.0
shell nrf52840dk_nrf52840 (read/write) 782427 782427 0 0.0
bss 109624 109624 0 0.0
rodata 74296 74296 0 0.0
text 523996 523996 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 697506 697506 0 0.0
bss 110604 110604 0 0.0
rodata 68940 68940 0 0.0
text 444636 444636 0 0.0
p6 all-clusters-app default (read/write) 2361000 2361200 200 0.0
.bss 112164 112164 0 0.0
.data 2528 2528 0 0.0
.heap 918648 918648 0 0.0
.text 1319264 1319464 200 0.0
light-app default (read/write) 2301600 2301568 -32 -0.0
.bss 101080 101080 0 0.0
.data 2368 2368 0 0.0
.heap 929896 929896 0 0.0
.text 1259864 1259832 -32 -0.0
lock-app default (read/write) 2277672 2277640 -32 -0.0
.bss 99960 99960 0 0.0
.data 2328 2328 0 0.0
.heap 931056 931056 0 0.0
.text 1235936 1235904 -32 -0.0
qpg lighting-app qpg6100+debug (read only) 522184 522160 -24 -0.0
(read/write) 122332 122332 0 0.0
.bss 82712 82712 0 0.0
.data 996 996 0 0.0
.text 516864 516840 -24 -0.0
lock-app qpg6100+debug (read only) 496564 496532 -32 -0.0
(read/write) 122336 122336 0 0.0
.bss 81848 81848 0 0.0
.data 952 952 0 0.0
.text 491244 491212 -32 -0.0
persistent-storage-app qpg6100+debug (read only) 108104 108104 0 0.0
(read/write) 122336 122336 0 0.0
.bss 36160 36160 0 0.0
.data 288 288 0 0.0
.text 102784 102784 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 812282 812262 -20 -0.0
bss 82864 82864 0 0.0
noinit 37160 37160 0 0.0
text 567284 567218 -66 -0.0

@andy31415 andy31415 merged commit 8e0a8fa into project-chip:master Dec 14, 2021
return true;
uint32_t FeatureMap = 0;
if (EMBER_ZCL_STATUS_SUCCESS ==
emberAfReadServerAttribute(endpoint, chip::app::Clusters::WindowCovering::Id,
Copy link
Contributor

Choose a reason for hiding this comment

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

@eve-cxrp For future reference, please do not use emberAfReadServerAttribute. Use the Accessors functions, that make sure you're using the right type and whatnot, instead of easy-to-mess-up reinterpret_cast.

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