Skip to content

Commit

Permalink
Add ZCL reporting plugin to be compiled in various examples (#3608)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Dec 7, 2020
1 parent 3f7ce0a commit 1185400
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 499 deletions.
2 changes: 2 additions & 0 deletions examples/lighting-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ efr32_executable("lighting_app") {
"${chip_root}/examples/common/QRCode/repo/c/qrcodegen.c",
"${chip_root}/examples/common/chip-app-server/DataModelHandler.cpp",
"${chip_root}/src/app/clusters/on-off-server/on-off.cpp",
"${chip_root}/src/app/reporting/reporting-default-configuration.cpp",
"${chip_root}/src/app/reporting/reporting.cpp",
"${chip_root}/src/app/util/af-event.cpp",
"${chip_root}/src/app/util/af-main-common.cpp",
"${chip_root}/src/app/util/attribute-size.cpp",
Expand Down
92 changes: 0 additions & 92 deletions examples/lighting-app/efr32/src/gen/callback-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,6 @@ bool emberAfAttributeWriteAccessCallback(uint8_t endpoint, EmberAfClusterId clus
*/
void emberAfGroupsClusterClearGroupTableCallback(uint8_t endpoint) {}

/** @brief Clear Report Table
*
* This function is called by the framework when the application should clear
* the report table.
*
*/
EmberStatus emberAfClearReportTableCallback(void)
{
return EMBER_LIBRARY_NOT_PRESENT;
}

/** @brief Scenes Cluster ClearSceneTable
*
* This function is called by the framework when the application should clear
Expand Down Expand Up @@ -202,38 +191,6 @@ bool emberAfClusterSecurityCustomCallback(EmberAfProfileId profileId, EmberAfClu
return false;
}

/** @brief Configure Reporting Command
*
* This function is called by the application framework when a Configure
* Reporting command is received from an external device. The Configure
* Reporting command contains a series of attribute reporting configuration
* records. The application should return true if the message was processed or
* false if it was not.
*
* @param cmd Ver.: always
*/
bool emberAfConfigureReportingCommandCallback(const EmberAfClusterCommand * cmd)
{
return false;
}

/** @brief Configure Reporting Response
*
* This function is called by the application framework when a Configure
* Reporting Response command is received from an external device. The
* application should return true if the message was processed or false if it
* was not.
*
* @param clusterId The cluster identifier of this response. Ver.: always
* @param buffer Buffer containing the list of attribute status records. Ver.:
* always
* @param bufLen The length in bytes of the list. Ver.: always
*/
bool emberAfConfigureReportingResponseCallback(EmberAfClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Default Response
*
* This function is called by the application framework when a Default Response
Expand Down Expand Up @@ -1969,36 +1926,6 @@ bool emberAfReadAttributesResponseCallback(EmberAfClusterId clusterId, uint8_t *
return false;
}

/** @brief Read Reporting Configuration Command
*
* This function is called by the application framework when a Read Reporting
* Configuration command is received from an external device. The application
* should return true if the message was processed or false if it was not.
*
* @param cmd Ver.: always
*/
bool emberAfReadReportingConfigurationCommandCallback(const EmberAfClusterCommand * cmd)
{
return false;
}

/** @brief Read Reporting Configuration Response
*
* This function is called by the application framework when a Read Reporting
* Configuration Response command is received from an external device. The
* application should return true if the message was processed or false if it
* was not.
*
* @param clusterId The cluster identifier of this response. Ver.: always
* @param buffer Buffer containing the list of attribute reporting configuration
* records. Ver.: always
* @param bufLen The length in bytes of the list. Ver.: always
*/
bool emberAfReadReportingConfigurationResponseCallback(EmberAfClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Scenes Cluster Recall Saved Scene
*
* This function is called by the framework when the application should recall a
Expand Down Expand Up @@ -2111,25 +2038,6 @@ bool emberAfReportAttributesCallback(EmberAfClusterId clusterId, uint8_t * buffe
return false;
}

/** @brief Reporting Attribute Change
*
* This function is called by the framework when an attribute managed by the
* framework changes. The application should call this function when an
* externally-managed attribute changes. The application should use the change
* notification to inform its reporting decisions.
*
* @param endpoint Ver.: always
* @param clusterId Ver.: always
* @param attributeId Ver.: always
* @param mask Ver.: always
* @param manufacturerCode Ver.: always
* @param type Ver.: always
* @param data Ver.: always
*/
void emberAfReportingAttributeChangeCallback(uint8_t endpoint, EmberAfClusterId clusterId, EmberAfAttributeId attributeId,
uint8_t mask, uint16_t manufacturerCode, EmberAfAttributeType type, uint8_t * data)
{}

/** @brief Scan Error
*
* This is called by the framework on behalf of the form-and-join library to
Expand Down
2 changes: 2 additions & 0 deletions examples/lighting-app/lighting-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ source_set("lighting-common") {
sources = [
"${chip_root}/examples/common/chip-app-server/DataModelHandler.cpp",
"${chip_root}/src/app/clusters/on-off-server/on-off.cpp",
"${chip_root}/src/app/reporting/reporting-default-configuration.cpp",
"${chip_root}/src/app/reporting/reporting.cpp",
"${chip_root}/src/app/util/af-event.cpp",
"${chip_root}/src/app/util/af-main-common.cpp",
"${chip_root}/src/app/util/attribute-size.cpp",
Expand Down
92 changes: 0 additions & 92 deletions examples/lighting-app/lighting-common/gen/callback-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,6 @@ bool emberAfAttributeWriteAccessCallback(uint8_t endpoint, EmberAfClusterId clus
*/
void emberAfGroupsClusterClearGroupTableCallback(uint8_t endpoint) {}

/** @brief Clear Report Table
*
* This function is called by the framework when the application should clear
* the report table.
*
*/
EmberStatus emberAfClearReportTableCallback(void)
{
return EMBER_LIBRARY_NOT_PRESENT;
}

/** @brief Scenes Cluster ClearSceneTable
*
* This function is called by the framework when the application should clear
Expand Down Expand Up @@ -202,38 +191,6 @@ bool emberAfClusterSecurityCustomCallback(EmberAfProfileId profileId, EmberAfClu
return false;
}

/** @brief Configure Reporting Command
*
* This function is called by the application framework when a Configure
* Reporting command is received from an external device. The Configure
* Reporting command contains a series of attribute reporting configuration
* records. The application should return true if the message was processed or
* false if it was not.
*
* @param cmd Ver.: always
*/
bool emberAfConfigureReportingCommandCallback(const EmberAfClusterCommand * cmd)
{
return false;
}

/** @brief Configure Reporting Response
*
* This function is called by the application framework when a Configure
* Reporting Response command is received from an external device. The
* application should return true if the message was processed or false if it
* was not.
*
* @param clusterId The cluster identifier of this response. Ver.: always
* @param buffer Buffer containing the list of attribute status records. Ver.:
* always
* @param bufLen The length in bytes of the list. Ver.: always
*/
bool emberAfConfigureReportingResponseCallback(EmberAfClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Default Response
*
* This function is called by the application framework when a Default Response
Expand Down Expand Up @@ -1969,36 +1926,6 @@ bool emberAfReadAttributesResponseCallback(EmberAfClusterId clusterId, uint8_t *
return false;
}

/** @brief Read Reporting Configuration Command
*
* This function is called by the application framework when a Read Reporting
* Configuration command is received from an external device. The application
* should return true if the message was processed or false if it was not.
*
* @param cmd Ver.: always
*/
bool emberAfReadReportingConfigurationCommandCallback(const EmberAfClusterCommand * cmd)
{
return false;
}

/** @brief Read Reporting Configuration Response
*
* This function is called by the application framework when a Read Reporting
* Configuration Response command is received from an external device. The
* application should return true if the message was processed or false if it
* was not.
*
* @param clusterId The cluster identifier of this response. Ver.: always
* @param buffer Buffer containing the list of attribute reporting configuration
* records. Ver.: always
* @param bufLen The length in bytes of the list. Ver.: always
*/
bool emberAfReadReportingConfigurationResponseCallback(EmberAfClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Scenes Cluster Recall Saved Scene
*
* This function is called by the framework when the application should recall a
Expand Down Expand Up @@ -2111,25 +2038,6 @@ bool emberAfReportAttributesCallback(EmberAfClusterId clusterId, uint8_t * buffe
return false;
}

/** @brief Reporting Attribute Change
*
* This function is called by the framework when an attribute managed by the
* framework changes. The application should call this function when an
* externally-managed attribute changes. The application should use the change
* notification to inform its reporting decisions.
*
* @param endpoint Ver.: always
* @param clusterId Ver.: always
* @param attributeId Ver.: always
* @param mask Ver.: always
* @param manufacturerCode Ver.: always
* @param type Ver.: always
* @param data Ver.: always
*/
void emberAfReportingAttributeChangeCallback(uint8_t endpoint, EmberAfClusterId clusterId, EmberAfAttributeId attributeId,
uint8_t mask, uint16_t manufacturerCode, EmberAfAttributeType type, uint8_t * data)
{}

/** @brief Scan Error
*
* This is called by the framework on behalf of the form-and-join library to
Expand Down
2 changes: 2 additions & 0 deletions examples/lighting-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ target_sources(app PRIVATE
${CHIP_APP_SERVER}/Server.cpp
${CHIP_APP_SERVER}/QRCodeUtil.cpp
${CHIP_APP_SERVER}/RendezvousServer.cpp
${CHIP_ROOT}/src/app/reporting/reporting-default-configuration.cpp
${CHIP_ROOT}/src/app/reporting/reporting.cpp
${CHIP_ROOT}/src/app/util/af-event.cpp
${CHIP_ROOT}/src/app/util/af-main-common.cpp
${CHIP_ROOT}/src/app/util/attribute-size.cpp
Expand Down
2 changes: 2 additions & 0 deletions examples/lock-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ efr32_executable("lock_app") {
"${chip_root}/examples/common/QRCode/repo/c/qrcodegen.c",
"${chip_root}/examples/common/chip-app-server/DataModelHandler.cpp",
"${chip_root}/src/app/clusters/on-off-server/on-off.cpp",
"${chip_root}/src/app/reporting/reporting-default-configuration.cpp",
"${chip_root}/src/app/reporting/reporting.cpp",
"${chip_root}/src/app/util/af-event.cpp",
"${chip_root}/src/app/util/af-main-common.cpp",
"${chip_root}/src/app/util/attribute-size.cpp",
Expand Down
Loading

0 comments on commit 1185400

Please sign in to comment.