|
5 | 5 | */
|
6 | 6 |
|
7 | 7 | #pragma once
|
| 8 | + |
8 | 9 | #include <stdint.h>
|
9 | 10 | #include <esp_err.h>
|
10 | 11 | #include <esp_event_base.h>
|
@@ -200,6 +201,53 @@ void esp_insights_disable(void);
|
200 | 201 | * @return Pointer to a NULL terminated Node ID string.
|
201 | 202 | */
|
202 | 203 | const char *esp_insights_get_node_id(void);
|
| 204 | + |
| 205 | +/** |
| 206 | + * @brief Check if insights reporting is enabled |
| 207 | + * |
| 208 | + * @return true reporting is on |
| 209 | + * @return false reporting is off |
| 210 | + */ |
| 211 | +bool esp_insights_is_reporting_enabled(void); |
| 212 | + |
| 213 | +/** |
| 214 | + * @brief Turn on the Insights reporting |
| 215 | + * |
| 216 | + * @return esp_err_t ESP_OK on success, apt error otherwise |
| 217 | + */ |
| 218 | +esp_err_t esp_insights_reporting_enable(); |
| 219 | + |
| 220 | +/** |
| 221 | + * @brief Turn off the Insights repoting |
| 222 | + * |
| 223 | + * @return esp_err_t ESP_OK on success, apt error otherwise |
| 224 | + * @note meta message if changed and the boot message will still be |
| 225 | + * sent as this information is critical for Insights working with the |
| 226 | + * cloud. You may disable insight completely using esp_insights_disable |
| 227 | + */ |
| 228 | +esp_err_t esp_insights_reporting_disable(); |
| 229 | + |
| 230 | +/** |
| 231 | + * @brief Encode and parse the command directly using esp-insight's parser |
| 232 | + * |
| 233 | + * This tests only if the parser is working as expected. |
| 234 | + */ |
| 235 | +esp_err_t esp_insights_test_cmd_handler(); |
| 236 | + |
| 237 | +/** |
| 238 | + * @brief Enable esp-insights command-response module |
| 239 | + * |
| 240 | + * This API registers esp-insights command parser which when data is received, |
| 241 | + * parses it to filter out insights specific data, modifies configs accordingly, |
| 242 | + * and prepares and gives response data to the module |
| 243 | + * |
| 244 | + * The \ref esp_insights_init takes care of initializing command response and |
| 245 | + * enabling the same. In cases where, only esp_insights_enable is called, e.g., |
| 246 | + * ESP Rainmaker's app_insights module, user needs to call this API, before or |
| 247 | + * after \ref esp_insights_enable |
| 248 | + */ |
| 249 | +esp_err_t esp_insights_cmd_resp_enable(void); |
| 250 | + |
203 | 251 | #ifdef __cplusplus
|
204 | 252 | }
|
205 | 253 | #endif
|
0 commit comments