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 attribute-size.h to src/app/zap-templates/chip-templates.json #3810

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

vivien-apple
Copy link
Contributor

Problem

The templates extracted from #3464 that have landed in #3638 remove the previous gen/attribute-size.h file and get it merged into attribute-type.h.

That's not a bad thing but for the sake of being able to update the gen/ folder of examples independently during the migration phase I would prefer us to keep it. It would obligate the need to update src/app/attribute-size.cpp as suggested by #3346

For reference the change is:

--- a/src/app/util/attribute-size.cpp
+++ b/src/app/util/attribute-size.cpp
@@ -42,10 +42,9 @@
 //#include PLATFORM_HEADER
 
 #include "af.h"
+#include "gen/attribute-type.h"
 
-static const uint8_t attributeSizes[] = {
-#include "gen/attribute-size.h"
-};
+static const uint8_t attributeSizes[] = ZAP_GENERATED_ATTRIBUTE_SIZES;

This change means gen/ folder generated from AppBuilder and gen/folder generated from ZAP won't be able to lives at the same time into the tree.

I would prefer us to not have to change all the gen/ folder at the same time, just in case something is wrong in one of the cluster used by the all-clusters-app but that is unused for others examples such as lighting-app, lock-app and temperature-measurement-app

Summary of Changes

  • Split back attribute-type.zapt into 2 different files. attribute-type.zapt and attribute-size.zapt

@andy31415 andy31415 merged commit 9fd0123 into project-chip:master Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants