Add hrm_batch sensor type 19/227119/1 accepted/tizen/unified/20200311.130757 submit/tizen/20200311.004837
authorBoram Bae <boram21.bae@samsung.com>
Tue, 10 Mar 2020 01:59:08 +0000 (10:59 +0900)
committerBoram Bae <boram21.bae@samsung.com>
Tue, 10 Mar 2020 02:24:38 +0000 (11:24 +0900)
Change-Id: I6167d678146dd73a87f6cc6cc02f854dd5aa19db
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
include/sensor_hal_types.h
include/sensor_types.h
src/server/sensor_loader.cpp
src/shared/sensor_utils.cpp

index 217efb8..2b00348 100644 (file)
@@ -72,6 +72,8 @@ typedef enum {
 
        SENSOR_DEVICE_SIGNIFICANT_MOTION = 0x100,
 
+       SENSOR_DEVICE_HRM_BATCH = 0x200,
+
        SENSOR_DEVICE_HUMAN_PEDOMETER = 0x300,
        SENSOR_DEVICE_HUMAN_SLEEP_MONITOR,
        SENSOR_DEVICE_HUMAN_SLEEP_DETECTOR,
index 62aebbc..d7bb070 100644 (file)
@@ -94,6 +94,8 @@ typedef enum sensor_type_t {
 
        SIGNIFICANT_MOTION_SENSOR = 0x100,
 
+       HRM_BATCH_SENSOR = 0x200,
+
        HUMAN_PEDOMETER_SENSOR = 0x300,
        HUMAN_SLEEP_MONITOR_SENSOR,
        HUMAN_SLEEP_DETECTOR_SENSOR,
index 9611b3a..07c5de8 100644 (file)
@@ -78,6 +78,7 @@ bool sensor_loader::load(const std::string &dir_path, std::vector<std::shared_pt
        retv_if(!ret, false);
 
        for (auto &path : module_paths) {
+               _I("Load sensor devices from %s", path.c_str());
                handle = dlopen(path.c_str(), RTLD_NOW);
                retvm_if(!handle, false, "Failed to dlopen from %s because %s", path.c_str(), dlerror());
 
@@ -100,6 +101,7 @@ bool sensor_loader::load(const std::string &dir_path, std::vector<std::shared_pt
                        sensors.emplace_back(static_cast<T *>(results[i]));
 
                m_modules[path.c_str()] = handle;
+               _I("Success to load sensor devices from %s", path.c_str());
        }
 
        return true;
index b6e2eb2..1d589d6 100644 (file)
@@ -64,6 +64,8 @@ static std::map<sensor_type_t, const char *> types = {
 
        {SIGNIFICANT_MOTION_SENSOR,      "http://tizen.org/sensor/general/significant_motion"},
 
+       {HRM_BATCH_SENSOR,               "http://tizen.org/sensor/healthinfo/hrm_batch"},
+
        {HUMAN_PEDOMETER_SENSOR,         "http://tizen.org/sensor/healthinfo/human_pedometer"},
        {HUMAN_SLEEP_MONITOR_SENSOR,     "http://tizen.org/sensor/healthinfo/human_sleep_monitor"},
        {HUMAN_SLEEP_DETECTOR_SENSOR,    "http://tizen.org/sensor/healthinfo/human_sleep_detector"},