Skip to content

Commit

Permalink
Generate stubs for the responses of the reporting plugin
Browse files Browse the repository at this point in the history
 #### Problem

In project-chip#3608 I have moved a bunch of callbacks from `callback-stub.c` to `src/app/reporting/reporting.cpp`. But I also moved the `*ReportingResponseCallback` while those still needs to be generated.
This PR moves them back to the `gen/` folders.
  • Loading branch information
vivien-apple committed Feb 1, 2021
1 parent d68a138 commit b5babb0
Show file tree
Hide file tree
Showing 14 changed files with 374 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,40 @@ bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, C
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 __attribute__((weak)) emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
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 __attribute__((weak)) emberAfReadReportingConfigurationResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
28 changes: 28 additions & 0 deletions examples/all-clusters-app/all-clusters-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -2504,6 +2504,34 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste
*/
bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
34 changes: 34 additions & 0 deletions examples/bridge-app/bridge-common/gen/callback-stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,40 @@ bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, C
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 __attribute__((weak)) emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
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 __attribute__((weak)) emberAfReadReportingConfigurationResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
28 changes: 28 additions & 0 deletions examples/bridge-app/bridge-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,34 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste
*/
bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
34 changes: 34 additions & 0 deletions examples/lighting-app/lighting-common/gen/callback-stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,40 @@ bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, C
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 __attribute__((weak)) emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
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 __attribute__((weak)) emberAfReadReportingConfigurationResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
28 changes: 28 additions & 0 deletions examples/lighting-app/lighting-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,34 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste
*/
bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
34 changes: 34 additions & 0 deletions examples/lock-app/lock-common/gen/callback-stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,40 @@ bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, C
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 __attribute__((weak)) emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
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 __attribute__((weak)) emberAfReadReportingConfigurationResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
28 changes: 28 additions & 0 deletions examples/lock-app/lock-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,34 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste
*/
bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,40 @@ bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, C
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 __attribute__((weak)) emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
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 __attribute__((weak)) emberAfReadReportingConfigurationResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
28 changes: 28 additions & 0 deletions examples/temperature-measurement-app/esp32/main/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,34 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste
*/
bool emberAfDefaultResponseCallback(chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @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(chip::ClusterId clusterId, uint8_t * buffer, uint16_t bufLen);

/** @brief Discover Attributes Response
*
* This function is called by the application framework when a Discover
Expand Down
10 changes: 0 additions & 10 deletions src/app/reporting/reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,13 +1078,3 @@ uint8_t emAfPluginReportingConditionallyAddReportingEntry(EmberAfPluginReporting
}
return 0;
}

bool emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}

bool emberAfReadReportingConfigurationResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen)
{
return false;
}
Loading

0 comments on commit b5babb0

Please sign in to comment.