Skip to content

Commit

Permalink
Add rudimentary implementation of dynamic endpoints with example brid…
Browse files Browse the repository at this point in the history
…ge code (#7136)

* Add rudimentary implementation of dynamic endpoints with example bridge code

* Fix build warnings

* Fix compiler and restyle warnings

* Zap check errors

* More compiler warnings

* Restyled by clang-format

* Restyled by prettier-markdown

* 2nd attempt to fix zap templates generation CI complaint

* Fix typos in readme

Co-authored-by: Markus Becker <[email protected]>

* Add rudimentary implementation of dynamic endpoints with example bridge code

* Fix build warnings

* Fix compiler and restyle warnings

* Zap check errors

* More compiler warnings

* Restyled by clang-format

* Restyled by prettier-markdown

* 2nd attempt to fix zap templates generation CI complaint

* Fix typos in readme

Co-authored-by: Markus Becker <[email protected]>

* Remove old commented code

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Markus Becker <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Aug 31, 2021
1 parent b5b5437 commit 1533744
Show file tree
Hide file tree
Showing 39 changed files with 2,981 additions and 4,923 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,11 @@ bool __attribute__((weak)) emberAfReadAttributesResponseCallback(ClusterId clust
* @param manufacturerCode Ver.: always
* @param buffer Ver.: always
* @param maxReadLength Ver.: always
* @param index Ver.: always
*/
EmberAfStatus __attribute__((weak))
emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata,
uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength)
uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength, int32_t index)
{
return EMBER_ZCL_STATUS_FAILURE;
}
Expand Down Expand Up @@ -865,10 +866,11 @@ bool __attribute__((weak)) emberAfWriteAttributesResponseCallback(ClusterId clus
* @param attributeMetadata Ver.: always
* @param manufacturerCode Ver.: always
* @param buffer Ver.: always
* @param index Ver.: always
*/
EmberAfStatus __attribute__((weak))
emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata,
uint16_t manufacturerCode, uint8_t * buffer)
uint16_t manufacturerCode, uint8_t * buffer, int32_t index)
{
return EMBER_ZCL_STATUS_FAILURE;
}
Expand Down
6 changes: 4 additions & 2 deletions examples/all-clusters-app/all-clusters-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -4713,10 +4713,11 @@ bool emberAfReadAttributesResponseCallback(chip::ClusterId clusterId, uint8_t *
* @param manufacturerCode Ver.: always
* @param buffer Ver.: always
* @param maxReadLength Ver.: always
* @param index Ver.: always
*/
EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
uint8_t * buffer, uint16_t maxReadLength);
uint8_t * buffer, uint16_t maxReadLength, int32_t index = -1);

/** @brief Write Attributes Response
*
Expand Down Expand Up @@ -4776,10 +4777,11 @@ bool emberAfWriteAttributesResponseCallback(chip::ClusterId clusterId, uint8_t *
* @param attributeMetadata Ver.: always
* @param manufacturerCode Ver.: always
* @param buffer Ver.: always
* @param index Ver.: always
*/
EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode,
uint8_t * buffer);
uint8_t * buffer, int32_t index = -1);

/** @brief Report Attributes
*
Expand Down
3 changes: 3 additions & 0 deletions examples/bridge-app/bridge-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ chip_data_model("bridge-common") {

zap_pregenerated_dir = "gen"
is_server = true

# TODO: the definition of DYNAMIC_ENDPOINT_COUNT needs find a common home!
cflags = [ "-DDYNAMIC_ENDPOINT_COUNT=16" ]
}
Loading

0 comments on commit 1533744

Please sign in to comment.