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

Sample Manufacturer Extension Cluster #29162

Merged
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
068d44e
new: chef test custom cluster
rochaferraz Mar 10, 2023
5e080a1
MEI sample cluster. Chef device sample
rochaferraz Aug 22, 2023
0c7f6ed
renamed some symbols
rochaferraz Aug 22, 2023
3cc9ab8
fix: sampleMei doesn't need zap-generated command callbacks
rochaferraz Aug 23, 2023
603a4e5
chg: new implementation of cluster supports many endpoints
rochaferraz Aug 29, 2023
9c02c7e
chg: zap regen
rochaferraz Aug 29, 2023
2990804
chg: removed unused variable captured in closure
rochaferraz Aug 29, 2023
7de6040
chg: changed %lu to %zu for size_t types
rochaferraz Aug 31, 2023
d915c05
commands made non-optional. Restyle
rochaferraz Sep 6, 2023
bcf0000
removed reference for availability.yaml
rochaferraz Sep 6, 2023
49473d8
fix: controller-clusters.zap as a samplemei client cluster, not server
rochaferraz Sep 6, 2023
58cfefe
fix: sample mei command handling on adding, availability.yaml
rochaferraz Sep 6, 2023
fee0cf3
chg: replaced %zu to type castings. Lint doesn't like %zu
rochaferraz Sep 6, 2023
a303699
fix: removed event list from data model
rochaferraz Sep 8, 2023
0856a9e
fix: event list removed from controller-clusters.zap
rochaferraz Sep 8, 2023
df311d9
Merge branch 'master' into chef_custom_clusters_to_github_smashed
rochaferraz Sep 8, 2023
66ee8f9
chg: sample mei <code> tag doc
rochaferraz Sep 8, 2023
3621d3c
fix: last bits of controller-clusters.zap got cut when rebased
rochaferraz Sep 8, 2023
e4a3f33
chg: zap regen after new zap version installed
rochaferraz Sep 8, 2023
d8b4c4d
changed MEI to Mei in cluster name
rochaferraz Sep 11, 2023
8465010
Restyled by whitespace
restyled-commits Sep 11, 2023
3f4aba2
Restyled by clang-format
restyled-commits Sep 11, 2023
7b04270
Update src/darwin/Framework/CHIP/templates/availability.yaml
rochaferraz Sep 11, 2023
9229e42
Update src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml
rochaferraz Sep 11, 2023
8a56771
Update src/app/clusters/sample-mei-server/sample-mei-server.cpp
rochaferraz Sep 11, 2023
fa79c09
capitalized MEI
rochaferraz Sep 11, 2023
4cd49e5
chg: cluster added to ClustersWithShutdownFunctions
rochaferraz Sep 11, 2023
cbbea23
chg: included app/util/config.h in sample-mei-server.h
rochaferraz Sep 11, 2023
9a865fd
fix: shutdown calls UnregisterEndpoint
rochaferraz Sep 11, 2023
8d4ef76
fix: shutdown calls UnregisterEndpoint
rochaferraz Sep 11, 2023
023b3f9
fix: name of cluster in config-data.yaml
rochaferraz Sep 12, 2023
e742c68
Restyled by clang-format
restyled-commits Sep 12, 2023
42588d6
chg: removed dead code
rochaferraz Sep 12, 2023
02835b8
chg: error codes for r/w
rochaferraz Sep 12, 2023
ec25966
Restyled by clang-format
restyled-commits Sep 12, 2023
cb3dbca
chg: issue number in config-data.yaml
rochaferraz Sep 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ MDNS
MediaInput
MediaPlayback
MediaTek
MEI
mem
memdf
MemMonitoring
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ jobs:
src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \
src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \
"
- name: Build Apps
run: |
Expand Down
27 changes: 27 additions & 0 deletions examples/chef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,30 @@ To add new devices for chef:
`examples/chef/devices`.
- This is gated by the workflow in `.github/workflows/zap_templates.yaml`.
- All devices added to the repository are built in CD.

## Manufacturer Extensions / Custom Clusters

You may add vendor-defined features to chef. The
`rootnode_onofflight_meisample*` device showcases its usage by using the Sample
MEI cluster which is defined on
`src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml`

This cluster has

- One boolean attribute: `flip-flop`
- A `ping` command with no arguments
- A command/response pair `add-arguments`. The command takes two uint8
arguments and the response command returns their sum.

You may test the `Sample MEI` via chip-tool using the following commands:

```
# commissioning of on-network chef device
chip-tool pairing onnetwork 1 20202021
# tests command to sum arguments: returns 30
chip-tool samplemei add-arguments 1 1 10 20
# sets Flip-Flop to false
chip-tool samplemei write flip-flop 0 1 1
# reads Flip-Flop
chip-tool samplemei read flip-flop 1 1
```
Loading
Loading