progress on iris-kit

This commit is contained in:
strawmanbobi
2023-01-17 09:59:00 +08:00
parent 7a13b08bb8
commit 6f0e949830
5 changed files with 19 additions and 10 deletions

View File

@@ -60,6 +60,7 @@ static String buildConnect();
static String buildHeartBeat();
static int handleHartBeat(String product_key, String device_name, String content);
static int handleEmit(String product_key, String device_name, String content);
static int handleNotifyStatus(String product_key, String device_name, String content);
// private variable definitions
event_handler_t event_handler_table[] = {
@@ -70,6 +71,10 @@ event_handler_t event_handler_table[] = {
{
"__emitCode",
handleEmit,
},
{
"__notifyStatus",
handleNotifyStatus,
}
};
@@ -278,4 +283,9 @@ static int handleEmit(String product_key, String device_name, String content) {
INFOF("deserialize failed\n");
}
return 0;
}
static int handleNotifyStatus(String product_key, String device_name, String content) {
INFOF("received emit code : %s, %s, %s\n", product_key.c_str(), device_name.c_str(), content.c_str());
return 0;
}