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

[TC-SWTCH]: Add capability to adjust the state of the the switch position #21144

Merged
merged 1 commit into from
Jul 25, 2022
Merged

[TC-SWTCH]: Add capability to adjust the state of the the switch position #21144

merged 1 commit into from
Jul 25, 2022

Conversation

yufengwangca
Copy link
Contributor

@yufengwangca yufengwangca commented Jul 24, 2022

Problem

What is being fixed? Examples:

  • To verify the latching and Momentary switch state as explained in the test case TC-SWTCH-3.2, we need a way to modify the state of the switch will be helpful to verify this simulated functionality.

  • currently test case expects to change the state of the switch from 0 to 1 and vice versa and expects to read the attribute. As of now there is no provision to change the change the state of the switch. Hence requesting for a way to verify this functionality.

  • For test case TC-SWTCH-2.2 - Also needs a method change the switch position and returns to the existing position.
    For ex: The test steps needs to operate the switch and release the switch by the operator.

Test plan link:
https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/cluster/switch.adoc

Change overview

Add capability to adjust the state of the the switch position

Testing

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

  • On Server Side:
    ./chip-lighting-app

  • On Client Side:
    $ echo '{"Name":"MultiPressComplete","PreviousPosition":3,"TotalNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo_300736

  • On Server Side:

[1658622864.847377][300736:300741] CHIP:-: Received payload: "{"Name":"MultiPressComplete","PreviousPosition":3,"TotalNumberOfPressesCounted":2}"
[1658622864.848002][300736:300736] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 791f0732
[1658622864.848067][300736:300736] CHIP:-: The new position when the momentary switch has been pressed in a multi-press sequence:3
[1658622864.848103][300736:300736] CHIP:-: 2 times the momentary switch has been pressed
[1658622864.848135][300736:300736] CHIP:ZCL: SwitchServer: OnMultiPressOngoing
[1658622864.848229][300736:300736] CHIP:EVL: LogEvent event number: 0x0000000000050002 priority: 1, endpoint id:  0x1 cluster id: 0x0000_003B event id: 0x5 Sys timestamp: 0x0000000014C2BDD6

@yufengwangca yufengwangca changed the title Add capability to adjust the state of the the switch position [TC-SWTCH]: Add capability to adjust the state of the the switch position Jul 24, 2022
@github-actions
Copy link

github-actions bot commented Jul 24, 2022

PR #21144: Size comparison from 2557f51 to 8eef386

