You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating extensions for ZAP files using .zapExtension files (#1552)
- .zapExtension files can now be used to extend the .zap files to add additional clusters, commands or attributes on an endoint
- Adding the logic to do this during generation or during file open using command line arguments.
- Adding unit tests
- Adding documentation on usage
- Added an attribute to the xml so updated one of the existing tests
- Fixing existing tests and adding tests for zap extensions with clusters and attributes on an endpoint type id
- Linking the extension file to the endpoint identifiers and not endpoint type ids
- Github: ZAP#1254
ZAP file extensions allow users to extend the functionality of existing ZAP configuration files(.zap) by merging additional data from extension files(.zapExtension). This feature is particularly useful for adding new clusters, attributes, or other configuration elements to an existing endpoint identifier without modifying the base ZAP file. Note that if the extension element is already present in the base configuration then it will not be modified. Also note that if you open a .zap baseline file along with a .zapExtension extension file and then save the configuration then this will always produce a single .zap file which includes the extension configuration.
6
+
7
+
## How It Works
8
+
9
+
1.**Base ZAP File(.zap)**: The primary configuration file containing the initial setup. eg [zapFile](../test/resource/lighting-matter.zap)
10
+
2.**Extension ZAP File(.zapExtension)**: A supplementary file that adds to elements in the base file. eg [zapFileExtension](../test/resource/zapExtension1.zapExtension). This file shows how everything is wrapped within endpoints object and linked to the endpoint identifier.
11
+
3.**Merging Process**: During the import process, the extension file's content is merged into the base file content. However, if you save this imported file along with its extension then this saves the content in one explicit file.
12
+
13
+
## Usage
14
+
15
+
### Generation
16
+
17
+
[ZAP executable] generate --noUi --noServer -o [output directory path] --packageMatch fuzzy --zcl [path to zcl.json in SDK] --generationTemplate [path to generation templates.json in SDK] --in [path to input zap file] --inE [path to zap extension file] --noLoadingFailure --appendGenerationSubdirectory
18
+
19
+
### Launching UI
20
+
21
+
[ZAP executable] --packageMatch fuzzy --zcl [path to zcl.json in SDK] --generationTemplate [path to generation templates.json in SDK] --in [path to input zap file] --inE [path to zap extension file] --noLoadingFailure --appendGenerationSubdirectory
22
+
23
+
### References
24
+
25
+
- ZAP executable -> [ZAP binary](https://github.com/project-chip/zap/releases) or `node src-script/zap-start.js`
0 commit comments