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 217efb839855960241a8571505dc1f0ad33531c7..2b00348e4505d47b9de1e03668f2de7c1e8c1954 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 62aebbc62fa38b9faf6f9dd714e24308a1015baf..d7bb070a0eb855ccea5c975d65e8c3b3d08939fd 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 9611b3a3daa567723f0b6665aefcd30ee2064c31..07c5de86e5f77cb47dd2949e3f38c94cc4c6757f 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 b6e2eb2e62319516ae381eb1a75553a30b25bb8f..1d589d6edc26dc2b7e4e4f669e6e1a45a85df65a 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"},