Increases (3 builds for cc13x2_26x2, telink)
platform target config section 2557f51 8eef386 change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 634055 634063 8 0.0
.text 556140 556148 8 0.0
telink light-switch-app tlsr9518adk80d text 567212 567214 2 0.0
lighting-app tlsr9518adk80d (read/write) 819688 819696 8 0.0
text 583752 583754 2 0.0
Decreases (1 build for nrfconnect)
platform target config section 2557f51 8eef386 change % change
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 801968 801964 -4 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2557f51 8eef386 change % change
bl602 lighting-app bl602 (read/write) 1380786 1380786 0 0.0
.bss 117474 117474 0 0.0
.data 4480 4480 0 0.0
.text 1050916 1050916 0 0.0
bl602+rpc (read/write) 1426194 1426194 0 0.0
.bss 124922 124922 0 0.0
.data 4600 4600 0 0.0
.text 1082572 1082572 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668463 668463 0 0.0
(read/write) 182880 182880 0 0.0
.bss 74236 74236 0 0.0
.data 3356 3356 0 0.0
.rodata 88367 88367 0 0.0
.text 579780 579780 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634055 634063 8 0.0
(read/write) 157804 157804 0 0.0
.bss 73532 73532 0 0.0
.data 3356 3356 0 0.0
.rodata 77591 77591 0 0.0
.text 556140 556148 8 0.0
lock-ftd LP_CC2652R7 (read only) 671603 671603 0 0.0
(read/write) 169916 169916 0 0.0
.bss 71300 71300 0 0.0
.data 3280 3280 0 0.0
.rodata 76451 76451 0 0.0
.text 594672 594672 0 0.0
lock-mtd LP_CC2652R7 (read only) 653847 653847 0 0.0
(read/write) 183360 183360 0 0.0
.bss 66988 66988 0 0.0
.data 3280 3280 0 0.0
.rodata 101167 101167 0 0.0
.text 552200 552200 0 0.0
pump-app LP_CC2652R7 (read only) 681295 681295 0 0.0
(read/write) 161080 161080 0 0.0
.bss 71388 71388 0 0.0
.data 3280 3280 0 0.0
.rodata 89207 89207 0 0.0
.text 591604 591604 0 0.0
pump-controller-app LP_CC2652R7 (read only) 667039 667039 0 0.0
(read/write) 175456 175456 0 0.0
.bss 71508 71508 0 0.0
.data 3276 3276 0 0.0
.rodata 85039 85039 0 0.0
.text 581520 581520 0 0.0
shell LP_CC2652R7 (read only) 660954 660954 0 0.0
(read/write) 185892 185892 0 0.0
.bss 76540 76540 0 0.0
.data 3360 3360 0 0.0
.rodata 85146 85146 0 0.0
.text 575492 575492 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582042 582042 0 0.0
.app_xip_area 460432 460432 0 0.0
.bss 64404 64404 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587942 587942 0 0.0
.app_xip_area 461604 461604 0 0.0
.bss 69132 69132 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 586494 586494 0 0.0
.app_xip_area 465732 465732 0 0.0
.bss 63612 63612 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1087672 1087672 0 0.0
.bss 133220 133220 0 0.0
.data 2048 2048 0 0.0
.text 952384 952384 0 0.0
BRD4161A+rpc (read/write) 1141964 1141964 0 0.0
.bss 149892 149892 0 0.0
.data 2260 2260 0 0.0
.text 989788 989788 0 0.0
BRD4161A+rs911x (read/write) 952172 952172 0 0.0
.bss 140928 140928 0 0.0
.data 2048 2048 0 0.0
.text 809176 809176 0 0.0
lock-app BRD4161A+wf200 (read/write) 1128424 1128424 0 0.0
.bss 144304 144304 0 0.0
.data 2056 2056 0 0.0
.text 982044 982044 0 0.0
window-app BRD4161A (read/write) 1081156 1081156 0 0.0
.bss 134692 134692 0 0.0
.data 2076 2076 0 0.0
.text 944368 944368 0 0.0
esp32 all-clusters-app c3devkit (read only) 1022010 1022010 0 0.0
(read/write) 1486554 1486554 0 0.0
.dram0.bss 70232 70232 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216280 216280 0 0.0
.flash.text 1022010 1022010 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075799 1075799 0 0.0
(read/write) 488552 488552 0 0.0
.dram0.bss 75752 75752 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246660 246660 0 0.0
.flash.text 1070415 1070415 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641520 641520 0 0.0
.bss 69696 69696 0 0.0
.data 2028 2028 0 0.0
.text 567068 567068 0 0.0
lock k32w0+release (read/write) 698880 698880 0 0.0
.bss 70144 70144 0 0.0
.data 2036 2036 0 0.0
.text 623972 623972 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9793452 9793452 0 0.0
(read/write) 680401 680401 0 0.0
.bss 32833 32833 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 625776 625776 0 0.0
.dynamic 560 560 0 0.0
.got 13560 13560 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 458556 458556 0 0.0
.text 7748244 7748244 0 0.0
thermostat-no-ble arm64 (read only) 2341916 2341916 0 0.0
(read/write) 141249 141249 0 0.0
.bss 55233 55233 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75592 75592 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139572 139572 0 0.0
.text 1965536 1965536 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449240 2449240 0 0.0
.bss 214444 214444 0 0.0
.data 5872 5872 0 0.0
.text 1411884 1411884 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177259 1177259 0 0.0
bss 143068 143068 0 0.0
rodata 142676 142676 0 0.0
text 812656 812656 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157311 1157311 0 0.0
bss 142304 142304 0 0.0
rodata 134208 134208 0 0.0
text 801968 801964 -4 -0.0
p6 all-clusters-app default (read only) 881632 881632 0 0.0
(read/write) 1686780 1686780 0 0.0
.bss 149064 149064 0 0.0
.data 2648 2648 0 0.0
.text 1526680 1526680 0 0.0
all-clusters-minimal-app default (read only) 882352 882352 0 0.0
(read/write) 1630876 1630876 0 0.0
.bss 148344 148344 0 0.0
.data 2648 2648 0 0.0
.text 1471496 1471496 0 0.0
light-app default (read only) 890656 890656 0 0.0
(read/write) 1550972 1550972 0 0.0
.bss 140248 140248 0 0.0
.data 2440 2440 0 0.0
.text 1399896 1399896 0 0.0
lock-app default (read only) 886184 886184 0 0.0
(read/write) 1588564 1588564 0 0.0
.bss 144704 144704 0 0.0
.data 2456 2456 0 0.0
.text 1433016 1433016 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799620 799620 0 0.0
bss 70744 70744 0 0.0
noinit 40416 40416 0 0.0
text 567212 567214 2 0.0
lighting-app tlsr9518adk80d (read/write) 819688 819696 8 0.0
bss 71588 71588 0 0.0
noinit 40416 40416 0 0.0
text 583752 583754 2 0.0

@woody-apple woody-apple enabled auto-merge (squash) July 25, 2022 18:36
@woody-apple woody-apple merged commit 75f307c into project-chip:master Jul 25, 2022
woody-apple added a commit that referenced this pull request Jul 26, 2022
#21184)

Co-authored-by: Yufeng Wang <yufengwang@google.com>
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants