-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chip_data_model.gni: add option for custom-implemented clusters #22042
chip_data_model.gni: add option for custom-implemented clusters #22042
Conversation
PR #22042: Size comparison from 67d6821 to 9de81ca Increases (4 builds for esp32, nrfconnect, psoc6, telink)
Decreases (3 builds for efr32, k32w, psoc6)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking changes requested to wait until after 1.0 branch
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I still think this is an important feature. Its further review was postponed to post-1.0, which would be now ;-) |
The PR is marked as draft - should this not be draft anymore? |
@plan44 - please remove this from draft if that is appropriate - that should get the bot start asking for reviews. |
I will, as soon as I find time to rebase and re-test on master. Thanks for having had a look already :-) |
6bbf3ff
to
928a69b
Compare
Add `zap_clusters_with_custom_implementation` option to `chip_data_model()` template, which allows to list clusters that need to be available in a device, but don't use the standard implementation in `src/app/clusters/<clustername>/<clustername>.cpp`. # Usage To exclude a particular cluster's standard implementation in favor of an application level implementation: - in the BUILD.gn file for the application specific `.zap` file - in the instantiation of the `chip_data_model` template - add a variable `zap_clusters_with_custom_implementation` - assign it a list of strings with cluster names, corresponding to directories in the `src/app/clusters` directory. - this causes the cluster implementation file(s) not to be included in the build, allowing re-implementation at the application level. Example, excluding standard implementation of level-control: ``` chip_data_model("zap") { zap_file = "myproject.zap" zap_clusters_with_custom_implementation = [ "level-control" ] zap_pregenerated_dir = "//zap-generated" } ``` # Background Some clusters, for example Level Control, are implemented with the assumption of direct low-level access to the device hardware. For bridged devices, the actual interface might be much more high level, as in my case where I have lights which are fully capable of performing parametrized smooth transitions but are NOT capable of receiving output changes in millisecond intervals. In such cases, a cluster might need application-specific re-implementation. This changeset allows, from the application's ZAP BUILD.gn, to exclude the standard cluster implementation file, allowing re-implementation of the needed ember callbacks in a application specific file outside the connectedhomeip repo.
PR #22042: Size comparison from 9e371e6 to 928a69b Increases (5 builds for bl602, psoc6, telink)
Decreases (6 builds for bl602, esp32, nrfconnect, psoc6, telink)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
928a69b
to
f24e31c
Compare
PR #22042: Size comparison from 9e371e6 to f24e31c Increases (13 builds for bl602, bl702, psoc6, telink)
Decreases (2 builds for cyw30739, esp32)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
@andy31415 I've rebased and retested a few days ago, and removed the draft status. Checks look fine except for pullaprove/license/cla, which I do not understand, as I did agree to the CLA a while ago and some PRs of mine are merged already. I have no idea how to re-agree to the CLA, if that's what the status is asking for. |
@plan44, @andy31415 is on vacation right now, as is @woody-apple, and they're the obvious people to be able to override the CLA bits.... In practice you probably want to ping people after Jan 3. |
@bzbarsky-apple thanks for the info - no problem waiting until next year. Or rather than waiting, maybe finding time to prepare the libev and gaps-in-endpointId PRs ;-) |
@andy31415 @woody-apple - is anything but the CLA holding back this PR? I can't do anything regarding the CLA because I have agreed to it, and other PRs went through. I have no idea why the bot thinks in this particular PR the CLA was not agreed to. |
1.0 released, removing change requested
CLA seems stuck ... not sure if there is a way to kick it. I will assume CLA is signed for the purposes of merging. Still need reviews. |
…ect-chip#22042) * chip_data_model.gni: add option for custom-implemented clusters Add `zap_clusters_with_custom_implementation` option to `chip_data_model()` template, which allows to list clusters that need to be available in a device, but don't use the standard implementation in `src/app/clusters/<clustername>/<clustername>.cpp`. # Usage To exclude a particular cluster's standard implementation in favor of an application level implementation: - in the BUILD.gn file for the application specific `.zap` file - in the instantiation of the `chip_data_model` template - add a variable `zap_clusters_with_custom_implementation` - assign it a list of strings with cluster names, corresponding to directories in the `src/app/clusters` directory. - this causes the cluster implementation file(s) not to be included in the build, allowing re-implementation at the application level. Example, excluding standard implementation of level-control: ``` chip_data_model("zap") { zap_file = "myproject.zap" zap_clusters_with_custom_implementation = [ "level-control" ] zap_pregenerated_dir = "//zap-generated" } ``` # Background Some clusters, for example Level Control, are implemented with the assumption of direct low-level access to the device hardware. For bridged devices, the actual interface might be much more high level, as in my case where I have lights which are fully capable of performing parametrized smooth transitions but are NOT capable of receiving output changes in millisecond intervals. In such cases, a cluster might need application-specific re-implementation. This changeset allows, from the application's ZAP BUILD.gn, to exclude the standard cluster implementation file, allowing re-implementation of the needed ember callbacks in a application specific file outside the connectedhomeip repo. * Include suggestions from @bzbarsky-apple
Add
zap_clusters_with_custom_implementation
option tochip_data_model()
template, which allows to list clusters that need to be available in a device, but don't use the standard implementation insrc/app/clusters/<clustername>/<clustername>.cpp
.Usage
To exclude a particular cluster's standard implementation in favor of an application level implementation:
.zap
filechip_data_model
templatezap_clusters_with_custom_implementation
src/app/clusters
directory.Example, excluding standard implementation of level-control:
Background
Some clusters, for example Level Control, are implemented with the assumption of direct low-level access to the device hardware. For bridged devices, the actual interface might be much more high level, as in my case where I have lights which are fully capable of performing parametrized smooth transitions but are NOT capable of receiving output changes in millisecond intervals. In such cases, a cluster might need application-specific re-implementation.
This changeset allows, from the application's ZAP BUILD.gn, to exclude the standard cluster implementation file, allowing re-implementation of the needed ember callbacks in a application specific file outside the connectedhomeip repo.
Testing