#ifdef SUPPORT_SPO2_NOTIFICATION
{TOPIC_EVENT_SPO2_UPDATE, PRIORITY_TWO},
{TOPIC_EVENT_HEARTRATE_UPDATA, PRIORITY_TWO},
- {TOPIC_EVENT_START_HRS_MONITORING, PRIORITY_TWO},
- {TOPIC_EVENT_STOP_HRS_MONITORING, PRIORITY_TWO},
- {TOPIC_EVENT_START_SPO2_MONITORING, PRIORITY_TWO},
- {TOPIC_EVENT_STOP_SPO2_MONITORING, PRIORITY_TWO},
{TOPIC_EVENT_GRAYCARD_UPDATA, PRIORITY_TWO},
{TOPIC_EVENT_LEAKLIGHT_UPDATA, PRIORITY_TWO},
#endif
// {TOPIC_EVENT_DEVICE_UNBIND, PRIORITY_TWO},
// {TOPIC_EVENT_DEVICE_UNBINDING_REQUEST, PRIORITY_TWO},
#endif
- {TOPIC_EVENT_FIND_WATCH,PRIORITY_TWO},
- {TOPIC_EVENT_CANCEL_FIND_WATCH,PRIORITY_TWO},
- {TOPIC_EVENT_DRINKREMINDER,PRIORITY_TWO},
- {TOPIC_EVENT_MESSAGENOTE,PRIORITY_TWO},
- {TOPIC_EVENT_SLEEPNOTE,PRIORITY_TWO},
+ {TOPIC_EVENT_FIND_WATCH,PRIORITY_TWO},// 找手表 [2]
+ {TOPIC_EVENT_CANCEL_FIND_WATCH,PRIORITY_TWO},// 取消找手表 [2]
+ {TOPIC_EVENT_DRINKREMINDER,PRIORITY_THREE},//喝水提醒 [3]
+ {TOPIC_EVENT_MESSAGENOTE,PRIORITY_THREE},//消息提醒 [3]
+ {TOPIC_EVENT_SLEEPNOTE,PRIORITY_THREE},//睡眠弹窗 [3]
};
static bool CheckPriority(const Topic topic)
MsgCenterSubscribeTopic(TOPIC_EVENT_SPO2_UPDATE);
MsgCenterSubscribeTopic(TOPIC_EVENT_HEARTRATE_UPDATA);
MsgCenterSubscribeTopic(TOPIC_EVENT_WEARSTATE_UPDATE);
- MsgCenterSubscribeTopic(TOPIC_EVENT_START_HRS_MONITORING);
- MsgCenterSubscribeTopic(TOPIC_EVENT_STOP_HRS_MONITORING);
- MsgCenterSubscribeTopic(TOPIC_EVENT_START_SPO2_MONITORING);
- MsgCenterSubscribeTopic(TOPIC_EVENT_STOP_SPO2_MONITORING);
MsgCenterSubscribeTopic(TOPIC_EVENT_GRAYCARD_UPDATA);
MsgCenterSubscribeTopic(TOPIC_EVENT_LEAKLIGHT_UPDATA);
#endif
#endif
}
}
-//开始检测心率
-void MsgCenterNotifyStartHRMonitoringProc(const Topic topic, Request* req)
-{
- unused(topic);
- unused(req);
- if (topic == TOPIC_EVENT_START_HRS_MONITORING)
- {
- md = PPG_SERVICE_CMD_TYPE_DO_PPG_TEST;
- send_ppg_cmd_msg(md);
- }
-}
-//结束检测心率
-void MsgCenterNotifyStopHRMonitoringProc(const Topic topic, Request* req)
-{
- unused(topic);
- unused(req);
- if (topic == TOPIC_EVENT_STOP_HRS_MONITORING)
- {
- md = PPG_SERVICE_CMD_TYPE_STOP_PPG_TEST;
- send_ppg_cmd_msg(md);
- }
-}
-//开始检测血氧
-void MsgCenterNotifyStartSPO2MonitoringProc(const Topic topic, Request* req)
-{
- unused(topic);
- unused(req);
- if (topic == TOPIC_EVENT_START_SPO2_MONITORING)
- {
- md = PPG_SERVICE_CMD_TYPE_DO_SPO2_TEST;
- send_ppg_cmd_msg(md);
- }
-}
-//结束检测血氧
-void MsgCenterNotifyStopSPO2MonitoringProc(const Topic topic, Request* req)
-{
- unused(topic);
- unused(req);
- if (topic == TOPIC_EVENT_STOP_SPO2_MONITORING && req != nullptr && req->data != nullptr)
- {
- md = PPG_SERVICE_CMD_TYPE_STOP_SPO2_TEST;
- send_ppg_cmd_msg(md);
- }
-}
+
//消息通知
void MsgCenterNotifyMessageProc(const Topic topic, Request* req)
{TOPIC_EVENT_SPO2_UPDATE, MsgCenterNotifySPO2hProc},
{TOPIC_EVENT_WEARSTATE_UPDATE, MsgCenterNotifyWearStateProc},
{TOPIC_EVENT_HEARTRATE_UPDATA, MsgCenterNotifyHeartRateProc},
- {TOPIC_EVENT_START_HRS_MONITORING, MsgCenterNotifyStartHRMonitoringProc},
- {TOPIC_EVENT_STOP_HRS_MONITORING, MsgCenterNotifyStopHRMonitoringProc},
- {TOPIC_EVENT_START_SPO2_MONITORING, MsgCenterNotifyStartSPO2MonitoringProc},
- {TOPIC_EVENT_STOP_SPO2_MONITORING, MsgCenterNotifyStopSPO2MonitoringProc},
{TOPIC_EVENT_GRAYCARD_UPDATA, MsgCenterNotifyCardProc},
{TOPIC_EVENT_LEAKLIGHT_UPDATA, MsgCenterNotifyleaklightProc},
#endif