WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CleanHealthData is ok");
return true;
}
+
+ HealthState HealthService::GetHealthCurrent()
+ {
+ return healthState_;
+ }
+ void HealthService::SetHealthCurrent(HealthState healthState)
+ {
+ healthState_ = healthState;
+ }
}
\ No newline at end of file
-/***
- * @Date: 2024-06-14 11:34:19
- * @LastEditors: Caisking 3449750381@qq.com
- * @LastEditTime: 2024-07-09 16:25:59
- * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
- */
/***
* @Date: 2024-06-14 11:34:19
* @LastEditors: Caisking 3449750381@qq.com
- * @LastEditTime: 2024-06-28 19:49:27
+ * @LastEditTime: 2024-07-30 17:45:59
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
*/
-/***
- * @Date: 2024-06-14 11:34:19
- * @LastEditors: Caisking 3449750381@qq.com
- * @LastEditTime: 2024-06-24 16:08:36
- * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
- */
+
#ifndef HEART_SERVICE_H
#define HEART_SERVICE_H
uint32_t timestamp; // 最近一次检测时间
} HeartRateData;
+ // 检查类
+ typedef enum
+ {
+ BLOOD_CHECK,
+ HEART_CHECK
+ } CheckClass;
+
+ // 检查结果
+ typedef enum
+ {
+ HIGH,
+ LOW
+ } CheckResult;
+
+ // 健康状态
+ typedef struct
+ {
+ CheckClass checkType; // 检查类型
+ CheckResult resultStatus; // 结果状态
+ uint16_t checkResult; // 检查结果
+ } HealthState;
+
class HealthService
{
public:
void ReleaseJsonData(uint8_t type); // 释放json
bool UpdateJsonData(uint8_t type); // 更新json
bool CleanHealthData();
+
+ HealthState GetHealthCurrent();
+ void SetHealthCurrent(HealthState healthState);
+
+ private:
+ HealthState healthState_;
};
}
#endif // HEALTH_MODEL_H
\ No newline at end of file