1 #ifndef __AWSS_RESET__ 2 #define __AWSS_RESET__ 3 4 #define AWSS_RESET_PKT_LEN (256) 5 #define AWSS_RESET_TOPIC_LEN (128) 6 #define AWSS_RESET_MSG_ID_LEN (16) 7 8 #define TOPIC_RESET_REPORT "/sys/%s/%s/thing/reset" 9 #define TOPIC_RESET_REPORT_REPLY "/sys/%s/%s/thing/reset_reply" 10 #define METHOD_RESET_REPORT "thing.reset" 11 12 #define AWSS_RESET_REQ_FMT \ 13 "{\"id\":%s, \"version\":\"1.0\", \"method\":\"%s\", \"params\":%s}" 14 15 #define AWSS_KV_RST "awss.rst" 16 17 int awss_check_reset(); 18 19 /** 20 * @brief report reset to cloud. 21 * 22 * @retval -1 : failure 23 * @retval 0 : sucess 24 * @note 25 * device will save reset flag if device dosen't connect cloud, device will 26 * fails to send reset to cloud. when connection between device and cloud is 27 * ready, device will retry to report reset to cloud. 28 */ 29 int awss_report_reset(); 30 31 /** 32 * @brief stop to report reset to cloud. 33 * 34 * @retval -1 : failure 35 * @retval 0 : sucess 36 * @note 37 * just stop report reset to cloud without any touch reset flag in flash. 38 */ 39 int awss_stop_report_reset(); 40 41 #endif 42