-
Notifications
You must be signed in to change notification settings - Fork 2k
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 custom ZCL extensions inside src/app/zap-templates #4192
Add custom ZCL extensions inside src/app/zap-templates #4192
Conversation
3fb0894
to
6e46031
Compare
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD) | ||
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE) | ||
|
||
// Server attributes | ||
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD) | ||
#define ZCL_REPORTING_STATUS_SERVER_ATTRIBUTE_ID (0xFFFE) |
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.
So this is duplicating values for other clusters?
Could we just define the "global" attribute ids that are the same for all clusters once? Followup for this, please.
Also, in CHIP, I don't see a "reporting status" attribute. What I do see is a "FeatureMap" attribute with ID 0xFFFC. Again, followup.
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.
So this is duplicating values for other clusters?
Could we just define the "global" attribute ids that are the same for all clusters once? Followup for this, please.
I opened #4219 for this one (with a patch).
…and 'src/app/chip-zcl-zpro-codec-api.h' Problem So far `src/app/chip-zcl-zpro-codec-api.h` and `src/app/encoder.cpp` has been generated using times to times by manually adding the related templates to to the `chip-templates.json` and removing it before checking-in the code since this code does not really belongs to application folders. It is error prone. An in fact I broken it with project-chip#4155 since attributes appears multiple times because of the second endpoint. This PR splits the `zap-templates` folder in two, with one folder for the examples and one fodler for chip related code. Summary of changes * Split `zap-templates` folder in two * Split `helper-chip.js` into multiple helpers and move those helpers where they belongs * Add a new `scripts/tools/zap_generate_chip.sh` script to generate the `src/app` content * Add `scripts/tools/zap_generate_chip.sh` to `scripts/tools/zap_regen_all.py` * Create a partial for the licensing `header` instead of relying on js for it * Fix the attribute issue mentioned above * Remove `asChipUnderlyingType` since it relies on `asUnderlyingZclType` and we should be able to fix the issue directly once project-chip#4192 lands and it really does not introduce any problem to remove it
…and 'src/app/chip-zcl-zpro-codec-api.h' Problem So far `src/app/chip-zcl-zpro-codec-api.h` and `src/app/encoder.cpp` has been generated using times to times by manually adding the related templates to to the `chip-templates.json` and removing it before checking-in the code since this code does not really belongs to application folders. It is error prone. An in fact I broken it with project-chip#4155 since attributes appears multiple times because of the second endpoint. This PR splits the `zap-templates` folder in two, with one folder for the examples and one fodler for chip related code. Summary of changes * Split `zap-templates` folder in two * Split `helper-chip.js` into multiple helpers and move those helpers where they belongs * Add a new `scripts/tools/zap_generate_chip.sh` script to generate the `src/app` content * Add `scripts/tools/zap_generate_chip.sh` to `scripts/tools/zap_regen_all.py` * Create a partial for the licensing `header` instead of relying on js for it * Fix the attribute issue mentioned above * Remove `asChipUnderlyingType` since it relies on `asUnderlyingZclType` and we should be able to fix the issue directly once project-chip#4192 lands and it really does not introduce any problem to remove it
…and 'src/app/chip-zcl-zpro-codec-api.h' Problem So far `src/app/chip-zcl-zpro-codec-api.h` and `src/app/encoder.cpp` has been generated using times to times by manually adding the related templates to to the `chip-templates.json` and removing it before checking-in the code since this code does not really belongs to application folders. It is error prone. An in fact I broken it with project-chip#4155 since attributes appears multiple times because of the second endpoint. This PR splits the `zap-templates` folder in two, with one folder for the examples and one fodler for chip related code. Summary of changes * Split `zap-templates` folder in two * Split `helper-chip.js` into multiple helpers and move those helpers where they belongs * Add a new `scripts/tools/zap_generate_chip.sh` script to generate the `src/app` content * Add `scripts/tools/zap_generate_chip.sh` to `scripts/tools/zap_regen_all.py` * Create a partial for the licensing `header` instead of relying on js for it * Fix the attribute issue mentioned above * Remove `asChipUnderlyingType` since it relies on `asUnderlyingZclType` and we should be able to fix the issue directly once project-chip#4192 lands and it really does not introduce any problem to remove it
…and 'src/app/chip-zcl-zpro-codec-api.h' Problem So far `src/app/chip-zcl-zpro-codec-api.h` and `src/app/encoder.cpp` has been generated using times to times by manually adding the related templates to to the `chip-templates.json` and removing it before checking-in the code since this code does not really belongs to application folders. It is error prone. An in fact I broken it with project-chip#4155 since attributes appears multiple times because of the second endpoint. This PR splits the `zap-templates` folder in two, with one folder for the examples and one fodler for chip related code. Summary of changes * Split `zap-templates` folder in two * Split `helper-chip.js` into multiple helpers and move those helpers where they belongs * Add a new `scripts/tools/zap_generate_chip.sh` script to generate the `src/app` content * Add `scripts/tools/zap_generate_chip.sh` to `scripts/tools/zap_regen_all.py` * Create a partial for the licensing `header` instead of relying on js for it * Fix the attribute issue mentioned above * Remove `asChipUnderlyingType` since it relies on `asUnderlyingZclType` and we should be able to fix the issue directly once project-chip#4192 lands and it really does not introduce any problem to remove it
…and 'src/app/chip-zcl-zpro-codec-api.h' (#4212) Problem So far `src/app/chip-zcl-zpro-codec-api.h` and `src/app/encoder.cpp` has been generated using times to times by manually adding the related templates to to the `chip-templates.json` and removing it before checking-in the code since this code does not really belongs to application folders. It is error prone. An in fact I broken it with #4155 since attributes appears multiple times because of the second endpoint. This PR splits the `zap-templates` folder in two, with one folder for the examples and one fodler for chip related code. Summary of changes * Split `zap-templates` folder in two * Split `helper-chip.js` into multiple helpers and move those helpers where they belongs * Add a new `scripts/tools/zap_generate_chip.sh` script to generate the `src/app` content * Add `scripts/tools/zap_generate_chip.sh` to `scripts/tools/zap_regen_all.py` * Create a partial for the licensing `header` instead of relying on js for it * Fix the attribute issue mentioned above * Remove `asChipUnderlyingType` since it relies on `asUnderlyingZclType` and we should be able to fix the issue directly once #4192 lands and it really does not introduce any problem to remove it
This PR introduces a folder inside `src/app/zap-templates` to host custom ZCL extensions such as the `MfgSpecificPing` command introduced in project-chip#4127 as well as a `Binding Cluster` from project-chip#4156. The `Binding Cluster` exposes 2 methods, `Bind` and `Unbind`. The current spec defines `bindings` has an `RW` attribute but an issue has been opened since it does not look very convenient (see CHIP-Specifications/connectedhomeip-spec#627) The `gen/` folders are also updated to reflect the addition of the `Binding Cluster`. Futhermore, the 2 scripts used to generates the `gen/` folders have also been updated to points to the `src/app/zap-templates/zcl/zcl.json` instead of `third_party/zap/repo/zcl-builtin/silabs/zcl.json` since the former is a superset of the later.
6e46031
to
906e68a
Compare
…and 'src/app/chip-zcl-zpro-codec-api.h' (project-chip#4212) Problem So far `src/app/chip-zcl-zpro-codec-api.h` and `src/app/encoder.cpp` has been generated using times to times by manually adding the related templates to to the `chip-templates.json` and removing it before checking-in the code since this code does not really belongs to application folders. It is error prone. An in fact I broken it with project-chip#4155 since attributes appears multiple times because of the second endpoint. This PR splits the `zap-templates` folder in two, with one folder for the examples and one fodler for chip related code. Summary of changes * Split `zap-templates` folder in two * Split `helper-chip.js` into multiple helpers and move those helpers where they belongs * Add a new `scripts/tools/zap_generate_chip.sh` script to generate the `src/app` content * Add `scripts/tools/zap_generate_chip.sh` to `scripts/tools/zap_regen_all.py` * Create a partial for the licensing `header` instead of relying on js for it * Fix the attribute issue mentioned above * Remove `asChipUnderlyingType` since it relies on `asUnderlyingZclType` and we should be able to fix the issue directly once project-chip#4192 lands and it really does not introduce any problem to remove it
…4192) This PR introduces a folder inside `src/app/zap-templates` to host custom ZCL extensions such as the `MfgSpecificPing` command introduced in project-chip#4127 as well as a `Binding Cluster` from project-chip#4156. The `Binding Cluster` exposes 2 methods, `Bind` and `Unbind`. The current spec defines `bindings` has an `RW` attribute but an issue has been opened since it does not look very convenient (see CHIP-Specifications/connectedhomeip-spec#627) The `gen/` folders are also updated to reflect the addition of the `Binding Cluster`. Futhermore, the 2 scripts used to generates the `gen/` folders have also been updated to points to the `src/app/zap-templates/zcl/zcl.json` instead of `third_party/zap/repo/zcl-builtin/silabs/zcl.json` since the former is a superset of the later.
Problem
This PR introduces a folder inside
src/app/zap-templates
to host customZCL extensions such as the
MfgSpecificPing
command introduced in #4127 aswell as the
Binding Cluster
from #4156.The
Binding Cluster
exposes 2 methods,Bind
andUnbind
. The current specdefines
bindings
has anRW
attribute but an issue has been opened since it doesnot look very convenient (see https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/627)
The
gen/
folders are also updated to reflect the addition of theBinding Cluster
.Futhermore, the 2 scripts used to generates the
gen/
folders have also been updated topoints to the
src/app/zap-templates/zcl/zcl.json
instead ofthird_party/zap/repo/zcl-builtin/silabs/zcl.json
since the former is a superset of the later.