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 Mode Select Cluster #10752

Merged
merged 8 commits into from
Oct 30, 2021
Merged

Add Mode Select Cluster #10752

merged 8 commits into from
Oct 30, 2021

Conversation

du48s03
Copy link
Contributor

@du48s03 du48s03 commented Oct 21, 2021

*Problem

Implementation for Mode Select Cluster is missing.

Speicification for the Mode Select Cluster can be found at

https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/app_clusters/ModeSelect.adoc

*Change overview

Add the the implementation for the mode select cluster's server.

Add SupportedOptionsManager to help initializing the supported options
and retriving the options.

Changes the all-cluster-all and chip-tool's zap files to include the
mode select cluster.

Problem

Add the implementation for Mode Select Cluster. The specification for
Mode Select Cluster can be found at https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/app_clusters/ModeSelect.adoc

Change overview

* Add src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml
* Add the ModeSelectCluster to the all-cluster-app
* Add the ModeSelectCluster to the chip-tool
* Add src/app/clusters/mode-select-server/mode-select-server.cpp, the
main logic for the server of the ModeSelectCluster
* Add src/app/clusters/mode-select-server/supported-modes-manager.h,
which contains helper method for managing the supported options.
* Generate code for Mode Select Cluster

Testing

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

  • If manually tested, what platforms controller and device platforms were manually tested, and how?
    Manually tested with chip-tool built on MacOs. Tested by issuing the read command and the "change-to-mode" command, and verified that all the attributes can be read, and "change-to-mode" correctly changes the "current-mode" attribute.
  • ./scripts/test/test_suites.sh passed on a iOS machine.

@CLAassistant
Copy link

CLAassistant commented Oct 21, 2021

CLA assistant check
All committers have signed the CLA.

@franck-apple franck-apple added this to the Test Event 7 milestone Oct 21, 2021
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

There should probably be some tests being added here, no? As in a YAML that exercises this cluster in the all-clusters-app.

@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 685e556

File Section File VM
chip-lock.elf rodata -80 -80
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,6808
.debug_loc,0,1801
.debug_line,0,1396
.debug_str,0,871
.debug_ranges,0,488
.debug_frame,0,236
.debug_aranges,0,64
rodata,-80,-80

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,128
.debug_str,0,40
.debug_loc,0,-16


@github-actions
Copy link

Size increase report for "esp32-example-build" from 685e556

File Section File VM
chip-all-clusters-app.elf .flash.text 3940 3940
chip-all-clusters-app.elf .flash.rodata 416 416
chip-all-clusters-app.elf .dram0.bss 0 112
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,490017
.debug_str,0,198978
.debug_line,0,20403
.debug_loc,0,16566
.debug_abbrev,0,12377
.strtab,0,5386
.flash.text,3940,3940
.debug_ranges,0,3760
.debug_frame,0,1556
.symtab,0,864
.flash.rodata,416,416
.debug_aranges,0,376
.dram0.bss,112,0
.riscv.attributes,0,-1
.shstrtab,0,-2
[Unmapped],0,-260


@github-actions
Copy link

github-actions bot commented Oct 23, 2021

PR #10752: Size comparison from 685e556 to da07da1

Increases above 1.0% from 685e556 to da07da1:

