Skip to content

Commit 256889f

Browse files
committed
Documentation: Consolidate zap/codegen
1 parent c02c070 commit 256889f

14 files changed

+40
-8
lines changed

docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ Note that the output should also be verified against the spec using the
4848
- Goal: get zap to understand the new cluster so it can be used on devices
4949
(XML and glue)
5050

51-
![](../getting_started/img/zap_compiler.png)
51+
![](../zap_and_codegen/img/zap_compiler.png)
5252

5353
### Cluster definitions and ZAP
5454

55-
Please see [ZAP](../getting_started/zap.md) for an introduction to ZAP.
55+
Please see [ZAP](../zap_and_codegen/zap_intro.md) for an introduction to ZAP.
5656

5757
After implementing the changes outlined in the wiki article, your cluster and
5858
device type should show up in zap. you can check this by running zaptool with
@@ -64,17 +64,17 @@ To ensure the cluster and device type are correctly implemented for ZAP, open
6464
the endpoint configuration and ensure the device type appears in the device type
6565
list.
6666

67-
![](../getting_started/img/zap3.png)
67+
![](../zap_and_codegen/img/zap3.png)
6868

6969
Next, check your cluster. The "domain" parameter in the XML controls which group
7070
the cluster is in. It should have all the expected attributes, commands and
7171
events.
7272

73-
![](../getting_started/img/zap4.png)
73+
![](../zap_and_codegen/img/zap4.png)
7474

7575
Last, ensure that your attributes have the storage option set appropriately.
7676

77-
![](../getting_started/img/zap5.png)
77+
![](../zap_and_codegen/img/zap5.png)
7878

7979
### Cluster implementation - Ember and overrides
8080

docs/getting_started/first_example.md

+20
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,23 @@ where:
121121
- on is the attribute name
122122
- 0x12344321 is the node ID you used for commissioning
123123
- 1 is the endpoint
124+
125+
## Making changes to the example app composition
126+
127+
Most of the examples use a static definition of the device composition. This
128+
composition is defined in a .zap file, that is intended to be read and managed
129+
through the ZAP tool. Example apps most commonly store their zap configuration
130+
files in a -common subdirectory which is shared across all the platform
131+
implementations.
132+
133+
The basic steps involved in making changes to example apps are as follows:
134+
135+
- Open the .zap file in the zap tool and make the required changes
136+
- Run generate.py to generate the .matter file from the .zap file
137+
- Re-build the application to incorporate the changes
138+
- Run device composition tests to ensure the new composition is spec compliant
139+
140+
Information on updating with ZAP can be found in
141+
[Updating an application ZAP file](../zap_and_codegen/code_generation.md#flow-for-updating-an-application-zap-file).
142+
143+
Information on testing can be found in [Testing](../testing/index.md).

docs/getting_started/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ The following docs are a brief introduction to SDK development.
1212
```
1313

1414
- [Running your first example](./first_example.md)
15-
- [SDK Basics](./SDKBasics.md)
16-
- [ZAP](./zap.md)
15+
- [SDK Architecture Basics](./SDKBasics.md)

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ product_considerations/index
1818
testing/index
1919
tips_and_troubleshooting/index
2020
tools/index
21+
zap_and_codegen/index
2122
BUG_REPORT
22-
code_generation
2323
upgrading
2424
2525
```

docs/code_generation.md docs/zap_and_codegen/code_generation.md

+5
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ via `-o/--output-dir`.
197197
./scripts/tools/zap/generate.py $PATH_TO_ZAP_FILE
198198
```
199199

200+
Rebuild the application.
201+
202+
It is also recommended to run device composition tests to ensure the selected
203+
composition is spec compliant (see [Testing](../testing/index.md))
204+
200205
### Compile-time code generation / pre-generated code
201206

202207
A subset of code generation (both `codegen.py` and `zap-cli`) is done at compile
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/zap_and_codegen/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ZAP and Codegen
2+
3+
```{toctree}
4+
:glob:
5+
:maxdepth: 1
6+
7+
*
8+
```
File renamed without changes.

0 commit comments

Comments
 (0)