Skip to content

Commit

Permalink
Docs: Add some links to cluster dev docs (project-chip#32358)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored Mar 4, 2024
1 parent fd9305a commit ccc391c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,25 @@ types in the SDK.
- XML
- Describes the structures, enums, attributes, commands, events etc.
- Direct translation of the spec into code
- src/app/zap-templates/zcl/data-model/chip/
- [src/app/zap-templates/zcl/data-model/chip/](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip)
- Cluster Implementation

- Client side - codegen, you write the glue
- Server side - cpp implementation through Ember and / or
AttributeAccessInterface & CommandHandlerInterface
[AttributeAccessInterface](https://github.com/project-chip/connectedhomeip/blob/master/src/app/AttributeAccessInterface.h)
and
[CommandHandlerInterface](https://github.com/project-chip/connectedhomeip/blob/master/src/app/CommandHandlerInterface.h)
- src/app/clusters/<your_cluster_name>
- build file: src/app/chip_data_model.gni
- build file:
[src/app/chip_data_model.gni](https://github.com/project-chip/connectedhomeip/blob/master/src/app/chip_data_model.gni)
- build file uses data from the codegen to auto-populate the cluster
list.
- Follow examples in there to get your code building into the image
when selected in zap

- Device Type Definitions
- XML defines conformance
- src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
- [src/app/zap-templates/zcl/data-model/chip/matter-devices.xml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml)

The following wiki page has a detailed description of how and where to add
cluster and device type definitions so they are picked up properly by ZAP/ember
Expand Down Expand Up @@ -208,7 +211,7 @@ be used across examples

##### Command Handler Code

- CommandHandlerInterface
- [CommandHandlerInterface](https://github.com/project-chip/connectedhomeip/blob/master/src/app/CommandHandlerInterface.h)
- Can use HandleCommand function for convenience (sets handled)
- If not, need to set whether the command was handled
- if no, falls through to ember by default
Expand Down

0 comments on commit ccc391c

Please sign in to comment.