platform target config section 685e556 da07da1 change % change
k32w lock-app k32w061+debug .bss 69076 70244 1168 1.7
shell k32w061+debug .bss 55080 63256 8176 14.8
lighting-app k32w061+se05x+release .bss 78592 79760 1168 1.5
linux all-clusters-app debug .init_array 512 520 8 1.6
.text 1352642 1378466 25824 1.9
20 builds (for efr32, k32w, linux, p6, qpg, telink)
platform target config section 685e556 da07da1 change % change
efr32 lighting-app BRD4161A .bss 118036 114732 -3304 -2.8
.data 1800 1752 -48 -2.7
.text 784320 736764 -47556 -6.1
lock-app BRD4161A .bss 115892 112588 -3304 -2.9
.data 1760 1712 -48 -2.7
.text 763528 715964 -47564 -6.2
window-app BRD4161A .bss 116204 112900 -3304 -2.8
.data 1764 1716 -48 -2.7
.text 764356 716808 -47548 -6.2
lighting-app BRD4161A+rpc .bss 131364 131236 -128 -0.1
.data 1852 1852 0 0.0
.text 764028 724188 -39840 -5.2
k32w lock-app k32w061+debug .bss 69076 70244 1168 1.7
.data 1864 1864 0 0.0
.text 516108 516076 -32 -0.0
shell k32w061+debug .bss 55080 63256 8176 14.8
.data 672 672 0 0.0
.text 359480 359528 48 0.0
lighting-app k32w061+se05x+release .bss 78592 79760 1168 1.5
.data 1900 1900 0 0.0
.text 614808 614776 -32 -0.0
linux all-clusters-app debug .bss 52208 52464 256 0.5
.data 978 978 0 0.0
.data.rel.ro 60448 60768 320 0.5
.dynamic 592 592 0 0.0
.got 4088 4096 8 0.2
.init 27 27 0 0.0
.init_array 512 520 8 1.6
.rodata 136469 137429 960 0.7
.text 1352642 1378466 25824 1.9
chip-tool debug .bss 17712 17712 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 93888 94736 848 0.9
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 194308 195204 896 0.5
.text 3510213 3532069 21856 0.6
ota-provider-app debug .bss 37472 37472 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110312 110312 0 0.0
.text 1022578 1023042 464 0.0
ota-requestor-app debug .bss 205728 205728 0 0.0
.data 752 752 0 0.0
.data.rel.ro 25800 25800 0 0.0
.dynamic 592 592 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128392 128360 -32 -0.0
.text 1141106 1141650 544 0.0
shell debug .bss 16136 16136 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36496 36496 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 76463 76463 0 0.0
.text 598242 598722 480 0.1
tv-app debug .bss 216592 216592 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 57408 57408 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 152936 152936 0 0.0
.text 1452994 1453538 544 0.0
bridge-app debug+rpc .bss 52912 52912 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27112 27112 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110748 110748 0 0.0
.text 1063461 1063925 464 0.0
lighting-app debug+rpc .bss 42232 42232 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 53808 53808 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 127921 127921 0 0.0
.text 1261410 1261874 464 0.0
p6 lock-app default .bss 68224 68224 0 0.0
.data 2416 2416 0 0.0
.heap 962704 962704 0 0.0
.text 1126776 1127000 224 0.0
qpg lighting-app qpg6100+debug .bss 53472 53472 0 0.0
.data 1004 1004 0 0.0
.text 486056 486024 -32 -0.0
lock-app qpg6100+debug .bss 52416 52416 0 0.0
.data 960 960 0 0.0
.text 462204 462184 -20 -0.0
persistent-storage-app qpg6100+debug .bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149896 149896 0 0.0
telink lighting-app tlsr9518adk80d bss 71004 71004 0 0.0
noinit 33216 33216 0 0.0
text 457612 457664 52 0.0
3 builds (for mbed)
platform target config section 685e556 da07da1 change % change
mbed lighting-app CY8CPROTO_062_4343W+release .bss 172108 172108 0 0.0
.data 5464 5464 0 0.0
.heap 858872 858872 0 0.0
.text 1220112 1220112 0 0.0
lock-app CY8CPROTO_062_4343W+release .bss 171028 171028 0 0.0
.data 5432 5432 0 0.0
.heap 859984 859984 0 0.0
.text 1198072 1198008 -64 -0.0
pigweed-app CY8CPROTO_062_4343W+release .bss 11760 11760 0 0.0
.data 4360 4360 0 0.0
.heap 1020328 1020328 0 0.0
.text 103064 103064 0 0.0
12 builds (for esp32, nrfconnect)
platform target config section 685e556 da07da1 change % change
esp32 all-clusters-app c3devkit .dram0.bss 60304 60416 112 0.2
.dram0.data 16440 16440 0 0.0
.flash.rodata 199968 200440 472 0.2
.flash.text 874354 878246 3892 0.4
.iram0.text 57564 57564 0 0.0
m5stack .dram0.bss 62808 62928 120 0.2
.dram0.data 32084 32084 0 0.0
.flash.rodata 208704 209156 452 0.2
.flash.text 905307 908683 3376 0.4
.iram0.text 125115 125115 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 113184 113184 0 0.0
rodata 98100 98100 0 0.0
text 577104 577196 92 0.0
lock-app nrf52840dk_nrf52840 bss 112256 112256 0 0.0
rodata 94500 94504 4 0.0
text 558592 558684 92 0.0
pigweed-app nrf52840dk_nrf52840 bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 bss 112316 112316 0 0.0
rodata 95396 95400 4 0.0
text 561744 561836 92 0.0
pump-controller-app nrf52840dk_nrf52840 bss 112252 112252 0 0.0
rodata 94476 94480 4 0.0
text 558384 558476 92 0.0
shell nrf52840dk_nrf52840 bss 109072 109072 0 0.0
rodata 72524 72524 0 0.0
text 520208 520300 92 0.0
lighting-app nrf52840dk_nrf52840+rpc bss 109424 109424 0 0.0
rodata 88876 88880 4 0.0
text 550296 550388 92 0.0
nrf5340dk_nrf5340_cpuapp bss 114556 114556 0 0.0
rodata 93340 93344 4 0.0
text 506572 506664 92 0.0
lock-app nrf5340dk_nrf5340_cpuapp bss 113628 113628 0 0.0
rodata 89760 89760 0 0.0
text 488056 488148 92 0.0
shell nrf5340dk_nrf5340_cpuapp bss 110056 110056 0 0.0
rodata 67168 67168 0 0.0
text 440816 440908 92 0.0

@du48s03 du48s03 force-pushed the mode-select branch 2 times, most recently from 1191a17 to 144f541 Compare October 26, 2021 16:31
@woody-apple
Copy link
Contributor

/rebase

@bzbarsky-apple
Copy link
Contributor

/rebase

@woody-apple
Copy link
Contributor

/rebase

@du48s03 du48s03 force-pushed the mode-select branch 2 times, most recently from e6ba4ca to 16ff354 Compare October 29, 2021 20:24
@du48s03
Copy link
Contributor Author

du48s03 commented Oct 29, 2021

/rebase

du48s03 and others added 8 commits October 29, 2021 20:47
 Changes to be committed:
	modified:   examples/chip-tool/templates/tests.js
	new file:   src/app/tests/suites/TestModeSelectCluster.yaml
	new file:   src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml
	modified:   src/app/zap-templates/zcl/zcl.json
	modified:   src/app/zap_cluster_list.py
	modified:   src/darwin/Framework/CHIP/templates/tests.js
@mrjerryjohns mrjerryjohns merged commit 09ba9fb into project-chip:master Oct 30, 2021
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this pull request Oct 30, 2021
project-chip#10752 added a generated line
based on a template that project-chip#10942
had removed.
bzbarsky-apple added a commit that referenced this pull request Oct 30, 2021
#10752 added a generated line
based on a template that #10942
had removed.
andy31415 pushed a commit that referenced this pull request Nov 3, 2021
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
project-chip#10752 added a generated line
based on a template that project-chip#10942
had removed.
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.